Вы находитесь на странице: 1из 14427

Important Note

This documentation applies to multiple programs, including:

SAP2000 Version 19
CSiBridge Version 19

All examples in this documentation refer to SAP2000. However, users of CSiBridge


should refer to CSiBridge. For example,

SAP2000 users can create an instance of the SapObject in VBA as follows

Dim SapObject As SAP2000v19.cOAPI


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

whereas CSiBridge users would create an instance of the SapObject as follows

Dim SapObject As CSiBridge19.cOAPI


Set SapObject = CreateObject("CSI.CSiBridge.API.SapObject")

Other references to SAP2000 in the documentation should be interpreted as


CSiBridge for users of CSiBridge.

Similarly, references to the .sdb extension in SAP2000 should be interpreted as the


.bdb extension for users of CSiBridge.
Introduction
The CSi Application Programming Interface (API) is a powerful tool that allows users to
automate many of the processes required to build, analyze, and design models and to
obtain customized analysis and design results. It also allows users to link SAP2000 or
CSiBridge with third-party software, providing a path for two-way exchange of model
information with other programs.
Most major programming languages can be used to access SAP2000 and CSiBridge
through the API. Detailed examples are provided for several popular programming
languages, including C#, Python, MATLAB, and Visual Basic for Applications (VBA), which
is included in programs such as Microsoft Excel.
This documentation is organized into the following main categories: Getting Started, CSi
API Functions, and Example Code.

Release Notes explain recent changes in the API, and include instructions for users on
how to update their client applications.
Getting Started briefly explains how to use the CSi API and how the CSi API
functions are documented.
CSI API Functions identifies each function available in the API and provides an
example of how the function might be called using Visual Basic for Applications (VBA).
Example Code provides programming examples using the CSI API. These examples
are more extensive than those included with the documentation of each function.
Obsolete Functions are the result of changes to the software or the API. These
obsolete functions have been superseded, but continue to be included to
accommodate backwards compatibility.
Breaking Changes Between v16 and v17 lists functions and enumerations that have
been renamed in SAP2000v17.

See Also
Accessing SAP2000 From An External Application
Function Documentation Conventions
Function Return Values
Units Abbreviations
Visual Basic Concepts Used In the CSi API
Improvements in API Behavior
Starting with SAP2000 v17.2.0, 32-bit and 64-bit API clients can use the same syntax
to connect to SAP2000. Please see the examples for specific instructions.
Starting with SAP2000 v 17.2.0, client applications can connect to instances of
SAP2000 that were starting manually, e.g. by clicking on the SAP2000 icon. Please
see the examples for specific instructions. Currently this feature is available for every
supported language, except MATLAB.
API-launched instances of SAP2000 can now run in DirectX graphics mode.
API-launched instances of SAP2000 can now run the analysis out-of-process, allowing
larger models to be analyzed.
Launching the Installed Version of SAP2000/CSiBridge
Automatically
With the release of SAP2000 and CSiBridge v19.1.0, new functionality has been
added to the cHelper interface to allow users to launch the application without
supplying the path to the program executable file. The example code is in
VB.NET.

1. Previously, users would launch the program with the function


cHelper.CreateObject , providing the full path to the ETABS.exe as an
argument, as below:
Dim mySapObject As SAP2000v19.cOAPI
Dim myHelper as SAP2000v19.cHelper = New SAP2000v19.Helper

mySapObject = myHelper.CreateObject("C:\Program Files


(x86)\Computers and Structures\SAP2000 19\SAP2000.exe")

ret = mySapObject.ApplicationStart()

Dim mySapModel As SAP2000v19.cSapModel =


mySapObject.SapModel

2. While the code above is still available, a simpler method has been added to
cHelper. The CreateObjectProgID function takes the Program ID as an
argument, and automatically launches the most recently installed version of
SAP2000 or CSiBridge:
Dim mySapObject As SAP2000v19.cOAPI
Dim myHelper as SAP2000v19.cHelper = New SAP2000v19.Helper

mySapObject =
myHelper.CreateObjectProgID("CSI.SAP2000.API.SapObject")

ret = mySapObject.ApplicationStart()

Dim mySapModel As SAP2000v19.cSapModel =


mySapObject.SapModel

For reference, the Program ID for CSiBridge users is


"CSI.CSiBridge.API.SapObject"
Migrating From SAP2000v16 to SAP2000v17
In version 17 of SAP2000, the API has been separated from the main SAP2000
executable into a dynamic link library (DLL). This will change how API client
applications connect to CSI software. You will no longer directly reference the
SAP2000 executable assembly. Instead, you will reference the API DLL. In
addition, you will no longer be able to declare a variable of type SapObject.
Instead, create a variable of type SAP2000v17 cOAPI, which is an interface
type. Then instantiate an object that implements the cOAPI interface. This
process is detailed in the included examples.
Migrating from CSiBridge16 to CSiBridge17
The same considerations and examples apply to CSiBridge 2015 (v17) as well
as to SAP2000v17. In the discussion throughout this document, replace all
references to SAP2000 with CSiBridge, all references to Sap2000v16 with
CSiBridge16, and all references to Sap2000v17 with CSiBridge17.

See Also
Changes in API Behavior
Instructions for Updating COM clients (VBA example)
Instructions for Updating .NET clients (C# example)
Breaking Changes
Breaking Changes to COM Enumerations
Breaking Changes to NET Enumerations
Accessing Sap2000 From An External Application
This page contains an outline for connecting to the SAP2000 API, with VBA code
examples. For specific instructions for supported programming languages, please refer to
the Example Code section.
The first step in using the CSi API from an external application is to reference
SAP2000v19.DLL or SAP2000v19.TLB from your application. If using Excel VBA,
reference SAP2000v19.TLB by opening the VBA editor, clicking the Tools menu >
References command and selecting SAP2000v19.TLB from the program installation folder.

Next, within your application, you will create a variable of interface type cOAPI, and an
instance of the Sap2000 object which implements cOAPI. In VBA this could be
accomplished as:
Dim mySapObject As Sap2000v19.cOAPI
Dim myHelper As Sap2000v19.cHelper
Set myHelper = New Sap2000v19.Helper
Set mySapObject = myHelper.CreateObject(ProgramPath)

The first line creates the interface variable, the second and third lines create a helper
class, and the fourth line creates the instance of the Sap2000 object which implements the
interface by passing in the path to where the Sap2000.exe program is located. Now that
an instance of the Sap2000 object has been created in your application, start SAP2000
using the following VBA command:
SapObject.ApplicationStart

At this point you can open an existing model, or create a new one and perform whatever
actions are required. In general, the API commands are accessed through
SapObject.SapModel.
It may be helpful to define a SapModel variable so that the API commands are accessed
through SapModel instead of SapObject.SapModel. In VBA this could be accomplished as:
Dim mySapModel As cSapModel
Set mySapModel= mySapObject.SapModel

When finished with a model, you may want to close the SAP2000 application. This can be
accomplished using the following VBA command:
SapObject.ApplicationExit True

As a last step, the SapModel and SapObject variables should always be set to Nothing. In
VBA this is accomplished as:
Set SapModel= Nothing
Set SapObject= Nothing

Setting the variables to Nothing is a very important step. It breaks the connection between
your application and SAP2000 and frees up system resources. If the variables are not set
to Nothing, the SAP2000 application may not completely close (you may still see it running
in your Windows Task Manager).
Putting all the steps previously described into a single example, a VBA program might
consist of the following:
Sub MyProgram
'dimension variables
Dim mySapObject As SAP2000v19.cOAPI
Dim myHelper As SAP2000v19.cHelper
Dim mySapModel As cSapModel
Dim ret As Long

'create an instance of the Sap2000 object


Set myHelper= New SAP2000v19.Helper
Set mySapObject= myHelper.CreateObject("C:\Program Files
(x86)\Computers and Structures\SAP2000 19\sap2000.exe")

'start the Sap2000 application


mySapObject.ApplicationStart

'create the SapModel object


Set mySapModel= mySapObject.SapModel

'initialize model
ret = mySapModel.InitializeNewModel

'call Sap2000 API functions here to perform desired tasks


'in this example a new 2D frame is created from template
ret = mySapModel.File.New2DFrame(PortalFrame, 3, 124, 3,
200)

'close the Sap2000 application, if desired


mySapObject.ApplicationExit False

'set the objects to Nothing


'at the end of your program ALWAYS terminate the objects in
this manner
Set mySapModel= Nothing
Set mySapObject= Nothing
End Sub

See Also
Introduction
Function Documentation Conventions
Function Return Values
Units Abbreviations
Visual Basic Concepts Used in the CSi OAPI
Function Documentation Conventions
The documentation of each function in the API has the following sections:
Syntax
This section provides the syntax of the command as you would call it from an external
application without including any parameters
VB6 Procedure
The VB6 procedure shows the function as defined in SAP2000. This function definition
shows the variable type of each parameter, which parameters are optional, and which
optional parameters have built-in default values.
See Visual Basic Concepts Used in the CSi OAPI for more information about Visual Basic
definitions that apply to the CSi API.
Parameters
The Parameters used in the function are briefly described. Parameters that have units
associated with them are followed by a units abbreviation in square brackets, such as [F],
indicating the units type for the item.
Remarks
The Remarks describe what the function does and provides additional information, if any,
that was not explained in the Parameters. See Function Return Values for more
information.
VBA Example
The VBA example uses the considered function. The examples are written for use in
Microsoft Excel VBA.
Release Notes
The release information specific to the considered function is provided.
See Also
Functions that are related to the considered function, if any, are listed in this area.
See Also
Introduction
Accessing SAP2000 From An External Application
Function Return Values
Units Abbreviations Visual Basic Concepts Used in the CSi OAPI
Function Return Values
Almost all CSi API functions return a Long (32 bit signed integer) value indicating if the
function executed successfully.
A return value of 0 indicates that SAP2000 successfully executed the function.
Any nonzero return value indicates that the function was not successfully executed.
See Also
Introduction
Accessing SAP2000 From An External Application
Function Documentation Conventions
Units Abbreviations
Visual Basic Concepts Used in the CSi OAPI
Units Abbreviations
In the documentation of each CSi OAPI function, parameters that have units associated
with them are followed by one of the following abbreviations, to indicate the units for those
parameters.
[L] = Length
[F] = Force, [F] = [ML/s2]
[M] = Mass
[s] = Time, seconds
[T] = Temperature
[cyc] = Cycles
[rad] = Radians (angle measurement)
[deg] = Degrees (angle measurement)
Combinations of these abbreviations are used in many cases. For example, moments are
indicated as [FL] and stresses are indicated as [F/L2].
See Also
Introduction
Accessing SAP2000 From An External Application
Function Documentation Conventions
Function Return Values
Visual Basic Concepts Used in the CSi OAPI
Visual Basic Concepts Used in the CSi OAPI
Some of the Visual Basic concepts and definitions that apply to the CSi API are explained
herein.
Option Base
Visual Basic 6 allows the default lower bound for arrays to be specified as 0 (the default),
or 1. SAP2000 uses a lower bound of 0 for all arrays. Any program that accesses
SAP2000 through the API should also use a lower bound of 0 for its arrays.
Fixed-Size and Dynamic Arrays
Arrays can be used to refer to a series of variables by the same name and to use a
number (an index) to distinguish them. Visual Basic has two types of arrays: fixed-size and
dynamic. A fixed-size array always remains the same size. A dynamic array can change its
size while the program is running.
A fixed-size array is declared with the size indicated. For example, the following line
declares MyFixedArray dimensioned to 2.
Dim MyFixedArray(2)as Double

Dimensioning the array to 2 means that it holds three data items:


MyFixedArray(0) = first data item
MyFixedArray(1) = second data item
MyFixedArray(2) = third data item
Dynamic arrays are declared with no size indicated as shown here:
Dim MyDynamicArray()as Double

Dynamic arrays are dimensioned sometime after they are declared using a statement such
as the following:
ReDim MyDynamicArray(2)

Any array that is dimensioned inside SAP2000 must be declared as a dynamic array so
that SAP2000 can redimension it. It is probably a good idea to declare all arrays as
dynamic arrays for simplicity. As an example, the analysis results obtained through the CSi
API are stored in arrays that are defined as dynamic arrays by the user and then
dimensioned and filled inside of SAP2000.
Variable Types
Most of the data in the CSi API is one of the following variable types.

Boolean: A variable stored as a 16-bit (2-byte) number, but it can only be True or
False. When boolean values are converted to other data types, False becomes 0 and
True becomes 1.
Long: A variable stored as a 32-bit (4-byte) number ranging in value from
-2,147,483,648 to 2,147,483,647. Note that other programming languages may refer
to this data type differently; for example, they may refer to this as an Integer.
Double: A double-precision floating-point variable stored as an IEEE 64-bit (8-byte)
floating-point number ranging in value from -1.79769313486231E308 to
-4.94065645841247E-324 for negative values and from 4.94065645841247E-324 to
1.79769313486232E308 for positive values.
String: A variable length string.

Optional Arguments
Some of the CSi API functions have optional arguments. For example, the CountLoadDispl
function has two optional arguments: Name and LoadPat. It is not necessary to include the
optional arguments when calling this function. All four of the following calls are valid.
ret = SapModel.PointObj.CountLoadDispl(Count)

ret = SapModel.PointObj.CountLoadDispl(Count, Name)

ret = SapModel.PointObj.CountLoadDispl(Count, , LoadPat)

ret = SapModel.PointObj.CountLoadDispl(Count, Name, LoadPat)

Note in the third example, the first optional item is not included and the second optional
item is included. In that case, commas must be included to denote the missing arguments.
Comments
In Visual Basic the Rem statement followed by a space indicates that all of the data on the
line to the right of the Rem statement is a comment (or a remark). The Rem statement can
be abbreviated using an apostrophe, '. The apostrophe is used in all of the VBA examples
in the CSi OAPI documentation to denote a comment.
ByVal and ByRef
Variables are passed to the CSi API functions using the ByRef or the ByVal keyword.

ByVal means that the variable is passed by value. This allows the CSi API to access a
copy of the variable but not the original variable. This means the value of the variable
in another application can not be changed by the API.
ByRef, which is the default in VB6 and VBA, means the argument is passed by
reference. This passes the address of the variable to the CSi API instead of passing a
copy of the value. It allows the CSi API to access the actual variable, and, as a result,
allows SAP2000 to change the variable's actual value in an application.
Variables are passed ByRef when data needs to be returned in them from SAP2000 to
your application. In addition, Visual Basic requires that all arrays be passed ByRef.
Release Notes
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Introduction
Accessing SAP2000 From An External Application
Function Documentation Conventions
Function Return Values
Units Abbreviations
Information for Plugin Developers
SAP2000 external plugins can be developed to make use of the SAP2000 API from inside
the program.
No license is required to use the API beyond having a valid license for SAP2000 or
CSiBridge. However, technical support for developing with the API is not included. For
qualified users and third-party developers who would like technical support to help them
build solutions and integrations with SAP2000 using the SAP2000 API, Computers and
Structures, Inc., has created a subscription-based service, CSI Developer Network
(CSIDN) (see http://www.csiamerica.com/support). You would need to subscribe to
CSIDN to be eligible for technical support for SAP2000 API.
Plugins can be developed in a .NET compatible language (e.g. Visual Basic 2012, Visual
C#, etc.), or any language capable of creating a COM server compiled as a DLL. An
example plugin project can be found at:
https://wiki.csiamerica.com/display/kb/Sample+Plugin+1
Requirements and suggestions:

SAP2000 will look for the plugin by Type Library name (usually the name of the PlugIn
project), which you define when developing your COM server DLL. We suggest using
a unique name such as SAP2000PlugIn_xxx_yyy, where xxx is your (company) name,
and yyy is the name to distinguish the plugin from other plugins that you develop. For
example, SAP2000PlugIn_ABCinc_Template1.
SAP2000 is not looking for specific GUIDs. Choose unique GUIDs for the plugin.
The plugin must reference the SAP2000v19 API library (either SAP2000v19.DLL or
SAP2000v19.TLB ), which must be registered on the developers and the users
systems.
Before SAP2000 can call the plugin, the plugin must be registered for COM (or for
COM interop for .NET DLLs) on the users system. It is your responsibility to instruct
the user how to install the plugin. This should be done after SAP2000 has been
installed.
We will attempt to maintain a stable interface in SAP2000, however, that cannot be
guaranteed, and updates to your plugin may be required for future versions of
SAP2000.
All functionality must be implemented in a class called cPlugin.
Class cPlugin must have a subroutine cPlugin.Main() that expects a reference to
SAP2000v19.cSapModel and SAP2000v19.cPluginCallback:

Public Sub Main(ByRef SapModel As SAP2000v19.cSapModel, ByRef


ISapPlugin As SAP2000v19.cPluginCallback)

Class cPlugin may have an optional function cPlugin.Info() that expects a reference to
a string, and returns a Long (32-bit signed integer). The return value should be zero if
successful. The string is to be filled in by the function, and may be plain text or rich
text. If this function is found and returns zero, the string will be displayed when the
user first adds the plugin to SAP2000. You can use this string to tell the user the
purpose and author of the plugin. This is in addition to any information you may provide
when the user executes the plugin.

Public Function Info(ByRef Text As String) As Integer

SAP2000v19.cPluginCallback contains a Finish() subroutine that is to be called right


before the plugin is ready to close (e.g., if the plugin has a single main window, at the
end of the close event of that form). It expects an error flag (0 meaning no errors) to
let SAP2000 know if the operation was successful or not. SAP2000 will wait
indefinitely for SAP2000v19.cPluginCallback.Finish() to be called, so the plugin
programmer must make sure that it is called when the execution of the plugin code is
completed.

Public Sub Finish(ByVal iVal As Integer)

It is OK for cPlugin.Main() to return before the actual work is completed. (e.g., return
after displaying a form where the functionality implemented in the plugin can be
accessed through different command buttons). However, it is imperative to remember
to call SAP2000v19.cPluginCallback.Finish() to return the control back to SAP2000
when the plugin is ready to close.
Our testing has indicated that modal forms in .NET DLLs are problematic when shown
within a SAP2000 external plugin, especially if you try to perform refresh operations to
the views or windows.
If you want to provide multiple functionality in your plugin, you can provide options for
the user when subroutine Main is called. Options for the user to obtain information
about the product, developer, technical support, and help should be provided. Support
for your plugin will not be provided by Computers and Structures, Inc.
As currently implemented, the cPlugin object will be destroyed between invocations
from the SAP2000 Tools menu command that calls it, so data cannot be saved. All
operations in the plugin must be completed before the user can perform any other
operations within SAP2000 itself.
Please make sure your plugin is stable, handles errors well, and does not cause any
unintended changes to the users model.
ApplicationExit
Syntax
SapObject.ApplicationExit
VB6 Procedure
Function ApplicationExit(ByVal FileSave As Boolean) As Long
Parameters
FileSave
If this item is True the existing model file is saved prior to closing Sap2000.
Remarks
If the model file is saved then it is saved with its current name. You should set the
Sap2000 object variable to nothing after calling this function.

This function returns zero if the function succeeds and nonzero if it fails.
VBA Example
Sub ExitExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a 3D frame model from template


ret = SapModel.File.New3DFrame(BeamSlab, 3, 12, 3, 28, 2,
36)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ApplicationStart
ApplicationStart
Syntax
SapObject.ApplicationStart
VB6 Procedure
Function ApplicationStart(Optional ByVal Units As eUnits = kip_in_F, Optional
ByVal Visible As Boolean = True, Optional ByVal FileName As String = "") As
Long
Parameters
Units
The database units used when a new model is created. Data is internally stored in the
program in the database units. The database units may be one of the following items
in the eUnits enumeration:
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16

Visible
If this item is True then the application is visible when started. If it is False then the
application is hidden when started.
FileName
The full path of a model file to be opened when the Sap2000 application is started. If
no file name is specified, the application starts without loading an existing model.
Remarks
This function starts the Sap2000 application.
When the model is not visible it does not appear on screen and it does not appear in
the Windows task bar.
If no filename is specified, you can later open a model or create a model through the
API.
The file name must have an .sdb, .$2k, .s2k, .xls, or .mdb extension. Files with .sdb
extensions are opened as standard SAP2000 files. Files with .$2k and .s2k
extensions are imported as text files. Files with .xls extensions are imported as
Microsoft Excel files. Files with .mdb extensions are imported as Microsoft Access
files.
This function returns zero if the application successfully starts and nonzero if it fails.
VBA Example
Sub StartExample()
'dimension variables
Dim SapObject as cOAPI
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


ret = SapObject.ApplicationStart

'close Sap2000
SapObject.ApplicationExit False
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ApplicationExit
OpenFile
InitializeNewModel
GetDatabaseUnits
Syntax
SapObject.SapModel.GetDatabaseUnits
VB6 Procedure
Function GetDatabasetUnits() As eUnits
Parameters
None
Remarks
This function returns one of the following items from the eUnits enumeration indicating
the database units for the model. All data is internally stored in the model in these
units and converted to the present units as needed.
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16
VBA Example
Sub GetUnitsDatabase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyUnits As eUnits

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get database units


MyUnits = SapModel.GetDatabaseUnits

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPresentUnits
GetPresentUnits
GetMergeTol
Syntax
SapObject.SapModel.GetMergeTol
VB6 Procedure
Function GetMergeTol(ByRef MergeTol As Double) As Long
Parameters
MergeTol
The program auto merge tolerance. [L]
Remarks
This function retrieves the value of the program auto merge tolerance.
The function returns zero if the tolerance is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAutoMergeTolerance()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MergeTol As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get auto merge tolerance


ret = SapModel.GetMergeTol(MergeTol)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetMergeTol
GetModelFilename
Syntax
SapObject.SapModel.GetModelFilename
VB6 Procedure
Function GetModelFilename(Optional ByVal IncludePath As Boolean = True) As
String
Parameters
IncludePath
A boolean (True or False) value. When this item is True, the returned filename
includes the full path where the file is located.
Remarks
The function returns a string that represents the filename of the current model,
with or without the full path.
VBA Example
Sub GetModelFilename()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'save the model


ret = SapModel.File.Save("C:\SapAPI\API_1-001.sdb")

'display the filename of the model


MsgBox Model filename = & SapModel.GetModelFilename

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.2
See Also
GetModelFilepath
GetModelFilepath
Syntax
SapObject.SapModel.GetModelFilepath
VB6 Procedure
Function GetModelFilepath() As String
Parameters
None
Remarks
The function returns a string that represents the filepath of the current model.
VBA Example
Sub GetModelFilepath()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'save the model


ret = SapModel.File.Save("C:\SapAPI\API_1-001.sdb")

'display the path where the model is saved


MsgBox Model filepath = & SapModel.GetModelFilepath

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.2
See Also
GetModelFilename
GetModelIsLocked
Syntax
SapObject.SapModel.GetModelIsLocked
VB6 Procedure
Function GetModelIsLocked() As Boolean
Parameters
None
Remarks
The function returns True if the model is locked and False if it is unlocked.
With some exceptions, definitions and assignments can not be changed in a
model while the model is locked. If an attempt is made to change a definition or
assignment while the model is locked and that change is not allowed in a locked
model, an error will be returned.
VBA Example
Sub GetModelLocked()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim IsLocked As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'check if model is locked


IsLocked = SapModel.GetModelIsLocked

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetModelIsLocked
GetNotionalSize
Syntax
SapObject.SapModel.PropArea.GetNotionalSize
VB6 Procedure
Function GetNotionalSize(ByVal Name As String, ByRef stype As String, ByRef
Value As Double) As Long
Parameters
Name
The name of an existing shell-type area section property.
stype
The type to define the notional size of a section. It can be:
"Auto" = Program will determine the notional size based on the average
thickness of an area element.
"User" = The notional size is based on the user-defined value.
"None" = Notional size will not be considered. In other words, the time-
dependent effect of this section will not be considered.
Value
For stype is "Auto", the Value represents for the scale factor to the program-
determined notional size; for stype is User, the Value represents for the user-
defined notional size [L]; for stype is None, the Value will not be used and can
be set to 1.
Remarks
This function retrieves the method to determine the notional size of an area
section for the creep and shrinkage calculations. This function is currently
worked for shell type area section.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropNotionalSize() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim stype As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign parameters
stype = Auto
Value = 1.1
ret = SapModel.PropArea.SetNotionalSize("ASEC1", Auto,
1.1)

'get parameters
ret = SapModel.PropArea.GetNotionalSize("ASEC1", stype,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0
See Also
SetNotionalSize
GetPresentCoordSystem
Syntax
SapObject.SapModel.GetPresentCoordSystem
VB6 Procedure
Function GetPresentCoordSystem() As String
Parameters
None
Remarks
This function returns the name of the present coordinate system.
VBA Example
Sub GetPresentCSys()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long
Dim PresentCSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'set present coordinate system


ret = SapModel.SetPresentCoordSystem("CSys1")

'get present coordinate system


PresentCSys = SapModel.GetPresentCoordSystem

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPresentCoordSystem
GetPresentUnits
Syntax
SapObject.SapModel.GetPresentUnits
VB6 Procedure
Function GetPresentUnits() As eUnits
Parameters
None
Remarks
This function returns one of the following items from the eUnits enumeration indicating
the units presently specified for the model:
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16
VBA Example
Sub GetUnitsPresent()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyUnits As eUnits

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get present units


MyUnits = SapModel.GetPresentUnits

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPresentUnits
GetDatabaseUnits
GetProjectInfo
Syntax
SapObject.SapModel.GetProjectInfo
VB6 Procedure
Function GetProjectInfo(ByRef NumberItems As Long, ByRef Item() As String,
ByRef Data() As String) As Long
Parameters
NumberItems
The number of project info items returned.
Item
This is an array that includes the name of the project information item.
Data
This is an array that includes the data for the specified project information item.
Remarks
This function retrieves the project information data.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetProjectInformationData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim Item() As String
Dim Data() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set project information data


ret = SapModel.SetProjectInfo("Company Name", "Computers and
Structures, Inc.")
ret = SapModel.SetProjectInfo("Project Name", "API Testing")
ret = SapModel.SetProjectInfo("My Item", "My Data")

'get project information data


ret = SapModel.GetProjectInfo(NumberItems, Item, Data)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetProjectInfo
GetUserComment
Syntax
SapObject.SapModel.GetUserComment
VB6 Procedure
Function GetUserComment(ByRef Comment As String) As Long
Parameters
Comment
The data in the user comments and log.
Remarks
This function retrieves the data in the user comments and log.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetComments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Comment As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add comments
ret = SapModel.SetUserComment("Testing the Sap2000 API.")
ret = SapModel.SetUserComment("Adding a second comment.")
ret = SapModel.SetUserComment("Adding a third comment.", 3)

'get comments
ret = SapModel.GetUserComment(Comment)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetUserComment
GetVersion
Syntax
SapObject.SapModel.GetVersion
VB6 Procedure
Function GetVersion(ByRef Version As String, ByRef MyVersionNumber As
Double) As Long
Parameters
Version
The program version name that is externally displayed to the user.
MyVersionNumber
The program version number that is used internally by the program and not
displayed to the user.
Remarks
This function returns the SAP2000 program version.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetProgramVersion()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim Version As String
Dim MyVersionNumber As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'get program version


ret = SapModel.GetVersion(Version,MyVersionNumber)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.01.
See Also
Hide
Syntax
SapObject.Hide
VB6 Procedure
Function Hide() As Long
Parameters
None
Remarks
This function hides the Sap2000 application. When the application is hidden it is
not visible on the screen or on the Windows task bar.
The function returns zero if the Sap2000 application is successfully hidden and
nonzero if the function fails. If the application is already hidden calling this
function returns an error.
VBA Example
Sub HideSap()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'hide application
ret = SapObject.Hide

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Visible
Unhide
InitializeNewModel
Syntax
SapObject.SapModel.InitializeNewModel
VB6 Procedure
Function InitializeNewModel(Optional ByVal Units As eUnits = kip_in_F) As Long
Parameters
Units
This is the database units for the new model. All data is internally stored in the
model in these units. The units are one of the following items in the eUnits
enumeration:
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16
Remarks
This function clears the previous model and initializes the program for a new
model. If it is later needed, you should save your previous model prior to calling
this function.
After calling the InitializeNewModel function, it is not necessary to also call the
ApplicationStart function because the functionality of the ApplicationStart
function is included in the InitializeNewModel function.
The function returns zero if a new model is successfully initialized, otherwise it
returns a nonzero value.
VBA Example
Sub InitializeNewModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 12, 3,
30)

'save model
ret = SapModel.File.Save("C:\SapAPI\MyFirstSapModel.sdb")

'initialize new model


SapModel.InitializeNewModel(kN_m_C)

'create model from template


ret = SapModel.File.New3DFrame(FlatPlate, 2, 4, 2, 10, 4,
10, False, , , , 2, 2)

'save model
ret = SapModel.File.Save("C:\SapAPI\MySecondSapModel.sdb")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ApplicationStart
SetAsActiveObject
Syntax
SapObject.SetAsActiveObject
VB6 Procedure
Function SetAsActiveObject () As Long
Parameters
None
Remarks
This function sets the active instance of a SapObject in the system Running Object
Table (ROT), replacing the previous instance(s).

When a new SapObject is created using the OAPI, it is automatically added to the
system ROT if none is already present. Subsequent instances of the SapObject do
not alter the ROT as long as at least one active instance of a SapObject is present in
the ROT.

The Windows API call GetObject() can be used to attach to the active SapObject
instance registered in the ROT.

This function returns zero if the current instance is successfully added to the system
ROT and nonzero if it fails.
VBA Example
Sub StartExample()
'dimension variables
Dim SapObject as cOAPI
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


ret = SapObject.ApplicationStart

'set as active SapObject instance


ret = SapObject.SetAsActiveObject

'close Sap2000
SapObject.ApplicationExit False
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.01.
See Also
UnsetAsActiveObject
SetMergeTol
Syntax
SapObject.SapModel.SetMergeTol
VB6 Procedure
Function SetMergeTol(ByVal MergeTol As Double) As Long
Parameters
MergeTol
The program auto merge tolerance. [L]
Remarks
This function sets the program auto merge tolerance.
The function returns zero if the tolerance is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetAutoMergeTolerance()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'set auto merge tolerance


ret = SapModel.SetMergeTol(0.05)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetMergeTol
SetModelIsLocked
Syntax
SapObject.SapModel.SetModelIsLocked
VB6 Procedure
Function SetModelIsLocked(LockIt as Boolean) As Long
Parameters
LockIt
The item is True if the model is to be locked and False if it is to be unlocked.
Remarks
The function returns zero if the locked status of the model is successfully set.
Otherwise it returns a nonzero value.
With some exceptions, definitions and assignments can not be changed in a
model while the model is locked. If an attempt is made to change a definition or
assignment while the model is locked and that change is not allowed in a locked
model, an error will be returned.
VBA Example
Sub SetModelLocked()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'Lock model
ret = SapModel.SetModelIsLocked(True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModelIsLocked
SetNotionalSize
Syntax
SapObject.SapModel.PropArea.SetNotionalSize
VB6 Procedure
Function SetNotionalSize(ByVal Name As String, ByVal stype As String, ByVal
Value As Double) As Long
Parameters
Name
The name of an existing shell-type area section property.
stype
The type to define the notional size of a section. It can be:
"Auto" = Program will determine the notional size based on the average
thickness of an area element.
"User" = The notional size is based on the user-defined value.
"None" = Notional size will not be considered. In other words, the time-
dependent effect of this section will not be considered.
Value
For stype is "Auto", the Value represents for the scale factor to the program-
determined notional size; for stype is User, the Value represents for the user-
defined notional size [L]; for stype is None, the Value will not be used and can
be set to 1.
Remarks
This function assigns the method to determine the notional size of an area
section for the creep and shrinkage calculations. This function is currently
worked for shell type area section.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaPropNotionalSize() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim stype As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign parameters
stype = Auto
Value = 1.1
ret = SapModel.PropArea.SetNotionalSize("ASEC1", stype,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0
See Also
GetNotionalSize
SetPresentCoordSystem
Syntax
SapObject.SapModel.SetPresentCoordSystem
VB6 Procedure
Function SetPresentCoordSystem(ByVal CSys As String) As Long
Parameters
CSys
The name of a defined coordinate system.
Remarks
This function sets the present coordinate system.
The function returns zero if the present coordinate system is successfully set.
Otherwise it returns a nonzero value.
VBA Example
Sub SetPresentCSys()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long
Dim PresentCSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'set present coordinate system


ret = SapModel.SetPresentCoordSystem("CSys1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPresentCoordSystem
SetPresentUnits
Syntax
SapObject.SapModel.SetPresentUnits
VB6 Procedure
Function SetPresentUnits(ByVal Units As eUnits) As Long
Parameters
Units
One of the following items in the eUnits enumeration:
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16
Remarks
This function returns zero if the units are successfully set and nonzero if they are not
set.
VBA Example
Sub SetUnitsPresent()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim FileName As String
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'set present units to KN-m


ret = SapModel.SetPresentUnits(KN_m_C)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetDatabaseUnits
GetPresentUnits
SetProjectInfo
Syntax
SapObject.SapModel.SetProjectInfo
VB6 Procedure
Function SetProjectInfo(ByVal Item As String, ByVal Data As String) As Long
Parameters
Item
The name of the project information item to be set.
Data
The data for the specified project information item.
Remarks
This function sets the data for an item in the project information.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetProjectInfoData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set project information data


ret = SapModel.SetProjectInfo("Company Name", "Computers and
Structures, Inc.")
ret = SapModel.SetProjectInfo("Project Name", "API Testing")
ret = SapModel.SetProjectInfo("My Item", "My Data")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetUserComment
SetUserComment
Syntax
SapObject.SapModel.SetUserComment
VB6 Procedure
Function SetUserComment(ByVal Comment As String, Optional ByVal NumLines
As Long = 1, Optional ByVal Replace As Boolean = False) As Long
Parameters
Comment
The data to be added to the user comments and log.
NumLines
The number of carriage return and line feeds to be included before the specified
comment. This item is ignored if Replace = True. It is also ignored if there are no
existing comments.
Replace
If this item is True, all existing comments are replaced with the specified
comment.
Remarks
This function sets the user comments and log data.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub AddCommentToLog()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add comments
ret = SapModel.SetUserComment("Testing the Sap2000 API.")
ret = SapModel.SetUserComment("Adding a second comment.")
ret = SapModel.SetUserComment("Adding a third comment.", 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetUserComment
Unhide
Syntax
SapObject.Unhide
VB6 Procedure
Function Unhide() As Long
Parameters
None
Remarks
This function unhides the Sap2000 application, that is, it makes it visible. When
the application is hidden, it is not visible on the screen or on the Windows task
bar.
The function returns zero if the Sap2000 application is successfully unhidden
(set visible) and nonzero if the function fails. If the application is already visible
(not hidden) calling this function returns an error.
VBA Example
Sub UnhideSap()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'hide application
ret = SapObject.Hide

'unhide application
ret = SapObject.Unhide

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Visible
Hide
UnsetAsActiveObject
Syntax
SapObject.UnsetAsActiveObject
VB6 Procedure
Function UnsetAsActiveObject () As Long
Parameters
None
Remarks
This function removes the current instance of a SapObject from the system Running
Object Table (ROT).

This function returns zero if the current instance is successfully removed from the
system ROT and nonzero if it fails or if the current instance is not in the system ROT.
VBA Example
Sub StartExample() 'dimension variables
Dim SapObject as cOAPI
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


ret = SapObject.ApplicationStart

'unset as active SapObject instance


ret = SapObject.UnsetAsActiveObject

'close Sap2000
SapObject.ApplicationExit False
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.01.
See Also
SetAsActiveObject
Visible
Syntax
SapObject.Visible
VB6 Procedure
Function Visible() As Boolean
Parameters
None
Remarks
The function returns True if the Sap2000 application is visible on the screen,
otherwise it returns False.
VBA Example
Sub IsVisible()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long
Dim Visible as Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'get application visibility


Visible = SapObject.Visible

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Hide
Unhide
GetKeyStringsExtendedEntityData
Syntax
SapObject.SapModel.GetKeyStringsExtendedEntityData
VB6 Procedure
Function GetKeyStringsExtendedEntityData (ByVal AppName As String, ByVal
Key As String, ByRef NumberValues As Long, ByRef Values As String()) As
Long
Parameters
AppName
This is an application name of your choice under which your application
previously stored some data. It is recommended you choose a unique name to
guarantee no other third-party application resets the data that was set by your
application. Application names are stored in their original capitalization and
character set, but are compared in a case insensitive and culturally invariant
manner for retrieval purposes.
Key
This is an entry name under which the data provided in the remaining arguments
was stored. Entry names are stored in their original capitalization and character
set, but are compared in a case insensitive and culturally invariant manner for
retrieval purposes.
NumberValues
The number of strings stored for the given application name and entry name.
Values
This is one-dimensional array of string values. The Values array is created as a
dynamic, zero-based, array by the API user:
Dim Values() as String
The array is dimensioned to (NumberValues 1) inside the Sap2000 program,
filled with the string values previously stored under the application name
AppName and entry name Key, and returned to the API user.
Release Notes
Initial release in version 17.2.0.
See Also
GetKeysWithStringsExtendedEntityData
SetKeyStringsExtendedEntityData
GetKeysWithStringsExtendedEntityData
Syntax
SapObject.SapModel.GetKeysWithStringsExtendedEntityData
VB6 Procedure
Function GetKeysWithStringsExtendedEntityData (ByVal AppName As String,
ByRef NumberKeys As Long, ByRef Keys() As String) As Long
Parameters
AppName
This is an application name of your choice under which your application
previously stored some data. It is recommended you choose a unique name to
guarantee no other third-party application resets the data that was set by your
application. Application names are stored in their original capitalization and
character set, but are compared in a case insensitive and culturally invariant
manner for retrieval purposes.
NumberKeys
The number of different entries for which data was previously stored under the
application name AppName.
Key
This is a one-dimensional array of entry names. The Keys array is created as a
dynamic, zero-based, array by the API user:
Dim Keys() as String
The array is dimensioned to (NumberKeys 1) inside the Sap2000 program,
filled with the entry names for which data was previously stored under the
application name AppName, and returned to the API user.
Release Notes
Initial release in version 17.2.0.
See Also
GetKeyStringsExtendedEntityData
SetKeyStringsExtendedEntityData
SetStringsExtendedEntityData
Syntax
SapObject.SapModel.SetStringsExtendedEntityData
VB6 Procedure
Function SetStringsExtendedEntityData (ByVal AppName As String, ByVal Key
As String, ByRef NumberValues As Long, ByRef Values As String()) As Long
Parameters
AppName
This is an application name of your choice under which your application
previously stored some data. It is recommended you choose a unique name to
guarantee no other third-party application resets the data that was set by your
application. Application names are stored in their original capitalization and
character set, but are compared in a case insensitive and culturally invariant
manner for retrieval purposes.
Key
This is an entry name under which the data provided in the remaining arguments
was stored. This data can later be retrieved, reset, or deleted by providing a
valid application name and entry name. Entry names are stored in their original
capitalization and character set, but are compared in a case insensitive and
culturally invariant manner for retrieval purposes.
NumberValues
The number of strings to store for the given application name and entry name.
Values
A one-dimensional array of strings containing NumberValues strings. These
strings replace any strings previously stored for the given application name and
entry name. Calling this function with NumberValues equal to zero is equivalent
to erasing any previously stored data.
Remarks
This function can be used to store metadata for a model, or any other data
specific to your application.
Release Notes
Initial release in version 17.2.0.
See Also
GetKeysWithStringsExtendedEntityData
GetKeyStringsExtendedEntityData
Count
Syntax
Sap2000.AreaElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of area elements in the analysis model.
VBA Example
Sub CountAreaElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of area elements


Count = SapModel.AreaElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadGravity
Syntax
SapObject.SapModel.AreaElm.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified area elements.
AreaName
This is an array that includes the name of the area element associated with
each gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the gravity load assignments to area elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'assign area object gravity loads


ret = SapModel.AreaObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element gravity load


ret = SapModel.AreaElm.GetLoadGravity("3-1", NumberItems,
AreaName, LoadPat, CSys, x, y, z)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
Syntax
SapObject.SapModel.AreaElm.GetLoadPorePressure
VB6 Procedure
Function GetLoadPorePressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group depending on the value of the
ItemType item.
NumberItems
The total number of pore pressure loads retrieved for the specified area
elements.
AreaName
This is an array that includes the name of the area element associated with
each pore pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
pore pressure load.
Value
This is an array that includes the pore pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
pore pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the pore pressure load assignments to area elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object pore pressure load


ret = SapModel.AreaObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element pore pressure load


ret = SapModel.AreaElm.GetLoadPorePressure("ALL",
NumberItems, AreaName, LoadPat, Value, PatternName, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
Syntax
SapObject.SapModel.AreaElm.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef Component()
As Long, ByRef Value() As Double, ByRef PatternName() As String, Optional
ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified area elements.
AreaName
This is an array that includes the name of the area element associated with
each strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Component
This is an array that includes 1, 2, 3, 4, 5, 6, 7 or 8, indicating the component
associated with each strain load.
1= Strain11
2= Strain22
3= Strain12
4= Curvature11
5= Curvature22
6= Curvature12
7= Strain13
8= Strain23
Value
This is an array that includes the strain value. [L/L] for Component = 1, 2, 3, 7
and 8, and [1/L] for Component = 4, 5 and 6
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3
If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the strain load assignments to area elements.
The function returns zero if the strain load assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Component() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object strain load


ret = SapModel.AreaObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element strain load


ret = SapModel.AreaElm.GetLoadStrain("3", NumberItems,
AreaName, LoadPat, Component, Value, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
Syntax
SapObject.SapModel.AreaElm.GetLoadSurfacePressure
VB6 Procedure
Function GetLoadSurfacePressure(ByVal Name As String, ByRef NumberItems
As Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
Face() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group, depending on the value of the
ItemType item.
NumberItems
The total number of surface pressure loads retrieved for the specified area
elements.
AreaName
This is an array that includes the name of the area element associated with
each surface pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
surface pressure load.
Face
This is an array that includes -1, -2 or a nonzero, positive integer, indicating the
area element face to which the specified load assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from area element point n to area element point n + 1.
For example, edge face 2 is from area element point 2 to area element point 3.
Value
This is an array that includes the surface pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
surface pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the surface pressure load assignments to area elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Face() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object surface pressure load


ret = SapModel.AreaObj.SetLoadSurfacePressure("ALL", "DEAD",
-1, .1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element surface pressure load


ret = SapModel.AreaElm.GetLoadSurfacePressure("ALL",
NumberItems, AreaName, LoadPat, Face, Value, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
Syntax
SapObject.SapModel.AreaElm.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified area elements.
AreaName
This is an array that includes the name of the area element associated with
each temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
MyType
This is an array that includes either 1 or 3, indicating the type of temperature
load.
1 = Temperature
3 = Temperature gradient along local 3 axis
Value
This is an array that includes the temperature load value. [T] for MyType= 1 and
[T/L] for MyType= 3
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the temperature load assignments to area elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object temperature load


ret = SapModel.AreaObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element temperature load


ret = SapModel.AreaElm.GetLoadTemperature("ALL",
NumberItems, AreaName, LoadPat, MyType, Value, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniform
Syntax
SapObject.SapModel.AreaElm.GetLoadUniform
VB6 Procedure
Function GetLoadUniform(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef Dir() As Long, ByRef Value() As Double, Optional ByVal
ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing area element or group, depending on the value of the
ItemType item.
NumberItems
The total number of uniform loads retrieved for the specified area elements.
AreaName
This is an array that includes the name of the area element associated with
each uniform load.
LoadPat
This is an array that includes the name of the coordinate system in which the
uniform load is specified.
CSys
This is an array that includes the name of the coordinate system associated with
each uniform load.
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (applies only when CSys is Local)
2 = Local 2 axis (applies only when CSys is Local)
3 = Local 3 axis (applies only when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (applies only when CSys is Global)
11 = Projected Gravity direction (applies only when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Value
The uniform load value. [F/L2]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the area
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the area element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the area
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for area
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the uniform load assignments to area elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementUniformLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim Dir() As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object uniform loads


ret = SapModel.AreaObj.SetLoadUniform("ALL", "DEAD", -0.01,
2, False, "Local", Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element uniform load


ret = SapModel.AreaElm.GetLoadUniform("3", NumberItems,
AreaName, LoadPat, CSys, Dir, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.AreaElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double) As Long
Parameters
Name
The name of an existing area element.
Ang
This is the angle that the local 1 and 2 axes are rotated about the positive local 3
axis from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +3 axis is pointing toward you. [deg]
Remarks
This function retrieves the local axis angle assignment for area elements.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAreaElementLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element local axis angle


ret = SapModel.AreaElm.GetLocalAxes("3", Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMaterialOverwrite
Syntax
SapObject.SapModel.AreaElm.GetMaterialOverwrite
VB6 Procedure
Function GetMaterialOverwrite(ByVal Name As String, ByRef PropName As
String) As Long
Parameters
Name
The name of a defined area element.
PropName
This is None, indicating that no material overwrite exists for the specified area
element, or it is the name of an existing material property.
Remarks
This function retrieves the material overwrite assigned to an area element, if
any. The material property name is indicated as None if there is no material
overwrite assignment.
The function returns zero if the material overwrite assignment is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material overwrite


ret = SapModel.AreaObj.SetMaterialOverwrite("3", "A992Fy50")

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material overwrite assignment to area element


ret = SapModel.AreaElm.GetMaterialOverwrite("3", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
Syntax
SapObject.SapModel.AreaElm.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing area element.
Temp
This is the material temperature value assigned to the area element. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the area element is uniform over the element at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the area element may vary. The material temperature at each corner point
around the area element perimeter is equal to the specified temperature
multiplied by the pattern value at the associated point element. The material
temperature at other points in the area element is calculated by interpolation
from the corner points.
Remarks
This function retrieves the material temperature assignments to area elements.
The function returns zero if the material temperature assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material temperature


ret = SapModel.AreaObj.SetMatTemp("ALL", 50, , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material temperature for area element


ret = SapModel.AreaElm.GetMatTemp("3", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
Syntax
SapObject.SapModel.AreaElm.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing area element.
Value
This is an array of ten unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function retrieves the modifier assignment for area elements. The default
value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(0) = 0.01
ret = SapModel.AreaObj.SetModifiers("ALL", Value, Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get modifiers for area element


ReDim Value(9)
ret = SapModel.AreaElm.GetModifiers("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.AreaElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of area element names retrieved by the program.
MyName
This is a one-dimensional array of area element names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined area elements.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetAreaElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element names


ret = SapModel.AreaElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
Sap2000.AreaElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String) As Long
Parameters
Name
The name of an existing area element.
Obj
The name of the area object from which the area element was created.
Remarks
This function retrieves the name of the area object from which an area element
was created.
The function returns zero if the information is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetObjForAreaElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long
Dim RDI As Double
Dim RDJ As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object information for an area element


ret = SapModel.AreaElm.GetObj("3-2", Obj)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOffsets
Syntax
SapObject.SapModel.AreaElm.GetOffsets
VB6 Procedure
Function GetOffsets(ByVal Name As String, ByRef OffsetType As Long, ByRef
OffsetPattern As String, ByRef OffsetPatternSF As Double, ByRef Offset() As
Double) As Long
Parameters
Name
The name of an existing area element.
OffsetType
This is 0, 1 or 2, indicating the joint offset type.
0 = No joint offsets
1 = User defined joint offsets specified by joint pattern
2 = User defined joint offsets specified by point

OffsetPattern
This item applies only when OffsetType = 1. It is the name of the defined joint
pattern that is used to calculate the joint offsets.
OffsetPatternSF
This item only applies when OffsetType = 1. It is the scale factor applied to the
joint pattern when calculating the joint offsets. [L]
Offset
This item applies only when OffsetType = 2. It is an array of joint offsets for each
of the points that define the area element. [L]
Remarks
This function retrieves the joint offset assignments for area elements.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementJointOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim OffsetType As Long
Dim OffsetPattern As String
Dim OffsetPatternSF As Double
Dim Offset() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign joint offsets


ReDim Offset(3)
For i = 0 To 3
Offset(i) = 12
Next i
ret = SapModel.AreaObj.SetOffsets("ALL", 2, "", 1, Offset,
Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get joint offsets for area element


ret = SapModel.AreaElm.GetOffsets("3", OffsetType,
OffsetPattern, OffsetPatternSF, Offset)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.AreaElm.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef NumberPoints As Long,
ByRef Point() As String) As Long
Parameters
Name
The name of an area element.
NumberPoints
The number of point elements that define the area element.
Point
This is an array containing the names of the point elements that define the area
element. The point names are in order around the area element.
Remarks
This function retrieves the names of the point elements that define an area
element.
The function returns zero if the point element names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElmPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get names of points


ret = SapModel.AreaElm.GetPoints("3-2", NumberPoints, Point)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.AreaElm.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined area element.
PropName
The name of the area property assigned to the area element. This item is None
if there is no area property assigned to the area element.
Remarks
This function retrieves the area property assigned to an area element.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAreaElementProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area property for element


ret = SapModel.AreaElm.GetProperty("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetThickness
Syntax
SapObject.SapModel.AreaElm.GetThickness
VB6 Procedure
Function GetThickness(ByVal Name As String, ByRef ThicknessType As Long,
ByRef ThicknessPattern As String, ByRef ThicknessPatternSF As Double,
ByRef Thickness() As Double) As Long
Parameters
Name
The name of an existing area element.
ThicknessType
This is 0, 1 or 2, indicating the thickness overwrite type.
0 = No thickness overwrites
1 = User defined thickness overwrites specified by joint pattern
2 = User defined thickness overwrites specified by point

ThicknessPattern
This item applies only when ThicknessType = 1. It is the name of the defined joint
pattern that is used to calculate the thicknesses.
ThicknessPatternSF
This item applies only when ThicknessType = 1. It is the scale factor applied to
the joint pattern when calculating the thicknesses. [L]
Thickness
This item applies only when ThicknessType = 2. It is an array of thicknesses at
each of the points that define the area element. [L]
Remarks
This function retrieves the thickness overwrite assignments for area elements.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementThicknessOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim ThicknessType As Long
Dim ThicknessPattern As String
Dim ThicknessPatternSF As Double
Dim Thickness() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign thickness overwrites


ReDim Thickness(3)
For i = 0 To 3
Thickness(i) = 11
Next i
ret = SapModel.AreaObj.SetThickness("ALL", 2, "", 1,
Thickness, Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get thickness overwrites for area element


ret = SapModel.AreaElm.GetThickness("3", ThicknessType,
ThicknessPattern, ThicknessPatternSF, Thickness)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
Sap2000.AreaElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing area element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the area element local coordinate system to the global
coordinate system.

In the equation c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the element local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element transformation matrix


redim Value(8)
ret = SapModel.AreaElm.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
Sap2000.LineElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of line elements in the analysis model.
VBA Example
Sub CountLineElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign automesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, True, True,
2, 0, Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of line elements


Count = SapModel.LineElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEndLengthOffset
Syntax
SapObject.SapModel.LineElm.GetEndLengthOffset
VB6 Procedure
Function GetEndLengthOffset(ByVal Name As String, ByRef Length1 As
Double, ByRef Length2 As Double, ByRef rz As Double) As Long
Parameters
Name
The name of an existing line element.
Length1
The offset length along the 1-axis of the line element at the I-End of the line
element. [L]
Length2
The offset along the 1-axis of the line element at the J-End of the line element.
[L]
rz
The rigid zone factor. This is the fraction of the end offset length assumed to be
rigid for bending and shear deformations.
Remarks
This function retrieves the line element end offsets along the 1-axis of the
element.
The function returns zero if the offsets are successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetLineElmEndOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Length1 As Double
Dim Length2 As Double
Dim rz As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign offsets to frame object


ret = SapModel.FrameObj.SetEndLengthOffset("15", False, 12,
12, 0.5)

'assign frame object auto mesh options


ret = SapModel.FrameObj.SetAutoMesh("15", True, False,
False, 2, 0)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get offsets for line element


ret = SapModel.LineElm.GetEndLengthOffset("15-1", Length1,
Length2, rz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetInsertionPoint
Syntax
SapObject.SapModel.LineElm.GetInsertionPoint
VB6 Procedure
Function GetInsertionPoint(ByVal Name As String, ByRef Offset1() As Double,
ByRef Offset2() As Double) As Long
Parameters
Name
The name of an existing line element.
Offset1
This is an array of three joint offset distances, in the Global coordinate system,
at the I-End of the line element. [L]
Offset1(0) = I-End offset in the global X-axis direction
Offset1(1) = I-End offset in the global Y-axis direction
Offset1(2) = I-End offset in the global Z-axis direction
Offset2
This is an array of three joint offset distances, in the Global coordinate system,
at the J-End of the line element. [L]
Offset2(0) = J-End offset in the global X-axis direction
Offset2(1) = J-End offset in the global Y-axis direction
Offset2(2) = J-End offset in the global Z-axis direction
Remarks
This function retrieves line element insertion point assignments. The
assignments are reported as end joint offsets.
The function returns zero if the insertion point data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmInsertionPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim CardinalPoint As Long
Dim Mirror2 As Boolean
Dim StiffTransform As Boolean
Dim Offset1() As Double
Dim Offset2() As Double
Dim CSys As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object insertion point


ReDim Offset1(2)
ReDim Offset2(2)
For i=0 To 2
Offset1(i)=10 + i
Offset2(i)=20 + i
Next i
ret = SapModel.FrameObj.SetInsertionPoint("15", 7, False,
True, Offset1, Offset2)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element insertion point


ReDim Offset1(2)
ReDim Offset2(2)
ret = SapModel.LineElm.GetInsertionPoint("15-1", Offset1,
Offset2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadDeformation
Syntax
SapObject.SapModel.LineElm.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef LineName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef U1() As
Double, ByRef U2() As Double, ByRef U3() As Double, ByRef R1() As Double,
ByRef R2() As Double, ByRef R3() As Double, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of deformation loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a deformation load.
dof1 = U1
dof2 = U2
dof3 = U3
dof4 = R1
dof5 = R2
dof6 = R3
U1, U2, U3, R1, R2, R3
These are arrays of deformation load values. The deformations specified for a
given degree of freedom are applicable only if the corresponding DOF item for
that degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3
If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to line elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.FrameObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'assign frame object auto mesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, False,
False, 2, 0, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element deformation loads


ret = SapModel.LineElm.GetLoadDeformation("3-1",
NumberItems, LineName, LoadPat, dof1, dof2, dof3, dof4, dof5,
dof6, U1, U2, U3, R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDistributed
Syntax
SapObject.SapModel.LineElm.GetLoadDistributed
VB6 Procedure
Function GetLoadDistributed(ByVal Name As String, ByRef NumberItems As
Long, ByRef LineName() As String, ByRef LoadPat() As String, ByRef MyType()
As Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef RD1() As
Double, ByRef RD2() As Double, ByRef Dist1() As Double, ByRef Dist2() As
Double, ByRef Val1() As Double, ByRef Val2() As Double, Optional ByVal
ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of distributed loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
distributed load.
LoadPat
This is an array that includes the name of the coordinate system in which the
distributed loads are specified.
MyType
This is an array that includes either 1 or 2, indicating the type of distributed load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
distributed load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11, indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RD1
This is an array that includes the relative distance from the I-End of the line
element to the start of the distributed load.
RD2
This is an array that includes the relative distance from the I-End of the line
element to the end of the distributed load.
Dist1
This is an array that includes the actual distance from the I-End of the line
element to the start of the distributed load. [L]
Dist2
This is an array that includes the actual distance from the I-End of the line
element to the end of the distributed load. [L]
Val1
This is an array that includes the load value at the start of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
Val2
This is an array that includes the load value at the end of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the distributed load assignments to line elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim CSys() As String
Dim Dir() As Long
Dim RD1() As Double
Dim RD2() As Double
Dim Dist1() As Double
Dim Dist2() As Double
Dim Val1() As Double
Dim Val2() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object distributed loads


ret = SapModel.FrameObj.SetLoadDistributed("14", "DEAD", 1,
10, 0, 1, 0.08, 0.04)

'assign frame object auto mesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, False,
False, 2, 0, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element distributed loads


ret = SapModel.LineElm.GetLoadDistributed("14-1",
NumberItems, LineName, LoadPat, MyType, CSys, Dir, RD1, RD2,
Dist1, Dist2, Val1, Val2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
Syntax
SapObject.SapModel.LineElm.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef LineName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of gravity loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to line elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object gravity loads


ret = SapModel.FrameObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element gravity load


ret = SapModel.LineElm.GetLoadGravity("3-1", NumberItems,
LineName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPoint
Syntax
SapObject.SapModel.LineElm.GetLoadPoint
VB6 Procedure
Function GetLoadPoint(ByVal Name As String, ByRef NumberItems As Long,
ByRef LineName() As String, ByRef LoadPat() As String, ByRef MyType() As
Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef RelDist() As Double,
ByRef Dist() As Double, ByRef Val() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of point loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
point load.
LoadPat
This is an array that includes the name of the coordinate system in which the
point loads are specified.
MyType
This is an array that includes either 1 or 2, indicating the type of point load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
point load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11, indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RelDist
This is an array that includes the relative distance from the I-End of the line
element to the location where the point load is applied.
Dist
This is an array that includes the actual distance from the I-End of the line
element to the location where the point load is applied. [L]
Val
This is an array that includes the value of the point load. [F] when MyType is 1
and [FL] when MyType is 2
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the point load assignments to line elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmPointLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim CSys() As String
Dim Dir() As Long
Dim RelDist() As Double
Dim Dist() As Double
Dim Val() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object point loads


ret = SapModel.FrameObj.SetLoadPoint("14", "DEAD", 1, 10,
.5, 20)
ret = SapModel.FrameObj.SetLoadPoint("15", "DEAD", 1, 10,
.5, 20)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element point loads


ret = SapModel.LineElm.GetLoadPoint("ALL", NumberItems,
LineName, LoadPat, MyType, CSys, Dir, RelDist, Dist, Val,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
Syntax
SapObject.SapModel.LineElm.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef LineName() As String, ByRef LoadPat() As String, ByRef DOF() As
Long, ByRef Val() As Double, ByRef PatternName() As String, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of strain loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
DOF
This is an array that includes 1, 2, 3, 4, 5 or 6, indicating the degree of freedom
associated with each strain load.
1= Strain11
2= Strain12
3= Strain13
4= Curvature1
5= Curvature2
6= Curvature3
Val
This is an array that includes the strain value. [L/L] for DOF = 1, 2 and 3 and
[1/L] for DOF = 4, 5 and 6
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to line elements.
The function returns zero if the strain load assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim DOF() As Long
Dim Val() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object strain load


ret = SapModel.FrameObj.SetLoadStrain("1", "DEAD", 1, 0.001)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element strain load


ret = SapModel.LineElm.GetLoadStrain("1-1", NumberItems,
LineName, LoadPat, DOF, Val, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
Syntax
SapObject.SapModel.LineElm.GetLoadTargetForce
VB6 Procedure
Function GetLoadTargetForce(ByVal Name As String, ByRef NumberItems As
Long, ByRef LineName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef P() As
Double, ByRef V2() As Double, ByRef V3() As Double, ByRef T() As Double,
ByRef M2() As Double, ByRef M3() As Double, ByRef T1() As Double, ByRef
T2() As Double, ByRef T3() As Double, ByRef T4() As Double, ByRef T5() As
Double, ByRef T6() As Double, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of deformation loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
target force.
LoadPat
This is an array that includes the name of the load pattern associated with each
target force.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a target force assignment.
dof1 = P
dof2 = V2
dof3 = V3
dof4 = T
dof5 = M2
dof6 = M3
P, V2, V3, T, M2, M3
These are arrays of target force values. The target forces specified for a given
degree of freedom are only applicable if the corresponding DOF item for that
degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
T1, T2, T3, T4, T5, T6
These are arrays of the relative distances along the line elements where the
target force values apply. The relative distances specified for a given degree of
freedom are only applicable if the corresponding dofn item for that degree of
freedom is True.
T1 = relative location for P target force
T2 = relative location for V2 target force
T3 = relative location for V3 target force
T4 = relative location for T target force
T5 = relative location for M2 target force
T6 = relative location for M3 target force
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the target force assignments to line elements.
The function returns zero if the target force assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double
Dim T1() As Double
Dim T2() As Double
Dim T3() As Double
Dim T4() As Double
Dim T5() As Double
Dim T6() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 0.4
ret = SapModel.FrameObj.SetLoadTargetForce("1", "DEAD", DOF,
f, RD)

'assign frame object auto mesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, False,
False, 2, 0, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element target force


ret = SapModel.LineElm.GetLoadTargetForce("1-1",
NumberItems, LineName, LoadPat, dof1, dof2, dof3, dof4, dof5,
dof6, P, V2, V3, T, M2, M3, T1, T2, T3, T4, T5, T6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
Syntax
SapObject.SapModel.LineElm.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef LineName() As String, ByRef LoadPat() As String, ByRef MyType()
As Long, ByRef Val() As Double, ByRef PatternName() As String, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing line object, line element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of temperature loads retrieved for the specified line elements.
LineName
This is an array that includes the name of the line element associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
MyType
This is an array that includes 1, 2 or 3, indicating the type of temperature load.
1 = Temperature
2 = Temperature gradient along local 2 axis
3 = Temperature gradient along local 3 axis
Val
This is an array that includes the temperature load value. [T] for MyType= 1 and
[T/L] for MyType= 2 and 3
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the line elements
corresponding to the line object specified by the Name item.
If this item is Element, the load assignments are retrieved for the line element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the line elements
corresponding to all line objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for line elements
corresponding to all selected line objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to line elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LineName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Val() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame object temperature load


ret = SapModel.FrameObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element temperature load


ret = SapModel.LineElm.GetLoadTemperature("ALL",
NumberItems, LineName, LoadPat, MyType, Val, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.LineElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double) As Long
Parameters
Name
The name of an existing line element.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation. The rotation for a positive angle appears
counterclockwise when the local +1 axis is pointing toward you. [deg]
Remarks
This function retrieves the local axis angle assignment for line elements.
The function returns zero if the assignment is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetLineElmLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign frame object local axis angle


ret = SapModel.FrameObj.SetLocalAxes("1", 30)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element local axis angle


ret = SapModel.LineElm.GetLocalAxes("1-1", Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMaterialOverwrite
Syntax
SapObject.SapModel.LineElm.GetMaterialOverwrite
VB6 Procedure
Function GetMaterialOverwrite(ByVal Name As String, ByRef PropName As
String) As Long
Parameters
Name
The name of a defined line element.
PropName
This is None, indicating that no material overwrite exists for the specified line
element, or it is the name of an existing material property.
Remarks
This function retrieves the material overwrite assigned to a line element, if any. It
returns None if there is no material overwrite assignment.
The function returns zero if the material overwrite assignment is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign material overwrite to frame object


ret = SapModel.FrameObj.SetMaterialOverwrite("1", "4000Psi")

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material overwrite assignment for line element


ret = SapModel.LineElm.GetMaterialOverwrite("1-1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
Syntax
SapObject.SapModel.LineElm.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing line element.
Temp
This is the material temperature value assigned to the line element. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the line element is uniform along the element at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the line element may vary from one end to the other. The material
temperature at each end of the element is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the line element.
Remarks
This function retrieves the material temperature assignments to line elements.
The function returns zero if the material temperature assignments are
successfully retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign material temperature to frame objects


ret = SapModel.FrameObj.SetMatTemp("ALL", 50, , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material temperature for line element


ret = SapModel.LineElm.GetMatTemp("1-1", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
Syntax
SapObject.SapModel.LineElm.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing line element.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function retrieves the section modifier assignment for line elements. The
default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers to frame objects


ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.FrameObj.SetModifiers("3", Value)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get modifiers for line element


ReDim Value(7)
ret = SapModel.LineElm.GetModifiers("3-1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.LineElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of line element names retrieved by the program.
MyName
This is a one-dimensional array of line element names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String
The array is dimensioned to (NumberNames 1) inside the Sap2000
program, filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined line elements.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetLineElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element names


ret = SapModel.LineElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
Sap2000.LineElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String, ByRef ObjType As
Long, ByRef RDI As Double, RDJ As Double) As Long
Parameters
Name
The name of an existing line element.
Obj
The name of the frame, cable or tendon object from which the line element was
created.
ObjType
This is 0, 1, 2 or 3, indicating the type of object from which the line element was
created.
0= Straight frame object
1= Curved frame object
2= Cable object
3= Tendon object
RDI
The relative distance from the I-End of the object identified by the Obj item to the
I-End of the considered line element. The relative distance is calculated as the
distance from the I-End of the object to the I-End of the line element divided by
the length of the object.
RDJ
The relative distance from the I-End of the object identified by the Obj item to the
J-End of the considered line element. The relative distance is calculated as the
distance from the I-End of the object to the J-End of the line element divided by
the length of the object.
Remarks
This function retrieves information about the object from which a line element
was created.
The function returns zero if the information is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetObjForLineElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long
Dim RDI As Double
Dim RDJ As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign auto mesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, True, True,
2, 0, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object information for a line element


ret = SapModel.LineElm.GetObj("3-1", Obj, ObjType, RDI, RDJ)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPDeltaForce
Syntax
SapObject.SapModel.LineElm.GetPDeltaForce
VB6 Procedure
Function GetPDeltaForce(ByVal Name As String, ByRef NumberForces As
Long, ByRef PDeltaForce() As Double, ByRef Dir() As Long, ByRef CSys() As
String) As Long
Parameters
Name
The name of an existing line element.
NumberForces
The number of P-Delta forces assigned to the line element.
PDeltaForce
This is an array of the P-Delta force values assigned to the line element. [F]
Dir
This is an array that contains 0, 1, 2 or 3, indicating the direction of each P-
Delta force assignment.
0= Frame object local 1-axis direction
1= Projected X direction in CSys coordinate system
2= Projected Y direction in CSys coordinate system
3= Projected Z direction in CSys coordinate system
CSys
This is an array that contains the name of the coordinate system in which each
projected P-Delta force is defined. This item is blank when the Dir item is zero,
that is, when the P-Delta force is defined in the line element local 1-axis
direction.
Remarks
This function retrieves the P-Delta force assignments to line elements.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmPDeltaForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberForces As Long
Dim PDeltaForce() As Double
Dim Dir() As Long
Dim CSys() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign P-Delta force to frame object


ret = SapModel.FrameObj.SetPDeltaForce("ALL", 100, 0, True,
, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get P-Delta force for line element


ret = SapModel.LineElm.GetPDeltaForce("3-1", NumberForces,
PDeltaForce, Dir, CSys)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.LineElm.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined line element.
Point1
The name of the point element at the I-End of the specified line element.
Point2
The name of the point element at the J-End of the specified line element.
Remarks
This function retrieves the names of the point elements at each end of a
specified line element.
The function returns zero if the point names are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point1 As String
Dim Point2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get names of points


ret = SapModel.LineElm.GetPoints("1-1", Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.LineElm.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String,
ByRef ObjType As Long, ByRef Var As Boolean, ByRef sVarRelStartLoc As
Double, sVarTotalLength As Double) As Long
Parameters
Name
The name of an existing line element.
PropName
The name of the frame section, cable or tendon property assigned to the line
element.
ObjType
This is 0, 1, 2 or 3, indicating the type of object from which the line element was
created.
0= Straight frame object
1= Curved frame object
2= Cable object
3= Tendon object
Var
This item is True if the specified property is a nonprismatic (variable) frame
section property.
sVarTotalLength
This is the total assumed length of the nonprismatic section. A zero value for this
item means that the section length is the same as the line element length.
sVarRelStartLoc
This is the relative distance along the nonprismatic section to the I-End (start) of
the line element. This item is ignored when the sVarTotalLengthitem is 0.
Remarks
This function retrieves the property assignment to a line element.
The function returns zero if the property data is successfully retrieved, otherwise
it returns a nonzero value.
The sVarTotalLength and sVarRelStartLoc items apply only when the Var item is
True.
VBA Example
Sub GetLineElementProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim ObjType As Long
Dim Var As Boolean
Dim sVarRelStartLoc As Double
Dim sVarTotalLength As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get property information for a line element


ret = SapModel.LineElm.GetProperty("3-1", PropName, ObjType,
Var, sVarRelStartLoc, sVarTotalLength)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetReleases
Syntax
SapObject.SapModel.LineElm.GetReleases
VB6 Procedure
Function GetReleases(ByVal Name As String, ByRef ii() As Boolean, ByRef jj()
As Boolean, ByRef StartValue() As Double, ByRef EndValue() As Double) As
Long
Parameters
Name
The name of an existing line element.
ii, jj
These are arrays of six booleans indicating the I-End and J-End releases for the
line element.
ii(0) and jj(0) = U1 release
ii(1) and jj(1) = U2 release
ii(2) and jj(2) = U3 release
ii(3) and jj(3) = R1 release
ii(4) and jj(4) = R2 release
ii(5) and jj(5) = R3 release

StartValue, EndValue
These are arrays of six values indicating the I-End and J-End partial fixity
springs for the line element.
StartValue(0) and EndValue(0) = U1 partial fixity [F/L]
StartValue(1) and EndValue(1) = U2 partial fixity [F/L]
StartValue(2) and EndValue(2) = U3 partial fixity [F/L]
StartValue(3) and EndValue(3) = R1 partial fixity [FL/rad]
StartValue(4) and EndValue(4) = R2 partial fixity [FL/rad]
StartValue(5) and EndValue(5) = R3 partial fixity [FL/rad]
Remarks
This function retrieves the line element end release and partial fixity
assignments.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElmEndReleases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign end releases to frame object


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(5) = True
jj(5) = True
ret = SapModel.FrameObj.SetReleases("13", ii, jj,
StartValue, EndValue)

'assign frame object automesh options


ret = SapModel.FrameObj.SetAutoMesh("13", True, False,
False, 2, 0)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel
'get end releases for line element
ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ret = SapModel.LineElm.GetReleases("13-1", ii, jj,
StartValue, EndValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTCLimits
Syntax
SapObject.SapModel.LineElm.GetTCLimits
VB6 Procedure
Function GetTCLimits(ByVal Name As String, ByRef LimitCompressionExists
As Boolean, ByRef LimitCompression As Double, ByRef LimitTensionExists As
Boolean, ByRef LimitTension As Double) As Long
Parameters
Name
The name of an existing line element.
LimitCompressionExists
This item is True if a compression force limit exists for the line element.
LimitCompression
The compression force limit for the line element. [F]
LimitTensionExists
This item is True if a tension force limit exists for the line element.
LimitTension
The tension force limit for the line element. [F]
Remarks
This function retrieves the tension/compression force limit assignments to line
elements.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
Note that the tension and compression limits are only used in nonlinear
analyses.
VBA Example
Sub GetLineElmTCLimits()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim LimitCompressionExists As Boolean
Dim LimitCompression As Double
Dim LimitTensionExists As Boolean
Dim LimitTension As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign tension/compression limits to frame object


ret = SapModel.FrameObj.SetTCLimits("1", True, -200, True,
30)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get tension/compression limits for line element


ret = SapModel.LineElm.GetTCLimits("1-1",
LimitCompressionExists, LimitCompression, LimitTensionExists,
LimitTension)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
Sap2000.LineElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing line element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the line element local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the element local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLineElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame local axis angle


ret = SapModel.FrameObj.SetLocalAxes("3", 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element transformation matrix


ReDim Value(8)
ret = SapModel.LineElm.GetTransformationMatrix("3-1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
Sap2000.LinkElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of link elements in the analysis model.
VBA Example
Sub CountLinkElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of link elements


Count = SapModel.LinkElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadDeformation
Syntax
SapObject.SapModel.LinkElm.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef LinkName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef U1() As
Double, ByRef U2() As Double, ByRef U3() As Double, ByRef R1() As Double,
ByRef R2() As Double, ByRef R3() As Double, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing link object, link element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of deformation loads retrieved for the specified link elements.
LinkName
This is an array that includes the name of the link element associated with each
deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values, indicating if the considered degree of
freedom has a deformation load.
dof1 = U1
dof2 = U2
dof3 = U3
dof4 = R1
dof5 = R2
dof6 = R3
U1, U2, U3, R1, R2, R3
These are arrays of deformation load values. The deformations specified for a
given degree of freedom are applicable only if the corresponding DOF item for
that degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3
If this item is ObjectElm, the load assignments are retrieved for the link elements
corresponding to the link object specified by the Name item.
If this item is Element, the load assignments are retrieved for the link element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the link elements
corresponding to all link objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for link elements
corresponding to all selected link objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to link elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkElmDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'assign link object deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.LinkObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element deformation loads


ret = SapModel.LinkElm.GetLoadDeformation("ALL",
NumberItems, LinkName, LoadPat, dof1, dof2, dof3, dof4, dof5,
dof6, U1, U2, U3, R1, R2, R3, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
Syntax
SapObject.SapModel.LinkElm.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef LinkName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object, link element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of gravity loads retrieved for the specified link elements.
LinkName
This is an array that includes the name of the link element associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the link elements
corresponding to the link object specified by the Name item.
If this item is Element, the load assignments are retrieved for the link element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the link elements
corresponding to all link objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for link elements
corresponding to all selected link objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to link elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkElmGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'assign link object gravity loads


ret = SapModel.LinkObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element gravity load


ret = SapModel.LinkElm.GetLoadGravity("ALL", NumberItems,
LinkName, LoadPat, CSys, x, y, z, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
Syntax
SapObject.SapModel.LinkElm.GetLoadTargetForce
VB6 Procedure
Function GetLoadTargetForce(ByVal Name As String, ByRef NumberItems As
Long, ByRef LinkName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef P() As
Double, ByRef V2() As Double, ByRef V3() As Double, ByRef T() As Double,
ByRef M2() As Double, ByRef M3() As Double, ByRef T1() As Double, ByRef
T2() As Double, ByRef T3() As Double, ByRef T4() As Double, ByRef T5() As
Double, ByRef T6() As Double, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing link object, link element or group of objects, depending
on the value of the ItemTypeElm item.
NumberItems
The total number of deformation loads retrieved for the specified link elements.
LinkName
This is an array that includes the name of the link element associated with each
target force.
LoadPat
This is an array that includes the name of the load pattern associated with each
target force.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a target force assignment.
dof1 = P
dof2 = V2
dof3 = V3
dof4 = T
dof5 = M2
dof6 = M3
P, V2, V3, T, M2, M3
These are arrays of target force values. The target forces specified for a given
degree of freedom are applicable only if the corresponding DOF item for that
degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
T1, T2, T3, T4, T5, T6
These are arrays of the relative distances along the link elements where the
target force values apply. The relative distances specified for a given degree of
freedom are applicable only if the corresponding dofn item for that degree of
freedom is True.
T1 = relative location for P target force
T2 = relative location for V2 target force
T3 = relative location for V3 target force
T4 = relative location for T target force
T5 = relative location for M2 target force
T6 = relative location for M3 target force
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the link elements
corresponding to the link object specified by the Name item.
If this item is Element, the load assignments are retrieved for the link element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the link elements
corresponding to all link objects included in the group specified by the Name
item.
If this item is SelectionElm, the load assignments are retrieved for link elements
corresponding to all selected link objects, and the Name item is ignored.
Remarks
This function retrieves the target force assignments to link elements.
The function returns zero if the target force assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetLinkElmTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double
Dim T1() As Double
Dim T2() As Double
Dim T3() As Double
Dim T4() As Double
Dim T5() As Double
Dim T6() As Double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'assign link object target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 0.4
ret = SapModel.LinkObj.SetLoadTargetForce("ALL", "DEAD",
DOF, f, RD, Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element target force


ret = SapModel.LinkElm.GetLoadTargetForce("ALL",
NumberItems, LinkName, LoadPat, dof1, dof2, dof3, dof4, dof5,
dof6, P, V2, V3, T, M2, M3, T1, T2, T3, T4, T5, T6, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.LinkElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double) As Long
Parameters
Name
The name of an existing link element.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +1 axis is pointing toward you. [deg]
Remarks
This function retrieves the local axis angle assignment for link elements.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkElmLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Ang As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'refresh view
ret = SapModel.View.RefreshView

'assign link object local axis angle


ret = SapModel.LinkObj.SetLocalAxes(Name, 30)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element local axis angle


ret = SapModel.LinkElm.GetLocalAxes(Name, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.LinkElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of link element names retrieved by the program.
MyName
This is a one-dimensional array of link element names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined link elements.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetLinkElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element names


ret = SapModel.LinkElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
Sap2000.LinkElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String, ByRef ObjType As
Long) As Long
Parameters
Name
The name of an existing link element.
Obj
The name of the object associated with the specified link element. The type of
object or item is determined from the ObjType variable.
ObjType
A number indicating the type of object that is associated with the point element.
2
Obj is a line object that is has a line spring assignment. The springs are modeled
using link elements.

3
Obj is a area object that is has an area spring assignment. The springs are
modeled using link elements.

6
Obj is a solid object that is has a surface spring assignment. The springs are
modeled using link elements.

9
Obj is a point object that has a panel zone assignment. The specified link element
is internally added by the program at the point object (panel zone) location to
model the panel zone.
Remarks
This function retrieves the object associated with a specified link element.
The function returns zero if the object is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetObjForLinkElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign springs to frame


ReDim Vec(2)
ret = SapModel.FrameObj.SetSpring("8", 1, 1, 1, "", 1, 2, 0,
Vec, 0, False, "Local")

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object for link element


ret = SapModel.LinkElm.GetObj("~1", Obj, ObjType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.LinkElm.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined link element.
Point1
The name of the point element at the I-End of the specified link element.
Point2
The name of the point element at the J-End of the specified link element.
Remarks
This function retrieves the names of the point elements at each end of a
specified link element. The points at each end have the same name if the link
element is a one-joint element.
The function returns zero if the point names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkElmPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Point1 As String
Dim Point2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'refresh view
ret = SapModel.View.RefreshView

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get names of points


ret = SapModel.LinkElm.GetPoints(Name, Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.LinkElm.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of an existing link element.
PropName
The name of the link property assigned to the link element.
Remarks
This function retrieves the property assignment to a link element.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
The sVarTotalLength and sVarRelStartLoc items apply only when the Var item is
True.
VBA Example
Sub GetLinkElementProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'refresh view
ret = SapModel.View.RefreshView

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get property for link element


ret = SapModel.LinkElm.GetProperty(Name, PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPropertyFD
Syntax
SapObject.SapModel.LinkElm.GetPropertyFD
VB6 Procedure
Function GetPropertyFD(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of an existing link element.
PropName
The name of the frequency dependent link property assigned to the link element.
Remarks
This function retrieves the frequency dependent property assignment to a link
element. If no frequency dependent property is assigned to the link, the
PropName is returned as None.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkElementFDProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-012.sdb")

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get frequency dependent property for link element


ret = SapModel.LinkElm.GetPropertyFD("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
Sap2000.LinkElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing link element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the link element local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the element local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'refresh view
ret = SapModel.View.RefreshView

'assign link local axis angle


ret = SapModel.LinkObj.SetLocalAxes(Name, 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element transformation matrix


ReDim Value(8)
ret = SapModel.LinkElm.GetTransformationMatrix(Name, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
Sap2000.PlaneElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of plane elements in the analysis model.
VBA Example
Sub CountPlaneElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 2, 2, , , , , ,
, , , , , , , , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of plane elements


Count = SapModel.PlaneElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadGravity
Syntax
SapObject.SapModel.PlaneElm.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified plane elements.
PlaneName
This is an array that includes the name of the plane element associated with
each gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the gravity load assignments to plane elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'assign area object gravity loads


ret = SapModel.AreaObj.SetLoadGravity("ALL", "Membrane", 0,
0, -1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element gravity load


ret = SapModel.PlaneElm.GetLoadGravity("3-1", NumberItems,
PlaneName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
Syntax
SapObject.SapModel.PlaneElm.GetLoadPorePressure
VB6 Procedure
Function GetLoadPorePressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of pore pressure loads retrieved for the specified plane
elements.
PlaneName
This is an array that includes the name of the plane element associated with
each pore pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
pore pressure load.
Value
This is an array that includes the pore pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
pore pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the pore pressure load assignments to plane elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object pore pressure load


ret = SapModel.AreaObj.SetLoadPorePressure("ALL",
"Membrane", .1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element pore pressure load


ret = SapModel.PlaneElm.GetLoadPorePressure("ALL",
NumberItems, PlaneName, LoadPat, Value, PatternName, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadRotate
Syntax
SapObject.SapModel.PlaneElm.GetLoadRotate
VB6 Procedure
Function GetLoadRotate(ByVal Name As String, ByRef NumberItems As Long,
ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef Value() As
Double, ByRef PatternName() As String, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of rotate loads retrieved for the specified plane elements.
PlaneName
This is an array that includes the name of the plane element associated with
each rotate load.
LoadPat
This is an array that includes the name of the load pattern associated with each
rotate load.
Value
This is an array that includes the rotate load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
rotate load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the rotate load assignments to plane elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementRotateLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 4-001-
incomp.sdb")

'assign area object rotate load


ret = SapModel.AreaObj.SetLoadRotate("ALL", "FTG", 30, ,
Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element rotate load


ret = SapModel.PlaneElm.GetLoadRotate("ALL", NumberItems,
PlaneName, LoadPat, Value, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
Syntax
SapObject.SapModel.PlaneElm.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef Component()
As Long, ByRef Value() As Double, ByRef PatternName() As String, Optional
ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified plane elements.
PlaneName
This is an array that includes the name of the plane element associated with
each strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Component
This is an array that includes 1, 2, 3, 4 or 5, indicating the component
associated with each strain load.
1= Strain11
2= Strain22
3= Strain12
4= Strain13
5= Strain23
Value
This is an array that includes the strain value. [L/L]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the strain load assignments to plane elements.
The function returns zero if the strain load assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim Component() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object strain load


ret = SapModel.AreaObj.SetLoadStrain("ALL", "Membrane", 1,
0.001, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element strain load


ret = SapModel.PlaneElm.GetLoadStrain("3", NumberItems,
PlaneName, LoadPat, Component, Value, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
Syntax
SapObject.SapModel.PlaneElm.GetLoadSurfacePressure
VB6 Procedure
Function GetLoadSurfacePressure(ByVal Name As String, ByRef NumberItems
As Long, ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef
Face() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of surface pressure loads retrieved for the specified plane
elements.
PlaneName
This is an array that includes the name of the plane element associated with
each surface pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
surface pressure load.
Face
This is an array that includes -1, -2 or a nonzero, positive integer, indicating the
area element face to which the specified load assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from plane element point n to plane element point n + 1.
For example, edge face 2 is from plane element point 2 to plane element point 3.
Value
This is an array that includes the surface pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
surface pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the surface pressure load assignments to plane
elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim Face() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object surface pressure load


ret = SapModel.AreaObj.SetLoadSurfacePressure("ALL",
"Membrane", -1, .1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element surface pressure load


ret = SapModel.PlaneElm.GetLoadSurfacePressure("ALL",
NumberItems, PlaneName, LoadPat, Face, Value, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
Syntax
SapObject.SapModel.PlaneElm.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified plane
elements.
PlaneName
This is an array that includes the name of the plane element associated with
each temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
MyType
This is an array that includes either 1 or 3, indicating the type of temperature
load.
1 = Temperature
3 = Temperature gradient along local 3 axis
Value
This is an array that includes the temperature load value. [T] for MyType= 1 and
[T/L] for MyType= 3
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the temperature load assignments to plane elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object temperature load


ret = SapModel.AreaObj.SetLoadTemperature("All", "Membrane",
1, 50, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element temperature load


ret = SapModel.PlaneElm.GetLoadTemperature("ALL",
NumberItems, PlaneName, LoadPat, MyType, Value, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniform
Syntax
SapObject.SapModel.PlaneElm.GetLoadUniform
VB6 Procedure
Function GetLoadUniform(ByVal Name As String, ByRef NumberItems As Long,
ByRef PlaneName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef Dir() As Long, ByRef Value() As Double, Optional ByVal
ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing plane element or group, depending on the value of the
ItemType item.
NumberItems
The total number of uniform loads retrieved for the specified plane elements.
PlaneName
This is an array that includes the name of the plane element associated with
each uniform load.
LoadPat
This is an array that includes the name of the coordinate system in which the
uniform load is specified.
CSys
This is an array that includes the name of the coordinate system associated with
each uniform load.
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (applies only when CSys is Local)
2 = Local 2 axis (applies only when CSys is Local)
3 = Local 3 axis (applies only when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (applies only when CSys is Global)
11 = Projected Gravity direction (applies only when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Value
The uniform load value. [F/L2]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the plane
elements corresponding to the area object specified by the Name item.
If this item is Element, the load assignments are retrieved for the plane element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the plane
elements corresponding to all area objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for plane
elements corresponding to all selected area objects, and the Name item is
ignored.
Remarks
This function retrieves the uniform load assignments to plane elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementUniformLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PlaneName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim Dir() As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object uniform loads


ret = SapModel.AreaObj.SetLoadUniform("ALL", "Membrane",
-0.01, 2, False, "Local", Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element uniform load


ret = SapModel.PlaneElm.GetLoadUniform("3", NumberItems,
PlaneName, LoadPat, CSys, Dir, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.PlaneElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double) As Long
Parameters
Name
The name of an existing plane element.
Ang
This is the angle that the local 1 and 2 axes are rotated about the positive local 3
axis from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +3 axis is pointing toward you. [deg]
Remarks
This function retrieves the local axis angle assignment for plane elements.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetPlaneElementLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element local axis angle


ret = SapModel.PlaneElm.GetLocalAxes("3", Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
Syntax
SapObject.SapModel.PlaneElm.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing plane element.
Temp
This is the material temperature value assigned to the plane element. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the plane element is uniform over the element at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the plane element may vary. The material temperature at each corner point
around the plane element perimeter is equal to the specified temperature
multiplied by the pattern value at the associated point element. The material
temperature at other points in the plane element is calculated by interpolation
from the corner points.
Remarks
This function retrieves the material temperature assignments to plane elements.
The function returns zero if the material temperature assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign material temperature


ret = SapModel.AreaObj.SetMatTemp("ALL", 50, , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material temperature for plane element


ret = SapModel.PlaneElm.GetMatTemp("3", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.PlaneElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of plane element names retrieved by the program.
MyName
This is a one-dimensional array of plane element names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined plane elements.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetPlaneElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element names


ret = SapModel.PlaneElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
Sap2000.PlaneElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String) As Long
Parameters
Name
The name of an existing plane element.
Obj
The name of the area object from which the plane element was created.
Remarks
This function retrieves the name of the area object from which an plane element
was created.
The function returns zero if the information is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetObjForPlaneElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long
Dim RDI As Double
Dim RDJ As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object information for an plane element


ret = SapModel.PlaneElm.GetObj("3-2", Obj)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.PlaneElm.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef NumberPoints As Long,
ByRef Point() As String) As Long
Parameters
Name
The name of an plane element.
NumberPoints
The number of point elements that define the plane element.
Point
This is an array containing the names of the point elements that define the plane
element. The point names are in order around the plane element.
Remarks
This function retrieves the names of the point elements that define an plane
element.
The function returns zero if the point element names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElmPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get names of points


ret = SapModel.PlaneElm.GetPoints("3-2", NumberPoints,
Point)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.PlaneElm.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined plane element.
PropName
The name of the area property assigned to the plane element. This item is None
if there is no area property assigned to the plane element.
Remarks
This function retrieves the area property assigned to an plane element.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetPlaneElementProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area property for plane element


ret = SapModel.PlaneElm.GetProperty("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
Sap2000.PlaneElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing plane element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the plane element local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the element local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPlaneElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get plane element transformation matrix


redim Value(8)
ret = SapModel.PlaneElm.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.PointElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of point elements in the analysis model.
VBA Example
Sub CountPointElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of point elements


Count = SapModel.PointElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
CountConstraint
Syntax
SapObject.SapModel.PointElm.CountConstraint
VB6 Procedure
Function CountConstraint(ByRef Count As Long, Optional ByVal Name As String
= "") As Long
Parameters
Count
The number of counted constraints.
Name
This optional item is the name of an existing point element.
Remarks
If the Name item is provided, the Count item returns the total number of
constraint assignments made to the specified point element. If the Name item is
not specified or is specified as an empty string, the Count item returns the total
number of constraint assignments to all point elements in the model. If the Name
item is specified but it is not recognized by the program as a valid point element,
an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountConstraintElmAssignments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add constraint definition


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'make constraint assignment


ret = SapModel.PointObj.SetConstraint("3", "Diaph1")

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get number of constraint assignments to point elements


ret = SapModel.PointElm.CountConstraint(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetConstraint
CountLoadDispl
Syntax
SapObject.SapModel.PointElm.CountLoadDispl
VB6 Procedure
Function CountLoadDispl(ByRef Count As Long, Optional ByVal Name As String
= "", Optional ByVal LoadPat As String = "") As Long
Parameters
Count
The number of counted ground displacement loads.
Name
This optional item is the name of an existing point element.
LoadPat
This optional item is the name of an existing load pattern.
Remarks
If neither the Name item nor the LoadPat item is provided, the Count item
returns the total number of ground displacement load assignments to point
elements in the model.
If the Name item is provided but not the LoadPat item, the Count item returns the
total number of ground displacement load assignments made for the specified
point element.
If the Name item is not provided but the LoadPat item is specified, the Count
item returns the total number of ground displacement load assignments made to
all point elements for the specified load pattern.
If both the Name item and the LoadPat item are provided, the Count item returns
the total number of ground displacement load assignments made to the specified
point element for the specified load pattern.
If the Name item or the LoadPat item is provided but is not recognized by the
program as valid, an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountGroundDisplacementElmLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get number of ground displacement loads for point elements


ret = SapModel.PointElm.CountLoadDispl(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDispl
CountLoadForce
Syntax
SapObject.SapModel.PointElm.CountLoadForce
VB6 Procedure
Function CountLoadForce(ByRef Count As Long, Optional ByVal Name As
String = "", Optional ByVal LoadPat As String = "") As Long
Parameters
Count
The number of counted point loads.
Name
This optional item is the name of an existing point element.
LoadPat
This optional item is the name of an existing load pattern.
Remarks
If neither the Name item nor the LoadPat item is provided, the Count item
returns the total number of point load assignments to point elements in the
model.
If the Name item is provided but not the LoadPat item, the Count item returns the
total number of point load assignments made for the specified point element.
If the Name item is not provided but the LoadPat item is specified, the Count
item returns the total number of point load assignments made to all point
elements for the specified load pattern.
If both the Name item and the LoadPat item are provided, the Count item returns
the total number of point load assignments made to the specified point element
for the specified load pattern.
If the Name item or the LoadPat item is provided but is not recognized by the
program as valid, an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountPointElmLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add point load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("3", "DEAD", Value)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get number of point loads assigned to point elements


ret = SapModel.PointElm.CountLoadForce(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForce
CountRestraint
Syntax
SapObject.SapModel.PointElm.CountRestraint
VB6 Procedure
Function CountRestraint() As Long
Parameters
None
Remarks
This function returns the total number of point elements in the model with
restraint assignments.
VBA Example
Sub CountRestrainedPointElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get number of restrained point elements


Count = SapModel.PointElm.CountRestraint

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRestraint
CountSpring
Syntax
SapObject.SapModel.PointElm.CountSpring
VB6 Procedure
Function CountSpring() As Long
Parameters
None
Remarks
This function returns the total number of point elements in the model with spring
assignments.
VBA Example
Sub CountPointElementsWithSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim i as Long
Dim k() as Double
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint spring assignment


ReDim k(5)
For i = 0 to 5
k(i) = i + 1
Next i
ret = SapModel.PointObj.SetSpring("3", k)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get number of point elements with springs


Count = SapModel.PointElm.CountSpring

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
GetConnectivity
Syntax
SapObject.SapModel.PointElm.GetConnectivity
VB6 Procedure
Function GetConnectivity(ByVal Name As String, ByRef NumberItems As Long,
ByRef ObjectType() As Long, ByRef ObjectName() As String, ByRef
PointNumber() As Long) As Long
Parameters
Name
The name of an existing point element.
NumberItems
This is the total number of elements connected to the specified point element.
ObjectType
This is an array that includes the element type of each element connected to the
specified point element.
2= Frame element
3= Cable element
4= Tendon element
5= Area element
6= Solid element
7 = Link element
ObjectName
This is an array that includes the element name of each element connected to
the specified point element.
PointNumber
This is an array that includes the point number within the considered element that
corresponds to the specified point element.
Remarks
This function returns a list of elements connected to a specified point element.
The function returns zero if the list is successfully filled; otherwise it returns
nonzero.
VBA Example
Sub GetPointElementConnectivity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems as Long
Dim ObjectType() As Long
Dim ObjectName() As String
Dim PointNumber() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get elements connected to point element 11


ret = SapModel.PointElm.GetConnectivity("11", NumberItems,
ObjectType, ObjectName, PointNumber)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetConstraint
Syntax
SapObject.SapModel.PointElm.GetConstraint
VB6 Procedure
Function GetConstraint(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef ConstraintName() As String, Optional
ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects,
depending on the value of the ItemTypeElm item.
NumberItems
This is the total number of constraint assignments returned.
PointName
This is an array that includes the name of the point element to which the
specified constraint assignment applies.
ConstraintName
This is an array that includes the name of the constraint that is assigned to the
point element specified by the PointName item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the constraint assignments are retrieved for the point
element corresponding to the point object specified by the Name item.
If this item is Element, the constraint assignments are retrieved for the point
element specified by the Name item.
If this item is GroupElm, the constraint assignments are retrieved for all point
elements directly or indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the constraint assignments are retrieved for all point
elements directly or indirectly selected, and the Name item is ignored.
See Item Type for Elements for more information.
Remarks
This function returns a list of constraint assignments made to one or more
specified point elements.
The function returns zero if the constraint name list is successfully filled,
otherwise it returns nonzero.
The PointName and ConstraintName items are returned in one-dimensional
arrays. Each array is created as a dynamic array by the API user. In VBA a
dynamic string array is defined by:
Dim PointName() as String

The arrays are dimensioned to (NumberItems 1) inside the Sap2000 program,


filled with values, and returned to the API user.
The arrays are zero-based. Thus the first item is at array index 0, and the last
item is at array index (NumberItems - 1).
VBA Example
Sub GetConstraintElmAssignments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems as Long
Dim PointName() As String
Dim ConstraintName() As String
Dim i As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define a new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'define new constraint assignments


For i = 4 To 16 Step 4
ret = SapModel.PointObj.SetConstraint(Format(i),
"Diaph1")
Next i

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get constraint assignments to point elements


ret = SapModel.PointElm.GetConstraint("ALL", NumberItems,
PointName, ConstraintName, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
Syntax
SapObject.SapModel.PointElm.GetCoordCartesian
VB6 Procedure
Function GetCoordCartesian(ByVal Name As String, ByRef x As Double, ByRef
y As Double, ByRef z As Double, Optional ByVal CSys As String = "Global") As
Long
Parameters
Name
The name of an existing point element.
x
The X-coordinate of the specified point element in the specified coordinate
system. [L]
y
The Y-coordinate of the specified point element in the specified coordinate
system. [L]
z
The Z-coordinate of the specified point element in the specified coordinate
system. [L]
CSys
The name of the coordinate system in which the joint coordinates are returned.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise
it returns nonzero. If successful, the function returns the x, y and z coordinates
of the specified point element in the Present Units. The coordinates are reported
in the coordinate system specified by CSys.
VBA Example
Sub GetPointElmCoordCartesian()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim x As Double, y As Double, z As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get cartesian point element coordinates


ret = SapModel.PointElm.GetCoordCartesian("5", x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCylindrical
GetCoordSpherical
GetCoordCylindrical
Syntax
SapObject.SapModel.PointElm.GetCoordCylindrical
VB6 Procedure
Function GetCoordCylindrical(ByVal Name As String, ByRef r As Double, ByRef
Theta As Double, ByRef z As Double, Optional ByVal CSys As String = "Global")
As Long
Parameters
Name
The name of an existing point element.
r
The radius for the point element in the specified coordinate system. [L]
Theta
The angle for the specified point element in the specified coordinate system.
The angle is measured in the XY plane from the positive X axis. When looking in
the XY plane with the positive Z axis pointing toward you, a positive Theta angle
is counter clockwise. [deg]
z
The Z-coordinate of the specified point element in the specified coordinate
system. [L]
CSys
The name of the coordinate system in which the joint coordinates are returned.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise
it returns nonzero. If successful, the function returns the r, Theta and z
coordinates of the specified point element in the Present Units. The coordinates
are reported in the coordinate system specified by CSys.
VBA Example
Sub GetPointElmCoordCylindrical()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, Theta As Double, z As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get cylindrical point element coordinates


ret = SapModel.PointElm.GetCoordCylindrical("5", r, Theta,
z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
GetCoordSpherical
GetCoordSpherical
Syntax
SapObject.SapModel.PointElm.GetCoordSpherical
VB6 Procedure
Function GetCoordSpherical(ByVal Name As String, ByRef r As Double, ByRef
a As Double, ByRef b As Double, Optional ByVal CSys As String = "Global") As
Long
Parameters
Name
The name of an existing point element.
r
The radius for the point element in the specified coordinate system. [L]
a
The plan angle for the point element in the specified coordinate system. This
angle is measured in the XY plane from the positive global X axis. When looking
in the XY plane with the positive Z axis pointing toward you, a positive a angle is
counter clockwise. [deg]
b
The elevation angle for the point element in the specified coordinate system.
This angle is measured in an X'Z plane that is perpendicular to the XY plane with
the positive X' axis oriented at angle a from the positive global X axis. Angle b is
measured from the positive global Z axis. When looking in the XZ plane with the
positive Y' axis pointing toward you, a positive b angle is counter clockwise. [deg]
CSys
The name of the coordinate system in which the joint coordinates are returned.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise
it returns nonzero. If successful, the function returns the r, a and b coordinates
of the specified point element in the Present Units. The coordinates are reported
in the coordinate system specified by CSys.
VBA Example
Sub GetPointElmCoordSpherical()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, a As Double, b As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get spherical point element coordinates


ret = SapModel.PointElm.GetCoordSpherical("5", r, a, b)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
GetCoordCylindrical
GetLoadDispl
Syntax
SapObject.SapModel.PointElm.GetLoadDispl
VB6 Procedure
Function GetLoadDispl(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef LoadPat() As String, ByRef LCStep() As
Long, ByRef CSys() As String, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double, Optional ByVal ItemTypeElm As eItemTypeElm = Element) As
Long
Parameters
Name
The name of an existing point object, point element, or group of objects,
depending on the value of the ItemTypeElm item.
NumberItems
This is the total number of joint ground displacement assignments returned.
PointName
This is an array that includes the name of the point element to which the
specified ground displacement assignment applies.
LoadPat
This is an array that includes the name of the load pattern for the ground
displacement load.
LCStep
This is an array that includes the load pattern step for the ground displacement
load. In most cases, this item does not apply and will be returned as 0.
CSys
This is an array that includes the name of the coordinate system for the ground
displacement load. This is either Local or the name of a defined coordinate
system.
U1
This is an array that includes the assigned translational ground displacement in
the local 1-axis or coordinate system X-axis direction, depending on the
specified CSys. [L]
U2
This is an array that includes the assigned translational ground displacement in
the local 2-axis or coordinate system Y-axis direction, depending on the
specified CSys. [L]
U3
This is an array that includes the assigned translational ground displacement in
the local 3-axis or coordinate system Z-axis direction, depending on the
specified CSys. [L]
R1
This is an array that includes the assigned rotational ground displacement about
the local 1-axis or coordinate system X-axis, depending on the specified CSys.
[rad]
R2
This is an array that includes the assigned rotational ground displacement about
the local 2-axis or coordinate system Y-axis, depending on the specified CSys.
[rad]
R3
This is an array that includes the assigned rotational ground displacement about
the local 3-axis or coordinate system Z-axis, depending on the specified CSys.
[rad]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the ground displacement assignments are retrieved for
the point element corresponding to the point object specified by the Name item.
If this item is Element, the ground displacement assignments are retrieved for
the point element specified by the Name item.
If this item is GroupElm, the ground displacement assignments are retrieved for
all point elements directly or indirectly specified in the group specified by the
Name item.
If this item is SelectionElm, the ground displacement assignments are retrieved
for all point elements directly or indirectly selected, and the Name item is
ignored.
See Item Type for Elements for more information.
Remarks
This function retrieves the ground displacement load assignments to point
elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElmDisplLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PointName() As String
Dim LoadPat() As String
Dim LCStep() As Long
Dim CSys() As String
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get ground displacement load at point elements


ret = SapModel.PointElm.GetLoadDispl("ALL", NumberItems,
PointName, LoadPat, LCStep, CSys, U1, U2, U3, R1, R2, R3,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForce
Syntax
SapObject.SapModel.PointElm.GetLoadForce
VB6 Procedure
Function GetLoadForce(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef LoadPat() As String, ByRef LCStep() As
Long, ByRef CSys() As String, ByRef F1() As Double, ByRef F2() As Double,
ByRef F3() As Double, ByRef M1() As Double, ByRef M2() As Double, ByRef
M3() As Double, Optional ByVal ItemTypeElm As eItemTypeElm = Element) As
Long
Parameters
Name
The name of an existing point object, point element, or group of objects,
depending on the value of the ItemTypeElm item.
NumberItems
This is the total number of joint force load assignments returned.
PointName
This is an array that includes the name of the point element to which the
specified load assignment applies.
LoadPat
This is an array that includes the name of the load pattern for the load.
LCStep
This is an array that includes the load pattern step for the load. In most cases
this item does not apply and will be returned as 0.
CSys
This is an array that includes the name of the coordinate system for the load.
This is either Local or the name of a defined coordinate system.
F1
This is an array that includes the assigned translational force in the local 1-axis
or coordinate system X-axis direction, depending on the specified CSys. [F]
F2
This is an array that includes the assigned translational force in the local 2-axis
or coordinate system Y-axis direction, depending on the specified CSys. [F]
F3
This is an array that includes the assigned translational force in the local 3-axis
or coordinate system Z-axis direction, depending on the specified CSys. [F]
M1
This is an array that includes the assigned moment about the local 1-axis or
coordinate system X-axis, depending on the specified CSys. [FL]
M2
This is an array that includes the assigned moment about the local 2-axis or
coordinate system Y-axis, depending on the specified CSys. [FL]
M3
This is an array that includes the assigned moment about the local 3-axis or
coordinate system Z-axis, depending on the specified CSys. [FL]
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the point element
corresponding to the point object specified by the Name item.
If this item is Element, the load assignments are retrieved for the point element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for all point elements
directly or indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the load assignments are retrieved for all point
elements directly or indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
Remarks
This function retrieves the joint force load assignments to point elements.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElmForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PointName() As String
Dim LoadPat() As String
Dim LCStep() As Long
Dim CSys() As String
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint force load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("1", "DEAD", Value)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element force load


ret = SapModel.PointElm.GetLoadForce("ALL", NumberItems,
PointName, LoadPat, LCStep, CSys, F1, F2, F3, M1, M2, M3,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.PointElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef a As Double, ByRef b As
Double, ByRef c As Double) As Long
Parameters
Name
The name of an existing point element.
a, b, c
The local axes of the point are defined by first setting the positive local 1, 2 and
3 axes the same as the positive global X, Y and Z axes and then doing the
following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
Remarks
This function retrieves the local axes angles for a point element.
The function returns zero if the local axes angles are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElmLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim a As Double, b As Double, c As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get local axes assignments


ret = SapModel.PointElm.GetLocalAxes("1", a, b, c)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMergeNumber
Syntax
SapObject.SapModel.PointElm.GetMergeNumber
VB6 Procedure
Function GetMergeNumber(ByVal Name As String, ByRef MergeNumber As
Long) As Long
Parameters
Name
The name of an existing point element.
MergeNumber
The merge number assigned to the specified point element.
Remarks
This function retrieves the merge number for a point element. By default the
merge number for a point is zero. Points with different merge numbers are not
automatically merged by the program.
The function returns zero if the merge number is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElmMergeNumber()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim m As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set merge number


ret = SapModel.PointObj.SetMergeNumber("3", 2)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get merge number


ret = SapModel.PointElm.GetMergeNumber("3", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.PointElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of point element names retrieved by the program.
MyName
This is a one-dimensional array of point element names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined point elements.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetPointElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element names


ret = SapModel.PointElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
SapObject.SapModel.PointElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String, ByRef ObjType As
Long) As Long
Parameters
Name
The name of an existing point element.
Obj
The name of the object or defined item associated with the specified point
element. The type of object or item is determined from the ObjType variable.
ObjType
A number indicating the type of object or defined item that is associated with the
point element.
1
Obj is the point object corresponding to the specified point element.

2
Obj is a line object that is internally meshed by the program to create the
specified point element.

3
Obj is an area object that is internally meshed by the program to create the
specified point element.

6
Obj is a solid object that is internally meshed by the program to create the
specified point element.

9
Obj is a point object that has a panel zone assignment. The specified point
element is internally added by the program at the point object (panel zone)
location to model the panel zone. The specified point element does not directly
correspond to the point object returned; it is an added point at the same location
as the point object.

21
Obj is a defined diaphragm constraint. The specified point element was internally
added by the program for application of auto wind and auto seismic loads.
Remarks
This function retrieves the object or defined item associated with a specified
point element.
The function returns zero if the object is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetObjForPointElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object or defined item for point element "3"


ret = SapModel.PointElm.GetObj("3", Obj, ObjType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPatternValue
Syntax
SapObject.SapModel.PointElm.GetPatternValue
VB6 Procedure
Function GetPatternValue(ByVal Name As String, ByVal PatternName As String,
ByRef Value As Double) As Long
Parameters
Name
The name of an existing point element.
PatternName
The name of a defined joint pattern.
Value
The value that the specified point element has for the specified joint pattern.
Remarks
This function retrieves the joint pattern value for a specific point element and
joint pattern.
The function returns zero if the value is successfully retrieved, otherwise it
returns a nonzero value.
Joint pattern values are unitless.
VBA Example
Sub GetPointElmPatternData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern assignment


ret = SapModel.PointObj.SetPatternByXYZ("ALL", "Default", 0,
0, 10, 0, Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get joint pattern assignment for point element


ret = SapModel.PointElm.GetPatternValue("3", "Default",
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRestraint
Syntax
SapObject.SapModel.PointElm.GetRestraint
VB6 Procedure
Function GetRestraint(ByVal Name As String, ByRef Value() As Boolean) As
Long
Parameters
Name
The name of an existing point element.
Value
This is an array of six restraint values.
Value(0) = U1
Value(1) = U2
Value(2) = U3
Value(3) = R1
Value(4) = R2
Value(5) = R3
Remarks
This function retrieves the restraint assignments for a point element. The
restraint assignments are always returned in the point local coordinate system.
The function returns zero if the restraint assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElmRestraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element restraints


Redim Value(5)
ret = SapModel.PointElm.GetRestraint("5", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
Syntax
SapObject.SapModel.PointElm.GetSpring
VB6 Procedure
Function GetSpring(ByVal Name As String, ByRef k() As Double) As Long
Parameters
Name
The name of an existing point element.
k
This is an array of six spring stiffness values.
Value(0) = U1 [F/L]
Value(1) = U2 [F/L]
Value(2) = U3 [F/L]
Value(3) = R1 [FL/rad]
Value(4) = R2 [FL/rad]
Value(5) = R3 [FL/rad]
Remarks
This function retrieves uncoupled spring stiffness assignments for a point
element; that is, it retrieves the diagonal terms in the 6x6 spring matrix for the
point element.
The spring stiffnesses reported are the sum of all springs assigned to the point
element either directly or indirectly through line, area and solid spring
assignments. The spring stiffness values are reported in the point local
coordinate system.
The function returns zero if the stiffnesses are successfully retrieved, otherwise
it returns a nonzero value. If no springs exist at the point element, the function
returns a nonzero value.
VBA Example
Sub GetPointElmSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign spring to a point


ReDim k(5)
k(2) = 10
ret = SapModel.PointObj.SetSpring("3", k)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get spring values at point element


ReDim k(5)
ret = SapModel.PointElm.GetSpring("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpringCoupled
IsSpringCoupled
GetSpringCoupled
Syntax
SapObject.SapModel.PointElm.GetSpringCoupled
VB6 Procedure
Function GetSpringCoupled(ByVal Name As String, ByRef k() As Double) As
Long
Parameters
Name
The name of an existing point element.
k
This is an array of twenty one spring stiffness values.
Value(0) = U1U1 [F/L]
Value(1) = U1U2 [F/L]
Value(2) = U2U2 [F/L]
Value(3) = U1U3 [F/L]
Value(4) = U2U3 [F/L]
Value(5) = U3U3 [F/L]
Value(6) = U1R1 [F/rad]
Value(7) = U2R1 [F/rad]
Value(8) = U3R1 [F/rad]
Value(9) = R1R1 [FL/rad]
Value(10) = U1R2 [F/rad]
Value(11) = U2R2 [F/rad]
Value(12) = U3R2 [F/rad]
Value(13) = R1R2 [FL/rad]
Value(14) = R2R2 [FL/rad]
Value(15) = U1R3 [F/rad]
Value(16) = U2R3 [F/rad]
Value(17) = U3R3 [F/rad]
Value(18) = R1R3 [FL/rad]
Value(19) = R2R3 [FL/rad]
Value(20) = R3R3 [FL/rad]
Remarks
This function retrieves coupled spring stiffness assignments for a point element.
The spring stiffnesses reported are the sum of all springs assigned to the point
element either directly or indirectly through line, area and solid spring
assignments. The spring stiffness values are reported in the point local
coordinate system.
The function returns zero if the stiffnesses are successfully retrieved, otherwise
it returns a nonzero value. If no springs exist at the point element, the function
returns a nonzero value.
VBA Example
Sub GetPointElmCoupledSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign coupled spring to a point


ReDim k(20)
k(2) = 10
k(17) = 4
ret = SapModel.PointObj.SetSpringCoupled("3", k)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element coupled spring values


ReDim k(20)
ret = SapModel.PointElm.GetSpringCoupled("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
IsSpringCoupled
GetTransformationMatrix
Syntax
SapObject.SapModel.PointElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing point element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the point element local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array;
(Local1, Local2, Local3) are an item (such as a point load) in the point element
local coordinate system; and (GlobalX, GlobalY, GlobalZ) are the same item in
the global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set local axes


ret = SapModel.PointObj.SetLocalAxes("3", 33, 14, 12)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element transformation matrix


redim Value(8)
ret = SapModel.PointElm.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
IsSpringCoupled
Syntax
SapObject.SapModel.PointElm.IsSpringCoupled
VB6 Procedure
Function IsSpringCoupled(ByVal Name As String, ByVal IsCoupled As Boolean)
As Long
Parameters
Name
The name of an existing point element.
IsCoupled
This item is True if the spring assignment to the specified point element is
coupled, otherwise it is False.
Remarks
This function indicates if the spring assignments to a point element are coupled,
that is, if there are off-diagonal terms in the 6x6 spring matrix for the point
element.
The function returns zero if the coupled status is successfully retrieved,
otherwise it returns a nonzero value. If no springs exist at the point object, the
function returns a nonzero value.
VBA Example
Sub CheckIsPointElmSpringCoupled()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double
Dim IsCoupled As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign spring to a point


ReDim k(5)
k(2) = 10
ret = SapModel.PointObj.SetSpring("3", k)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'determine if point element spring is coupled


ret = SapModel.PointElm.IsSpringCoupled("3", IsCoupled)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
Count
Syntax
Sap2000.SolidElm.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of solid elements in the analysis model.
VBA Example
Sub CountSolidElements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 2, 2, 2, , , ,
, , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'return number of solid elements


Count = SapModel.SolidElm.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadGravity
Syntax
SapObject.SapModel.SolidElm.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef SolidName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing solid element or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified solid elements.
SolidName
This is an array that includes the name of the solid element associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the solid
elements corresponding to the solid object specified by the Name item.
If this item is Element, the load assignments are retrieved for the solid element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the solid
elements corresponding to all solid objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for solid
elements corresponding to all selected solid objects, and the Name item is
ignored.
Remarks
This function retrieves the gravity load assignments to solid elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 2, 2, 2, , , ,
, , Group)

'assign solid object gravity loads


ret = SapModel.SolidObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element gravity load


ret = SapModel.SolidElm.GetLoadGravity("3-1", NumberItems,
SolidName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
Syntax
SapObject.SapModel.SolidElm.GetLoadPorePressure
VB6 Procedure
Function GetLoadPorePressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing solid element or group, depending on the value of the
ItemType item.
NumberItems
The total number of pore pressure loads retrieved for the specified solid
elements.
SolidName
This is an array that includes the name of the solid element associated with each
pore pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
pore pressure load.
Value
This is an array that includes the pore pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
pore pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the solid
elements corresponding to the solid object specified by the Name item.
If this item is Element, the load assignments are retrieved for the solid element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the solid
elements corresponding to all solid objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for solid elements
corresponding to all selected solid objects, and the Name item is ignored.
Remarks
This function retrieves the pore pressure load assignments to solid elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object pore pressure load


ret = SapModel.SolidObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element pore pressure load


ret = SapModel.SolidElm.GetLoadPorePressure("ALL",
NumberItems, SolidName, LoadPat, Value, PatternName, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
Syntax
SapObject.SapModel.SolidElm.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Component()
As Long, ByRef Value() As Double, ByRef PatternName() As String, Optional
ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing solid element or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified solid elements.
SolidName
This is an array that includes the name of the solid element associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Component
This is 1, 2, 3, 4, 5 or 6, indicating the component to which the strain load is
applied.
1= Strain11
2= Strain22
3= Strain33
4= Strain12
5= Strain13
6= Strain23
Value
This is an array that includes the strain value. [L/L]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the solid
elements corresponding to the solid object specified by the Name item.
If this item is Element, the load assignments are retrieved for the solid element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the solid
elements corresponding to all solid objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for solid elements
corresponding to all selected solid objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to solid elements.
The function returns zero if the strain load assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Component() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object strain load


ret = SapModel.SolidObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element strain load


ret = SapModel.SolidElm.GetLoadStrain("1", NumberItems,
SolidName, LoadPat, Component, Value, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
Syntax
SapObject.SapModel.SolidElm.GetLoadSurfacePressure
VB6 Procedure
Function GetLoadSurfacePressure(ByVal Name As String, ByRef NumberItems
As Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef
Face() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemTypeElm As eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing solid element or group, depending on the value of the
ItemType item.
NumberItems
The total number of surface pressure loads retrieved for the specified solid
elements.
SolidName
This is an array that includes the name of the solid element associated with each
surface pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
surface pressure load.
Face
This is an array that includes 1, 2, 3, 4, 5 or 6, indicating the solid element face
to which the specified load assignment applies.
Value
This is an array that includes the surface pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
surface pressure load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the solid
elements corresponding to the solid object specified by the Name item.
If this item is Element, the load assignments are retrieved for the solid element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the solid
elements corresponding to all solid objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for solid elements
corresponding to all selected solid objects, and the Name item is ignored.
Remarks
This function retrieves the surface pressure load assignments to solid objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Face() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object surface pressure load


ret = SapModel.SolidObj.SetLoadSurfacePressure("ALL",
"DEAD", 1, .1, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element surface pressure load


ret = SapModel.SolidElm.GetLoadSurfacePressure("ALL",
NumberItems, SolidName,LoadPat, Face, Value, PatternName,
GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
Syntax
SapObject.SapModel.SolidElm.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemTypeElm As
eItemTypeElm = Element) As Long
Parameters
Name
The name of an existing solid element or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified solid elements.
SolidName
This is an array that includes the name of the solid element associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
Value
This is an array that includes the temperature load value. [T]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the load assignments are retrieved for the solid
elements corresponding to the solid object specified by the Name item.
If this item is Element, the load assignments are retrieved for the solid element
specified by the Name item.
If this item is GroupElm, the load assignments are retrieved for the solid
elements corresponding to all solid objects included in the group specified by the
Name item.
If this item is SelectionElm, the load assignments are retrieved for solid elements
corresponding to all selected solid objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to solid elements.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object temperature load


ret = SapModel.SolidObj.SetLoadTemperature("All", "DEAD",
50, , , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element temperature load


ret = SapModel.SolidElm.GetLoadTemperature("ALL",
NumberItems, SolidName, LoadPat, Value, PatternName, GroupElm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLocalAxes
Syntax
SapObject.SapModel.SolidElm.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef a As Double, ByRef b As
Double, ByRef c As Double) As Long
Parameters
Name
The name of an existing solid element.
a, b, c
The local axes of the solid element are defined by first setting the positive local
1, 2 and 3 axes the same as the positive global X, Y and Z axes and then doing
the following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
Remarks
This function retrieves the local axis angle assignment for solid elements.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSolidElementLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim a As Double, b As Double, c As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign local axes angles


ret = SapModel.SolidObj.SetLocalAxes("ALL", 30, 40, 50,
Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element local axis angle


ret = SapModel.SolidElm.GetLocalAxes("1", a, b, c)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
Syntax
SapObject.SapModel.SolidElm.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing solid element.
Temp
This is the material temperature value assigned to the solid element. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the solid element is uniform over the element at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the solid element may vary. The material temperature at each corner point of
the solid element is equal to the specified temperature multiplied by the pattern
value at the associated point element. The material temperature at other
locations in the solid element is calculated by interpolation from the corner
points.
Remarks
This function retrieves the material temperature assignments to solid elements.
The function returns zero if the material temperature assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign material temperature


ret = SapModel.SolidObj.SetMatTemp("ALL", 50, , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get material temperature for solid element


ret = SapModel.SolidElm.GetMatTemp("1", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNameList
Syntax
SapObject.SapModel.SolidElm.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of solid element names retrieved by the program.
MyName
This is a one-dimensional array of solid element names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined solid elements.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetSolidElementNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element names


ret = SapModel.SolidElm.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetObj
Syntax
Sap2000.SolidElm.GetObj
VB6 Procedure
Function GetObj(ByVal Name As String, ByRef Obj As String) As Long
Parameters
Name
The name of an existing solid element.
Obj
The name of the solid object from which the solid element was created.
Remarks
This function retrieves the name of the solid object from which a solid element
was created.
The function returns zero if the information is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetObjForSolidElm()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Obj As String
Dim ObjType As Long
Dim RDI As Double
Dim RDJ As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 2, 2, 2, , , ,
, , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get object information for an solid element


ret = SapModel.SolidElm.GetObj("3-2", Obj)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.SolidElm.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point() As String) As Long
Parameters
Name
The name of an solid element.
Point
This is an array containing the names of the eight point elements that define the
solid element. The point names are in order around the solid element.
Remarks
This function retrieves the names of the eight point elements that define a solid
element.
The function returns zero if the point element names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElmPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 2, 2, 2, , , ,
, , Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get names of eight corner points


ret = SapModel.SolidElm.GetPoints("3-2", Point)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.SolidElm.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined solid element.
PropName
The name of the solid property assigned to the solid element.
Remarks
This function retrieves the solid property assigned to a solid element.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSolidElementProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid property for element


ret = SapModel.SolidElm.GetProperty("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
Sap2000.SolidElm.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing solid element.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the solid element local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the element local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
Remarks
The function returns zero if the transformation matrix is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidElementMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign local axes angles


ret = SapModel.SolidObj.SetLocalAxes("ALL", 30, 40, 50,
Group)

'create analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element transformation matrix


redim Value(8)
ret = SapModel.SolidElm.GetTransformationMatrix("1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Divide
Syntax
SapObject.SapModel.EditArea.Divide
VB6 Procedure
Function Divide(ByVal Name As String, ByVal MeshType As Long, ByRef
NumberAreas As Long, ByRef AreaName() As String, Optional ByVal n1 As
Long = 2, Optional ByVal n2 As Long = 2, Optional ByVal MaxSize1 As Double =
0, Optional ByVal MaxSize2 As Double = 0, Optional ByVal
PointOnEdgeFromGrid As Boolean = False, Optional ByVal
PointOnEdgeFromLine As Boolean = False, Optional ByVal
PointOnEdgeFromPoint As Boolean = False, Optional ByVal
ExtendCookieCutLines As Boolean = False, Optional ByVal Rotation As Double
= 0, Optional ByVal MaxSizeGeneral As Double = 0, Optional ByVal
LocalAxesOnEdge As Boolean = False, Optional ByVal LocalAxesOnFace As
Boolean = False, Optional ByVal RestraintsOnEdge As Boolean = False,
Optional ByVal RestraintsOnFace As Boolean = False) As Long
Parameters
Name
The name of an existing area object.
MeshType
This item is 1, 2, 3, 4, 5 or 6, indicating the mesh type for the area object.
1= Mesh area into a specified number of objects
2= Mesh area into objects of a specified maximum size
3= Mesh area based on points on area edges
4= Cookie cut mesh area based on lines intersecting edges
5= Cookie cut mesh area based on points
6= Mesh area using General Divide Tool

Mesh options 1, 2 and 3 apply to quadrilaterals and triangles only.


NumberAreas
The number of area objects created when the specified area object is divided.
AreaName
This is an array of the name of each area object created when the specified
area object is divided.
n1
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 2.
n2
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 3.
MaxSize1
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 2. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize2
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 3. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
PointOnEdgeFromGrid
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from intersections of visible grid lines with the area object
edges.
PointOnEdgeFromLine
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from intersections of selected straight line objects with the
area object edges.
PointOnEdgeFromPoint
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from selected point objects that lie on the area object
edges.
ExtendCookieCutLines
This item applies when MeshType = 4. MeshType = 4 provides cookie cut
meshing based on selected straight line objects that intersect the area object
edges. If the ExtendCookieCutLines item is True, all selected straight line
objects are extended to intersect the area object edges for the purpose of
meshing the area object.
Rotation
This item applies when MeshType = 5. MeshType = 5 provides cookie cut
meshing based on two perpendicular lines passing through selected point
objects. By default these lines align with the area object local 1 and 2 axes. The
Rotation item is an angle in degrees that the meshing lines are rotated from their
default orientation. [deg]
MaxSizeGeneral
This item applies when MeshType = 6. It is the maximum size of objects created
by the General Divide Tool.
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
LocalAxesOnEdge
If this item is True, and if both points along an edge of the original area object
have the same local axes, the program makes the local axes for added points
along the edge the same as the edge end points.
LocalAxesOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same local axes, the program makes the local axes for all added
points the same as the perimeter points.
RestraintsOnEdge
If this item is True, and if both points along an edge of the original area object
have the same restraint/constraint, then, if the added point and the adjacent
corner points have the same local axes definition, the program includes the
restraint/constraint for added points along the edge.
RestraintsOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same restraint/constraint, then, if an added point and the
perimeter points have the same local axes definition, the program includes the
restraint/constraint for the added point.
Remarks
This function meshes area objects.
The function returns zero if the meshing is successful; otherwise it returns a
nonzero value.
VBA Example
Sub DivideAreaObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberAreas As Long
Dim AreaName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'divide area object


ret = SapModel.EditArea.Divide("1", 1, NumberAreas,
AreaName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ExpandShrink
Syntax
SapObject.SapModel.EditArea.ExpandShrink
VB6 Procedure
Function Divide(ByVal OffsetType As Long, ByVal Offset As Double) As Long
Parameters
OffsetType
This item is 0, 1 or 2, indicating the offset type for the selected area objects.
0 = Offset all area edges
1 = Offset selected area edges only
2 = Offset selected points of selected areas only
Offset
The area edge offset distance. Positive distances expand the object and
negative distances shrink the object.[L]
Remarks
This function expands or shrinks selected area objects.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub ExpandAreaObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'expand area object


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.AreaObj.SetSelectedEdge("4", 2, True)
ret = SapModel.EditArea.ExpandShrink(1, 48)

'refresh view, updating zoom


ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Merge
Syntax
SapObject.SapModel.EditArea.Merge
VB6 Procedure
Function Merge(ByRef NumberAreas As Long, ByRef AreaName() As String)
As Long
Parameters
NumberAreas
The number of originally selected area objects that remain when the merge is
successfully completed.
AreaName
This is an array that includes the names of the selected area objects that remain
when the merge is successfully completed.
Remarks
This function merges selected area objects.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub MergeAreaObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberAreas As Long
Dim AreaName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'merge area objects


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.AreaObj.SetSelected("1", True)
ret = SapModel.AreaObj.SetSelected("2", True)
ret = SapModel.AreaObj.SetSelected("4", True)
ret = SapModel.EditArea.Merge(NumberAreas, AreaName)

'refresh window
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PointAdd
Syntax
SapObject.SapModel.EditArea.PointAdd
VB6 Procedure
Function PointAdd() As Long
Parameters
None
Remarks
This function adds a point object at the midpoint of selected area object edges.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub AddPointToAreaObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'add point to area object


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.AreaObj.SetSelectedEdge("4", 2, True)
ret = SapModel.EditArea.PointAdd

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PointRemove
PointRemove
Syntax
SapObject.SapModel.EditArea.PointRemove
VB6 Procedure
Function PointRemove() As Long
Parameters
None
Remarks
This function removes selected point objects from selected area objects. Note
that in some cases this command can cause the area object to be deleted.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub RemovePointFromAreaObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'remove point from area object


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.AreaObj.SetSelected("4", True)
ret = SapModel.PointObj.SetSelected("9", True)
ret = SapModel.EditArea.PointRemove

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PointAdd
ChangeConnectivity
Syntax
SapObject.SapModel.EditArea.ChangeConnectivity
VB6 Procedure
Function ChangeConnectivity(ByVal Name As String, ByVal NumberPoints As
Long, ByRef Point() As String) As Long
Parameters
Name
The name of an existing area object.
NumberPoints
The number of points in the area abject.
Point
This is an array containing the names of the point objects that define the added
area object. The point object names should be ordered to run clockwise or
counter-clockwise around the area object.
Remarks
This function modifies the connectivity of an area object.
The function returns zero if the area object connectivity is successfully modified;
otherwise it returns a nonzero value.
VBA Example
Sub ModifyAreaObjConnectivity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get names of points


ret = SapModel.AreaObj.GetPoints("2", NumberPoints, Point)

'modify connectivity
NumberPoints = NumberPoints - 1
ReDim Preserve Point(NumberPoints )
ret = SapModel.EditArea.ChangeConnectivity("2",
NumberPoints, Point)
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
DivideAtDistance
Syntax
SapObject.SapModel.EditFrame.DivideAtDistance
VB6 Procedure
Function DivideAtDistance(ByVal Name As String, ByVal Dist As Double, ByVal
IEnd As Boolean, ByRef NewName() As String) As Long
Parameters
Name
The name of an existing straight frame object.
Dist
The frame object is divided at this distance from the end specified by the IEnd
item.[L]
IEnd
If this item is True, the Dist item is measured from the I-end of the frame object.
Otherwise it is measured from the J-end of the frame object.
Num
This is the number of frame objects into which the specified frame object is
divided.
NewName
This is an array that includes the names of the two new frame objects.
Remarks
This function divides straight frame objects into two objects at a location defined
by the Dist and IEnd items. Curved frame objects are not divided.
The function returns zero if the frame objects are successfully divided;
otherwise it returns a nonzero value.
VBA Example
Sub DivideFrameObjectAtDistance()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NewName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'divide frame object at distance


ret = SapModel.EditFrame.DivideAtDistance("8", 100, True,
NewName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
DivideByRatio
DivideAtIntersections
DivideAtIntersections
Syntax
SapObject.SapModel.EditFrame.DivideAtIntersections
VB6 Procedure
Function DivideAtIntersections(ByVal Name As String, ByRef Num As Double,
ByRef NewName() As String) As Long
Parameters
Name
The name of an existing straight frame object.
Num
This is the number of frame objects into which the specified frame object is
divided.
NewName
This is an array that includes the names of the new frame objects.
Remarks
This function divides straight frame objects at intersections with selected point
objects, line objects, area edges and solid edges. Curved frame objects are not
divided.
The function returns zero if the frame objects are successfully divided;
otherwise it returns a nonzero value.
VBA Example
Sub DivideFrameObjectAtIntersections()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim NewName() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add point objects to model and select them


ret = SapModel.PointObj.AddCartesian(-188, 0, 288, Name)
ret = SapModel.PointObj.SetSelected(Name, True)
ret = SapModel.PointObj.AddCartesian(-88, 0, 288, Name)
ret = SapModel.PointObj.SetSelected(Name, True)

'divide frame object at intersections


ret = SapModel.EditFrame.DivideAtIntersections("8", Num,
NewName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
DivideByRatio
DivideAtDistance
DivideByRatio
Syntax
SapObject.SapModel.EditFrame.DivideByRatio
VB6 Procedure
Function DivideByRatio(ByVal Name As String, ByVal Num As long, ByVal Ratio
As Double, ByRef NewName() As String) As Long
Parameters
Name
The name of an existing straight frame object.
Num
The frame object is divided into this number of new objects.
Ratio
The Last/First length ratio for the new frame objects.
NewName
This is an array that includes the names of the new frame objects.
Remarks
This function divides straight frame objects based on a specified Last/First
length ratio. Curved frame objects are not divided.
The function returns zero if the frame objects are successfully divided;
otherwise it returns a nonzero value.
VBA Example
Sub DivideFrameObjectByRatio()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NewName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'divide frame object by ratio


ret = SapModel.EditFrame.DivideByRatio("8", 3, 0.3, NewName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
DivideAtDistance
DivideAtIntersections
Extend
Syntax
SapObject.SapModel.EditFrame.Extend
VB6 Procedure
Function Extend(ByVal Name As String, ByVal IEnd As Boolean, ByVal JEnd As
Boolean, ByVal Item1 As String, Optional ByVal Item2 As String = "") As Long
Parameters
Name
The name of an existing straight frame object to be extended.
IEnd
This item is True if the I-End of the frame object specified by the Name item is to
be extended.
JEnd
This item is True if the J-End of the frame object specified by the Name item is
to be extended.
Item1
The name of an existing straight frame object used as a extension line.
Item2
The name of an existing straight frame object used as a extension line.
Remarks
This function extends straight frame objects. Curved frame objects are not
extended.
The function returns zero if the frame objects are successfully extended;
otherwise it returns a nonzero value.
VBA Example
Sub ExtendFrameObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add frame object by coordinates


ret = SapModel.FrameObj.AddByCoord(-180, 0, 180, -180, 0,
240, Name)

'refresh window
ret = SapModel.View.RefreshWindow

'extend frame object


ret = SapModel.EditFrame.Extend(Name, True, True, "7", "8")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Trim
Join
Syntax
SapObject.SapModel.EditFrame.Join
VB6 Procedure
Function Join(ByVal Name As String, ByVal Item2 As String) As Long
Parameters
Name
The name of an existing frame object to be joined. The new, joined frame object
keeps this name.
Item2
The name of an existing frame object to be joined.
Remarks
This function joins two straight frame objects that have a common end point and
are colinear.
The function returns zero if the frame objects are successfully joined; otherwise
it returns a nonzero value.
VBA Example
Sub JoinFrameObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'join frame objects


ret = SapModel.EditFrame.Join("8", "10")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
DivideAtDistance
DivideAtIntersections
DivideByRatio
Trim
Syntax
SapObject.SapModel.EditFrame.Trim
VB6 Procedure
Function Trim(ByVal Name As String, ByVal IEnd As Boolean, ByVal JEnd As
Boolean, ByVal Item1 As String, Optional ByVal Item2 As String = "") As Long
Parameters
Name
The name of an existing straight frame object to be trimmed.
IEnd
This item is True if the I-End of the frame object specified by the Name item is to
be trimmed.
JEnd
This item is True if the J-End of the frame object specified by the Name item is
to be trimmed.
Item1
The name of an existing straight frame object used as a trim line.
Item2
The name of an existing straight frame object used as a trim line.
Remarks
This function trims straight frame objects. Curved frame objects are not trimmed.
The function returns zero if the frame objects are successfully trimmed;
otherwise it returns a nonzero value.
VBA Example
Sub TrimFrameObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add frame object by coordinates


ret = SapModel.FrameObj.AddByCoord(-180, 0, 100, -180, 0,
360, Name)

'refresh window
ret = SapModel.View.RefreshWindow

'trim frame object


ret = SapModel.EditFrame.Trim(Name, True, True, "7", "8")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Extend
ChangeConnectivity
Syntax
SapObject.SapModel.EditFrame.ChangeConnectivity
VB6 Procedure
Function ChangeConnectivity(ByVal Name As String, ByVal Point1 As String,
ByVal Point2 As String) As Long
Parameters
Name
The name of an existing frame object.
Point1
The name of the point object at the I-End of the frame object.
Point2
The name of the point object at the J-End of the frame object.
Remarks
This function modifies the connectivity of a frame object.
The function returns zero if the frame object connectivity is successfully
modified; otherwise it returns a nonzero value.
VBA Example
Sub ModifyFrameObjConnectivity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'modify connectivity
ret = SapModel.EditFrame.ChangeConnectivity("8", "3", "5")
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
Align
Syntax
SapObject.SapModel.EditPoint.Align
VB6 Procedure
Function Align(ByVal MyType As Long, ByVal Ordinate As Double, ByRef
NumberPoints As Long, ByRef PointName() As String) As Long
Parameters
MyType
This is 1, 2, 3 or 4, indicating the alignment option.
1 = Align points to X-ordinate in present coordinate system
2 = Align points to Y-ordinate in present coordinate system
3 = Align points to Z-ordinate in present coordinate system
4 = Align points to nearest selected line object, area object edge or solid object
edge
Ordinate
The X, Y or Z ordinate that applies if MyType is 1, 2 or 3, respectively. [L]
NumberPoints
The number of point objects that are in a new location after the alignment is
complete.
PointName
This is an array of the name of each point object that is in a new location after
the alignment is complete.
Remarks
This function aligns selected point objects.
The function returns zero if the alignment is successful; otherwise it returns a
nonzero value.
VBA Example
Sub AlignPointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim PointName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'align point objects


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.PointObj.SetSelected("1", True)
ret = SapModel.PointObj.SetSelected("2", True)
ret = SapModel.PointObj.SetSelected("3", True)
ret = SapModel.EditPoint.Align(1, -300, NumberPoints,
PointName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Connect
Syntax
SapObject.SapModel.EditPoint.Connect
VB6 Procedure
Function Connect(ByRef NumberPoints As Long, ByRef PointName() As String)
As Long
Parameters
NumberPoints
The number of the point objects that remain at locations where connections
were made.
PointName
This is an array of the name of each point object that remains at locations where
connections were made.
Remarks
This function connects objects that have been disconnected using the
Disconnect function. If two or more objects have different end points objects that
are at the same location, all of those objects can be connected together by
selecting the objects, and selecting their end points, and calling the Connect
function. The result will be that all of the objects are connected at a single point.
The function returns zero if the connect is successful; otherwise it returns a
nonzero value.
VBA Example
Sub ConnectObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Point1 As String, Point2 As String
Dim NumberPoints As Long
Dim PointName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'disconnect point objects


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.PointObj.SetSelected("3", True)
ret = SapModel.PointObj.SetSelected("9", True)
ret = SapModel.EditPoint.Disconnect(NumberPoints, PointName)

'connect objects
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.FrameObj.SetSelected("2", True)
ret = SapModel.FrameObj.SetSelected("8", True)
ret = SapModel.FrameObj.GetPoints("2", Point1, Point2)
ret = SapModel.PointObj.SetSelected(Point2, True)
ret = SapModel.FrameObj.GetPoints("8", Point1, Point2)
ret = SapModel.PointObj.SetSelected(Point1, True)
ret = SapModel.EditPoint.Connect(NumberPoints, PointName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Disconnect
Disconnect
Syntax
SapObject.SapModel.EditPoint.Disconnect
VB6 Procedure
Function Disconnect(ByRef NumberPoints As Long, ByRef PointName() As
String) As Long
Parameters
NumberPoints
The number of the point objects (including the original selected point objects)
that are created by the disconnect action.
PointName
This is an array of the name of each point object (including the original selected
point objects) that is created by the disconnect action.
Remarks
This function disconnects selected point objects. Disconnect creates a separate
point for each object that frames into the selected point object.
The function returns zero if the disconnect is successful; otherwise it returns a
nonzero value.
VBA Example
Sub DisconnectPointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim PointName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'disconnect point objects


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.PointObj.SetSelected("3", True)
ret = SapModel.EditPoint.Disconnect(NumberPoints, PointName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Connect
Merge
Syntax
SapObject.SapModel.EditPoint.Merge
VB6 Procedure
Function Merge(ByVal MergeTol As Double, ByRef NumberPoints As Long,
ByRef PointName() As String) As Long
Parameters
MergeTol
Point objects within this distance of one another are merged into one point
object. [L]
NumberPoints
The number of the selected point objects that still exist after the merge is
complete.
PointName
This is an array of the name of each selected point object that still exists after
the merge is complete.
Remarks
This function merges selected point objects that are within a specified distance
of one another.
The function returns zero if the merge is successful; otherwise it returns a
nonzero value.
VBA Example
Sub MergePointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Point1 As String, Point2 As String
Dim NumberPoints As Long
Dim PointName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add frame object by coordinates


ret = SapModel.FrameObj.AddByCoord(-400, 0, 288, -289, 0,
288, Name)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'merge point objects


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.PointObj.SetSelected("3", True)
ret = SapModel.FrameObj.GetPoints(Name, Point1, Point2)
ret = SapModel.PointObj.SetSelected(Point2, True)
ret = SapModel.EditPoint.Merge(2, NumberPoints, PointName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ChangeCoordinates_1
Syntax
SapObject.SapModel.EditPoint.ChangeCoordinates_1
VB6 Procedure
Function ChangeCoordinates_1(ByVal Name As String, ByVal x As Double,
ByVal y As Double, ByVal z As Double, Optional ByVal NoRefresh As Boolean =
False) As Long
Parameters
Name
The name of an existing point object.
x, y, z
These are the new x, y and z coordinates, in the present coordinate system, for
the specified point object.
NoRefresh
If this item is True, the model display window is not refreshed after the point
object is moved.
Remarks
This function changes the coordinates of a specified point object.
The function returns zero if the coordinate change is successful; otherwise it
returns a nonzero value.
VBA Example
Sub ChangePointCoordinates_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'change point coordinates


ret = SapModel.EditPoint.ChangeCoordinates_1("1", -288, 0,
36)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.05.
This function supersedes ChangeCoordinates.
Modified optional argument NoRefresh to be ByVal in version 12.0.1.
See Also
Divide
Syntax
SapObject.SapModel.EditSolid.Divide
VB6 Procedure
Function Divide(ByVal Name As String, ByVal n1 As Long, ByVal n2 As Long,
ByVal n3 As Long, ByRef NumberSolids As Long, ByRef SolidName() As String)
As Long
Parameters
Name
The name of an existing solid object.
n1
This is the number of objects created between faces 2 and 4 of the solid object.
n2
This is the number of objects created between faces 1 and 3 of the solid object.
n3
This is the number of objects created between faces 5 and 6 of the solid object.
NumberSolids
The number of solid objects created when the specified solid object is divided.
SolidName
This is an array of the name of each solid object created when the specified
solid object is divided.
Remarks
This function meshes solid objects.
The function returns zero if the meshing is successful; otherwise it returns a
nonzero value.
VBA Example
Sub DivideSolidObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberSolids As Long
Dim SolidName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2,
2, 2)

'divide solid object


ret = SapModel.EditSolid.Divide("1", 2, 3, 4, NumberSolids,
SolidName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ExtrudeAreaToSolidLinearNormal
Syntax
SapObject.SapModel.EditSolid.ExtrudeAreaToSolidLinearNormal
VB6 Procedure
Function ExtrudeAreaToSolidLinearNormal(ByVal Name As String, ByVal
PropName As String, ByVal nPlus3 As Long, ByVal tPlus3 As Double, ByVal
nMinus3 As Long, ByVal tMinus3 As Double, ByRef NumberSolids As Long,
ByRef SolidName() As String, Optional ByVal Remove As Boolean = True) As
Long
Parameters
Name
The name of an existing area object to be extruded.
PropName
This is either Default or the name of a defined solid property to be used for the
new extruded solid objects.
nPlus3
The number of solid objects created in the positive local 3-axis direction of the
specified area object.
tPlus3
The thickness of the solid objects created in the positive local 3-axis direction of
the specified area object.
nMinus3
The number of solid objects created in the negative local 3-axis direction of the
specified area object.
tMinus3
The thickness of the solid objects created in the negative local 3-axis direction
of the specified area object.
NumberSolids
The number of solid objects created when the specified area object is extruded.
SolidName
This is an array of the name of each solid object created when the specified
area object is extruded.
Remove
If this item is True, the area object indicated by the Name item is deleted after
the extrusion is complete.
Remarks
This function creates new solid objects by linearly extruding a specified area
object, in the local 3-axis direction of the area object, into solid objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub LinearNormalAreaExtrusionToSolids()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberSolids As Long
Dim SolidName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'linearly extrude area to solids normal to area


ret =
SapModel.EditGeneral.ExtrudeAreaToSolidLinearNormal("2",
"Default", 1, 48, 1, 48, NumberSolids, SolidName, True)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ExtrudeAreaToSolidLinearUser
ExtrudeAreaToSolidRadial
ExtrudeAreaToSolidLinearUser
Syntax
SapObject.SapModel.EditSolid.ExtrudeAreaToSolidLinearUser
VB6 Procedure
Function ExtrudeAreaToSolidLinearUser(ByVal Name As String, ByVal
PropName As String, ByVal dx As Double, ByVal dy As Double, ByVal dz As
Double, ByVal Number As Long, ByRef NumberSolids As Long, ByRef
SolidName() As String, Optional ByVal Remove As Boolean = True) As Long
Parameters
Name
The name of an existing area object to be extruded.
PropName
This is either Default or the name of a defined solid property to be used for the
new extruded solid objects.
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to
create each new solid object.
Number
The number of increments for the extrusion.
NumberSolids
The number of solid objects created when the specified area object is extruded.
Usually this item is returned the same as the Number item. However, in some
cases, such as when an area object with more than four sides is extruded, this
item will be larger than the Number item.
SolidName
This is an array of the name of each solid object created when the specified
area object is extruded.
Remove
If this item is True, the area object indicated by the Name item is deleted after
the extrusion is complete.
Remarks
This function creates new solid objects by linearly extruding a specified area
object, in a user specified direction, into solid objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub LinearUserAreaExtrusionToSolids()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberSolids As Long
Dim SolidName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'linearly extrude area to solids in user direction


ret = SapModel.EditGeneral.ExtrudeAreaToSolidLinearUser("2",
"Default", 20, 144, 0, 3, NumberSolids, SolidName, True)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ExtrudeAreaToSolidLinearNormal
ExtrudeAreaToSolidRadial
ExtrudeAreaToSolidRadial
Syntax
SapObject.SapModel.EditSolid.ExtrudeAreaToSolidRadial
VB6 Procedure
Function ExtrudeAreaToSolidRadial(ByVal Name As String, ByVal PropName As
String, ByVal RotateAxis As Long, ByVal x As Double, ByVal y As Double, ByVal
z As Double, ByVal IncrementAng As Double, ByVal TotalRise As Double, ByVal
Number As Long, ByRef NumberSolids As Long, ByRef SolidName() As String,
Optional ByVal Remove As Boolean = True) As Long
Parameters
Name
The name of an existing area object to be extruded.
PropName
This is either Default or the name of a defined solid property to be used for the
new extruded solid objects.
RotateAxis
This is 0, 1 or 2, indicating the axis that the radial extrusion is around.
0 = X axis
1 = Y axis
2 = Z axis
x, y, z
These are the x, y and z coordinates, in the present coordinate system, of the
point that the radial extrusion is around. For rotation about the X axis the value
of the x coordinate is irrelevant. Similarly, for rotation about the Y and Z axes the
y and z coordinates, respectively, are irrelevant. [L]
IncrementAng
The angle is rotated by this amount for each added solid object. [deg]
TotalRise
The total rise over the full length of the extrusion. [L]
Number
The number of angle increments for the extrusion.
NumberSolids
The number of solid objects created when the specified area object is extruded.
Usually this item is returned the same as the Number item. However, in some
cases, such as when an area object with more than four sides is extruded, this
item will be larger than the Number item.
SolidName
This is an array of the name of each solid object created when the specified
area object is extruded.
Remove
If this item is True, the area object indicated by the Name item is deleted after
the extrusion is complete.
Remarks
This function creates new solid objects by radially extruding a specified area
object into solid objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub RadialAreaExtrusionToSolids()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberSolids As Long
Dim SolidName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(5, 48, 2, 48)

'radially extrude area to solid


ret = SapModel.EditGeneral.ExtrudeAreaToSolidRadial("2",
"Default", 2, 0, 0, 96, 30, 0, 6, NumberSolids, SolidName)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ExtrudeAreaToSolidLinearNormal
ExtrudeAreaToSolidLinearUser
ExtrudeFrameToAreaLinear
Syntax
SapObject.SapModel.EditSolid.ExtrudeFrameToAreaLinear
VB6 Procedure
Function ExtrudeFrameToAreaLinear(ByVal Name As String, ByVal PropName
As String, ByVal dx As Double, ByVal dy As Double, ByVal dz As Double, ByVal
NumberAreas As Long, ByRef AreaName() As String, Optional ByVal Remove
As Boolean = True) As Long
Parameters
Name
The name of an existing straight frame object to be extruded.
PropName
This is Default, None or the name of a defined area property to be used for the
new extruded area objects.
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to
create each new area object.
NumberAreas
The number of area objects created when the specified line object is extruded.
AreaName
This is an array of the name of each area object created when the specified line
object is extruded.
Remove
If this item is True, the straight frame object indicated by the Name item is
deleted after the extrusion is complete.
Remarks
This function creates new area objects by linearly extruding a specified straight
frame object into area objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub LinearFrameExtrusionToAreas()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AreaName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'linearly extrude frame to areas


ret = SapModel.EditGeneral.ExtrudeFrameToAreaLinear("8",
"Default", 0, 144, 0, 3, AreaName, True)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ExtrudeFrameToAreaRadial
ExtrudeFrameToAreaRadial
Syntax
SapObject.SapModel.EditSolid.ExtrudeFrameToAreaRadial
VB6 Procedure
Function ExtrudeFrameToAreaRadial(ByVal Name As String, ByVal PropName
As String, ByVal RotateAxis As Long, ByVal x As Double, ByVal y As Double,
ByVal z As Double, ByVal IncrementAng As Double, ByVal TotalRise As Double,
ByVal NumberAreas As Long, ByRef AreaName() As String, Optional ByVal
Remove As Boolean = True) As Long
Parameters
Name
The name of an existing line object to be extruded.
PropName
This is Default, None or the name of a defined area property to be used for the
new extruded area objects.
RotateAxis
This is 0, 1 or 2, indicating the axis that the radial extrusion is around.
0 = X axis
1 = Y axis
2 = Z axis
x, y, z
These are the x, y and z coordinates, in the present coordinate system, of the
point that the radial extrusion is around. For rotation about the X axis the value
of the x coordinate is irrelevant. Similarly, for rotation about the Y and Z axes the
y and z coordinates, respectively, are irrelevant. [L]
IncrementAng
The angle is rotated by this amount for each added area object. [deg]
TotalRise
The total rise over the full length of the extrusion. [L]
NumberAreas
The number of area objects created when the specified line object is extruded.
AreaName
This is an array of the name of each area object created when the specified line
object is extruded.
Remove
If this item is True, the straight frame object indicated by the Name item is
deleted after the extrusion is complete.
Remarks
This function creates new area objects by radially extruding a specified straight
frame object into area objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub RadialFrameExtrusionToAreas()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AreaName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 3, 288)

'radially extrude frame to areas


ret = SapModel.EditGeneral.ExtrudeFrameToAreaRadial("10",
"Default", 2, 0, 0, 288, 30, 0, 6, AreaName)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ExtrudeFrameToAreaLinear
ExtrudePointToFrameLinear
Syntax
SapObject.SapModel.EditSolid.ExtrudePointToFrameLinear
VB6 Procedure
Function ExtrudePointToFrameLinear(ByVal Name As String, ByVal PropName
As String, ByVal dx As Double, ByVal dy As Double, ByVal dz As Double, ByVal
NumberFrames As Long, ByRef FrameName() As String) As Long
Parameters
Name
The name of an existing point object to be extruded.
PropName
This is Default, None or the name of a defined frame section property to be
used for the new extruded frame objects.
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to
create each new frame object.
NumberFrames
The number of frame objects created when the specified point object is
extruded.
FrameName
This is an array of the name of each frame object created when the specified
point object is extruded.
Remarks
This function creates new frame objects by linearly extruding a specified point
object into frame objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub LinearPointExtrusionToFrames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FrameName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'linearly extrude point to frames


ret = SapModel.EditGeneral.ExtrudePointToFrameLinear("3",
"FSec1", 0, 144, 0, 3, FrameName)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ExtrudePointToFrameRadial
ExtrudePointToFrameRadial
Syntax
SapObject.SapModel.EditSolid.ExtrudePointToFrameRadial
VB6 Procedure
Function ExtrudePointToFrameRadial(ByVal Name As String, ByVal PropName
As String, ByVal RotateAxis As Long, ByVal x As Double, ByVal y As Double,
ByVal z As Double, ByVal IncrementAng As Double, ByVal TotalRise As Double,
ByVal NumberFrames As Long, ByRef FrameName() As String) As Long
Parameters
Name
The name of an existing point object to be extruded.
PropName
This is Default, None or the name of a defined frame section property to be
used for the new extruded frame objects.
RotateAxis
This is 0, 1 or 2, indicating the axis that the radial extrusion is around.
0 = X axis
1 = Y axis
2 = Z axis
x, y, z
These are the x, y and z coordinates, in the present coordinate system, of the
point that the radial extrusion is around. For rotation about the X axis, the value
of the x coordinate is irrelevant. Similarly, for rotation about the Y and Z axes,
the y and z coordinates, respectively, are irrelevant. [L]
IncrementAng
The angle is rotated by this amount for each added frame object. [deg]
TotalRise
The total rise over the full length of the extrusion. [L]
NumberFrames
The number of frame objects created when the specified point object is
extruded.
FrameName
This is an array of the name of each frame object created when the specified
point object is extruded.
Remarks
This function creates new frame objects by radially extruding a specified point
object into frame objects.
The function returns zero if the extrusion is successful; otherwise it returns a
nonzero value.
VBA Example
Sub RadialPointExtrusionToFrames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FrameName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'radially extrude point to frames


ret = SapModel.EditGeneral.ExtrudePointToFrameRadial("3",
"FSec1", 2, 0, 0, 288, 30, 0, 6, FrameName)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ExtrudePointToFrameLinear
Move
Syntax
SapObject.SapModel.EditGeneral.Move
VB6 Procedure
Function Move(ByVal dx As Double, ByVal dy As Double, ByVal dz As Double)
As Long
Parameters
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, for
moving the selected objects.
Remarks
This function moves selected point, frame, cable, tendon, area, solid and link
objects.
The function returns zero if the move is successful; otherwise it returns a
nonzero value.
VBA Example
Sub MoveObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FrameName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'move objects
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.PointObj.SetSelected("3", True)
ret = SapModel.PointObj.SetSelected("6", True)
ret = SapModel.PointObj.SetSelected("9", True)
ret = SapModel.FrameObj.SetSelected("8", True)
ret = SapModel.FrameObj.SetSelected("10", True)
ret = SapModel.EditGeneral.Move(0, 0, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ReplicateLinear
Syntax
SapObject.SapModel.EditSolid.ReplicateLinear
VB6 Procedure
Function ReplicateLinear(ByVal dx As Double, ByVal dy As Double, ByVal dz As
Double, ByVal Number As Long, ByRef NumberObjects As Long, ByRef
ObjectName() As String, ByRef ObjectType() As Long, Optional ByVal Remove
As Boolean = False) As Long
Parameters
dx, dy, dz
These are the x, y and z offsets used, in the present coordinate system, to
replicate the selected objects.
Number
The number of times the selected objects are to be replicated.
NumberObjects
The number of new objects created by the replication process.
ObjectName
This is an array of the name of each object created by the replication process.
ObjectType
This is an array of the type of each object created by the replication process.
1= Point object
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6= Solid object
7= Link object
Remove
If this item is True, the originally selected objects are deleted after the replication
is complete.
Remarks
This function linearly replicates selected objects.
The function returns zero if the replication is successful; otherwise it returns a
nonzero value.
VBA Example
Sub LinearReplication()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberObjects As Long
Dim ObjectName() As String
Dim ObjectType() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'linearly replicate
ret = SapModel.SelectObj.All
ret = SapModel.EditGeneral.ReplicateLinear(0, 288, 0, 1,
NumberObjects, ObjectName, ObjectType)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ReplicateRadial
ReplicateMirror
ReplicateMirror
Syntax
SapObject.SapModel.EditSolid.ReplicateMirror
VB6 Procedure
Function ReplicateMirror(ByVal Plane As Long, ByVal x1 As Double, ByVal y1 As
Double, ByVal z1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal z2
As Double, ByVal x3 As Double, ByVal y3 As Double, ByVal z3 As Double, ByRef
NumberObjects As Long, ByRef ObjectName() As String, ByRef ObjectType()
As Long, Optional ByVal Remove As Boolean = False) As Long
Parameters
Plane
This is 1, 2, 3 or 4, indicating the mirror plane type.
1= Parallel to Z
2= Parallel to X
3= Parallel to Y
4= 3D plane
x1, y1, z1, x2, y2, z2, x3, y3, z3
These are the coordinates of three points used to define the mirror plane. [L]
When Plane = 1, x1, y1, x2 and y2 define the intersection of the mirror plane with
the XY plane.
When Plane = 2, y1, z1, y2 and z2 define the intersection of the mirror plane with
the YZ plane.
When Plane = 3, x1, z1, x2 and z2 define the intersection of the mirror plane with
the XZ plane.
When Plane = 4, x1, y1, z1, x2, y2, z2, x3, y3 and z3 define three points that
define the mirror plane.
NumberObjects
The number of new objects created by the replication process.
ObjectName
This is an array of the name of each object created by the replication process.
ObjectType
This is an array of the type of each object created by the replication process.
1= Point object
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6= Solid object
7= Link object
Remove
If this item is True, the originally selected objects are deleted after the replication
is complete.
Remarks
This function mirror replicates selected objects.
The function returns zero if the replication is successful; otherwise it returns a
nonzero value.
VBA Example
Sub MirrorReplication()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberObjects As Long
Dim ObjectName() As String
Dim ObjectType() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'mirror replicate
ret = SapModel.SelectObj.All
ret = SapModel.EditGeneral.ReplicateMirror(1, 300, 0, 0,
300, 100, 0, 0, 0, 0, NumberObjects, ObjectName, ObjectType)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ReplicateLinear
ReplicateRadial
ReplicateRadial
Syntax
SapObject.SapModel.EditSolid.ReplicateRadial
VB6 Procedure
Function ReplicateRadial(ByVal RotateAxis As Long, ByVal x1 As Double, ByVal
y1 As Double, ByVal z1 As Double, ByVal x2 As Double, ByVal y2 As Double,
ByVal z2 As Double, ByVal Number As Long, ByVal Ang As Double, ByRef
NumberObjects As Long, ByRef ObjectName() As String, ByRef ObjectType()
As Long, Optional ByVal Remove As Boolean = False) As Long
Parameters
RotateAxis
This is 1, 2, 3 or 4, indicating the rotation axis.
1= Parallel to X axis
2= Parallel to Y axis
3= Parallel to Z axis
4= 3D line
x1, y1, z1
These are coordinates used to define the rotation axis. [L]
When RotateAxis = 1, y1 and z1 define the intersection of the rotation axis with
the YZ plane.
When RotateAxis = 2, x1 and z1 define the intersection of the rotation axis with
the XZ plane.
When RotateAxis = 3, x1 and y1 define the intersection of the rotation axis with
the XY plane.
When RotateAxis = 4, x1, y1 and z1 define one point on the rotation axis.
x2, y2, z2
These are coordinates used to define the rotation axis when RotateAxis = 4. x2,
y2 and z2 define a second point on the rotation axis. [L]
Number
The increment angle for each replication.
Ang
The number of times the selected objects are to be replicated.
NumberObjects
The number of new objects created by the replication process.
ObjectName
This is an array of the name of each object created by the replication process.
ObjectType
This is an array of the type of each object created by the replication process.
1= Point object
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6 = Solid object
7 = Link object
Remove
If this item is True, the originally selected objects are deleted after the replication
is complete.
Remarks
This function radially replicates selected objects.
The function returns zero if the replication is successful; otherwise it returns a
nonzero value.
VBA Example
Sub RadialReplication()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberObjects As Long
Dim ObjectName() As String
Dim ObjectType() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'radially replicate
ret = SapModel.SelectObj.All
ret = SapModel.EditGeneral.ReplicateRadial(3, -360, 0, 0, 0,
0, 0, 2, 45, NumberObjects, ObjectName, ObjectType)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
ReplicateLinear
ReplicateMirror
New2DFrame
Syntax
SapObject.SapModel.File.New2DFrame
VB6 Procedure
Function New2DFrame(ByVal TempType As e2DFrameType, ByVal NumberStorys As
Long, ByVal StoryHeight As Double, ByVal NumberBays As Long, ByVal BayWidth As
Double, Optional ByVal Restraint As Boolean = True, Optional ByVal Beam As String
= "Default", Optional ByVal Column As String = "Default", Optional ByVal Brace As
String = "Default") As Long
Parameters
TempType
One of the following 2D frame template types in the e2DFrameType enumeration.
PortalFrame = 0
ConcentricBraced = 1
EccentricBraced = 2

NumberStorys
The number of stories in the frame.
StoryHeight
The height of each story. [L]
NumberBays
The number of bays in the frame.
BayWidth
The width of each bay. [L]
Restraint
Joint restraints are provided at the base of the frame when this item is True.
Beam
The frame section property used for all beams in the frame. This must either be
Default or the name of a defined frame section property.
Column
The frame section property used for all columns in the frame. This must either be
Default or the name of a defined frame section property.
Brace
The frame section property used for all braces in the frame. This must either be
Default or the name of a defined frame section property. This item does not apply to
the portal frame.
Remarks
Do not use this function to add to an existing model. This function should be used only
for creating a new model and typically would be preceded by calls to ApplicationStart
or InitializeNewModel.
The function returns zero if the new 2D frame model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub New2DFrameModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a 2D frame model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 12, 3, 28)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
New3DFrame
NewBeam
NewBlank
NewSolidBlock
NewWall
ApplicationStart
InitializeNewModel
New3DFrame
Syntax
SapObject.SapModel.File.New3DFrame
VB6 Procedure
Function New3DFrame(ByVal TempType As e3DFrameType, ByVal NumberStorys As
Long, ByVal StoryHeight As Double, ByVal NumberBaysX As Long, ByVal BayWidthX
As Double, ByVal NumberBaysY As Long, ByVal BayWidthY As Double, Optional
ByVal Restraint As Boolean = True, Optional ByVal Beam As String = "Default",
Optional ByVal Column As String = "Default", Optional ByVal Area As String =
"Default", Optional ByVal NumberXDivisions As Long = 4, Optional ByVal
NumberYDivisions As Long = 4) As Long
Parameters
TempType
One of the following 3D frame template types in the e3DFrameType enumeration.
OpenFrame = 0
PerimeterFrame = 1
BeamSlab = 2
FlatPlate = 3
NumberStorys
The number of stories in the frame.
StoryHeight
The height of each story. [L]
NumberBaysX
The number of bays in the global X direction of the frame.
BayWidthX
The width of each bay in the global X direction of the frame. [L]
NumberBaysY
The number of bays in the global Y direction of the frame.
BayWidthY
The width of each bay in the global Y direction of the frame. [L]
Restraint
Joint restraints are provided at the base of the frame when this item is True.
Beam
The frame section property used for all beams in the frame. This must either be
Default or the name of a defined frame section property.
Column
The frame section property used for all columns in the frame. This must either
be Default or the name of a defined frame section property.
Area
The shell section property used for all floor slabs in the frame. This must either
be Default or the name of a defined shell section property. This item does not
apply to the open and perimeter frames.
NumberXDivisions
The number of divisions for each floor area object in the global X direction. This
item does not apply to the open and perimeter frames.
NumberYDivisions
The number of divisions for each floor area object in the global Y direction. This
item does not apply to the open and perimeter frames.
Remarks
Do not use this function to add to an existing model. This function should be
used only for creating a new model and typically would be preceded by calls to
ApplicationStart or InitializeNewModel.
The function returns zero if the new 3D frame model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub New3DFrameModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a 3D frame model from template


ret = SapModel.File.New3DFrame(BeamSlab, 3, 12, 3, 28, 2,
36)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
NewBeam
NewBlank
New2DFrame
NewSolidBlock
NewWall
ApplicationStart
InitializeNewModel
NewBeam
Syntax
SapObject.SapModel.File.NewBeam
VB6 Procedure
Function NewBeam(ByVal NumberSpans As Long, ByVal SpanLength As
Double, Restraint As Boolean = True, Optional ByVal Beam As String =
"Default") As Long
Parameters
NumberSpans
The number of spans for the beam.
SpanLength
The length of each span. [L]
Restraint
Joint restraints are provided at the ends of each span when this item is True.
Beam
The frame section property used for the beam. This must either be Default or
the name of a defined frame section property.
Remarks
Do not use this function to add to an existing model. This function should be
used only for creating a new model and typically would be preceded by calls to
ApplicationStart or InitializeNewModel.
The function returns zero if the new beam model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub NewBeam()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a beam from template


ret = SapModel.File.NewBeam(3, 30)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
NewBlank
New2DFrame
New3DFrame
NewSolidBlock
NewWall
ApplicationStart
InitializeNewModel
NewBlank
Syntax
SapObject.SapModel.File.NewBlank
VB6 Procedure
Function NewBlank() As Long
Parameters
None
Remarks
Do not use this function to add to an existing model. This function should be
used only for creating a new model and typically would be preceded by calls to
ApplicationStart or InitializeNewModel.
The function returns zero if the new blank model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub NewBlankModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create a blank model from template


ret = SapModel.File.NewBlank

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
NewBeam
New2DFrame
New3DFrame
NewSolidBlock
NewWall
ApplicationStart
InitializeNewModel
NewSolidBlock
Syntax
SapObject.SapModel.File.NewSolidBlock
VB6 Procedure
Function NewSolidBlock(ByVal XWidth As Double, ByVal YWidth As Double,
ByVal Height As Double, Optional ByVal Restraint As Boolean = True, Optional
ByVal Solid As String = "Default", Optional ByVal NumberXDivisions As Long =
5, Optional ByVal NumberYDivisions As Long = 8, Optional ByVal
NumberZDivisions As Long = 10) As Long
Parameters
XWidth
The total width of the solid block measured in the global X direction. [L]
YWidth
The total width of the solid block measured in the global Y direction. [L]
Height
The total height of the solid block measured in the global Z direction. [L]
Restraint
Joint restraints are provided at the base of the solid block when this item is True.
Solid
The solid property used for the solid block. This must either be Default or the
name of a defined solid property.
NumberXDivisions
The number of solid objects in the global X direction of the block.
NumberYDivisions
The number of solid objects in the global Y direction of the block.
NumberZDivisions
The number of solid objects in the global Z direction of the block.
Remarks
The function returns zero if the new solid block model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub NewSolidBlock()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a solid model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
NewBlank
NewBeam
New2DFrame
New3DFrame
NewWall
NewWall
Syntax
SapObject.SapModel.File.NewWall
VB6 Procedure
Function NewWall(ByVal NumberXDivisions As Long, ByVal DivisionWidthX As
Double, ByVal NumberZDivisions As Long, ByVal DivisionWidthZ As Double,
Optional ByVal Restraint As Boolean = True, Optional ByVal Area As String =
"Default") As Long
Parameters
NumberXDivisions
The number of area objects in the global X direction of the wall.
DivisionWidthX
The width of each area object measured in the global X direction. [L]
NumberZDivisions
The number of area objects in the global Z direction of the wall.
DivisionWidthZ
The height of each area object measured in the global Z direction. [L]
Restraint
Joint restraints are provided at the base of the wall when this item is True.
Area
The shell section property used for the wall. This must either be Default or the
name of a defined shell section property.
Remarks
Do not use this function to add to an existing model. This function should be
used only for creating a new model and typically would be preceded by calls to
ApplicationStart or InitializeNewModel.
The function returns zero if the new wall model is successfully created,
otherwise it returns a nonzero value.
VBA Example
Sub NewWall()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel(kip_ft_F)

'create a wall model from template


ret = SapModel.File.NewWall(6, 4, 6, 4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
NewBlank
NewBeam
New2DFrame
New3DFrame
NewSolidBlock
ApplicationStart
InitializeNewModel
OpenFile
Syntax
SapObject.SapModel.File.OpenFile
VB6 Procedure
Function OpenFile(ByVal FileName As String) As Long
Parameters
FileName
The full path of a model file to be opened in the Sap2000 application.
Remarks
This function opens an existing Sap2000 file. The file name must have an sdb, $2k,
s2k, xlsx, xls, or mdb extension. Files with sdb extensions are opened as standard
Sap2000 files. Files with $2k and s2k extensions are imported as text files. Files with
xlsx and xls extensions are imported as Microsoft Excel files. Files with mdb
extensions are imported as Microsoft Access files.
This function returns zero if the file is successfully opened and nonzero if it is not
opened.
The function is only applicable when you are accessing the Sap2000 API from an
external application. It will return an error if you call it from VBA inside Sap2000.
VBA Example
Sub OpenSDB()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim FileName as String
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\Example 1-019a.sdb"
ret = SapModel.File.OpenFile(FileName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.

Added reference to xlsx file extension in SAP2000 v15.0.0 and CSiBridge v15.1.0.
See Also
ApplicationStart
Save
Save
Syntax
SapObject.SapModel.File.Save
VB6 Procedure
Function FileSave(Optional ByVal FileName As String = "") As Long
Parameters
FileName
The full path to which the model file is saved.
Remarks
If a file name is specified, it should have an .sdb extension. If no file name is
specified, the file is saved using its current name.
If there is no current name for the file (the file has not been saved previously) and this
function is called with no file name specified, an error will be returned.
This function returns zero if the file is successfully saved and nonzero if it is not
saved.
VBA Example
Sub SaveSDB()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim FileName as String
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'save SDB file


ret=SapModel.File.Save("C:\SapAPI\x.sdb")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
OpenFile
GetBridgeUpdateData
Syntax
SapObject.SapModel.BridgeObj.GetBridgeUpdateData
VB6 Procedure
Function GetBridgeUpdateData(ByVal Name As String, ByRef
LinkedModelExists As Boolean, ByRef ModelType As Long, ByRef
MaxDeckSegLength As Double, ByRef MaxCapSegLength As Double, ByRef
MaxColSegLength As Double, ByRef SubMeshSize As Double) As Long
Parameters
Name
The name of an existing bridge object.
LinkedModelExists
This item is True if a linked bridge model exists for the specified bridge object.
ModelType
This is 1, 2 or 3, indicating the linked bridge model type. This item applies only
when the LinkedModelExists item is True.
1 = Spine model (frame).
2 = Area model.
3 = Solid model.
MaxDeckSegLength
The maximum length for the deck objects in the linked bridge model. This item
applies only when the LinkedModelExists item is True. [L]
MaxCapSegLength
The maximum length for the cap beam objects in the linked bridge model. This
item applies only when the LinkedModelExists item is True. [L]
MaxColSegLength
The maximum length for the column objects in the linked bridge model. This item
applies only when the LinkedModelExists item is True. [L]
SubMeshSize
The maximum submesh size for area and solid objects in the linked bridge
model. This item applies only when the LinkedModelExists item is True and the
ModelType item is 2 or 3 (area or solid model). [L]
Remarks
This function returns a flag indicating if the specified bridge object is currently
linked to existing objects in the model. If the bridge object is linked, it returns the
model type (spine, area or solid) and meshing data used when the linked bridge
model was updated.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a bridge object
named BOBJ1 in it.
Sub GetBridgeObjectUpdateData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim LinkedModelExists As Boolean
Dim ModelType As Long
Dim MaxDeckSegLength As Double
Dim MaxCapSegLength As Double
Dim MaxColSegLength As Double
Dim SubMeshSize As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get bridge update data


ret = SapModel.BridgeObj.GetBridgeUpdateData("BOBJ1",
LinkedModelExists, ModelType, MaxDeckSegLength, MaxCapSegLength,
MaxColSegLength, SubMeshSize)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.20.
See Also
SetBridgeUpdateData
GetBridgeUpdateForAnalysisFlag
Syntax
SapObject.SapModel.BridgeObj.GetBridgeUpdateForAnalysisFlag
VB6 Procedure
Function GetBridgeUpdateForAnalysisFlag() As Boolean
Parameters
None
Remarks
When this flag is True, the program automatically updates bridge objects before
running an analysis if it detects anything has been changed that might affect the
bridge analysis.
This flag is by default set to True for each new Sap2000 Object.
VBA Example
Sub GetBridgeAnalysisFlag()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Flag as Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get flag
Flag = SapModel.BridgeObj.GetBridgeUpdateForAnalysisFlag

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetBridgeUpdateForAnalysisFlag
SetBridgeUpdateData
Syntax
SapObject.SapModel.BridgeObj.SetBridgeUpdateData
VB6 Procedure
Function SetBridgeUpdateData(ByVal Name As String, ByVal Action As Long,
ByVal ModelType As Long, ByVal MaxDeckSegLength As Double, ByVal
MaxCapSegLength As Double, ByVal MaxColSegLength As Double, ByVal
SubMeshSize As Double) As Long
Parameters
Name
The name of an existing bridge object.
Action
This is 1, 2 or 3, indicating the action to be taken.
1 = Update linked model.
2 = Clear all from linked model.
3 = Convert to unlinked model.
ModelType
This is 1, 2 or 3, indicating the linked bridge model type. This item applies only
when the Action item is 1 (update linked model).
1 = Spine model (frame).
2 = Area model.
3 = Solid model.
MaxDeckSegLength
The maximum length for the deck objects in the linked bridge model. This item
applies only when the Action item is 1 (update linked model). [L]
MaxCapSegLength
The maximum length for the cap beam objects in the linked bridge model. This
item applies only when the Action item is 1 (update linked model). [L]
MaxColSegLength
The maximum length for the column objects in the linked bridge model. This item
applies only when the Action item is 1 (update linked model). [L]
SubMeshSize
The maximum submesh size for area and solid objects in the linked bridge
model. This item applies only when the Action item is 1 (update linked model) and
the ModelType item is 2 or 3 (area or solid model). [L]
Remarks
This function updates a linked bridge model, clears all objects from a linked
bridge model, or converts a linked bridge model to an unlinked model.
The function returns zero if it is successful.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a bridge object
named BOBJ1 in it.
Sub SetBridgeObjectUpdateData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'update linked bridge model


ret = SapModel.BridgeObj.SetBridgeUpdateData("BOBJ1", 1, 2,
150, 150, 150, 50)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.20.
See Also
GetBridgeUpdateData
SetBridgeUpdateForAnalysisFlag
Syntax
SapObject.SapModel.BridgeObj.SetBridgeUpdateForAnalysisFlag
VB6 Procedure
Function GetBridgeUpdateForAnalysisFlag(Value As Boolean) As Long
Parameters
Value
A boolean (True or False) value. When this item is True the program
automatically updates bridge objects before running an analysis if it detects
anything has been changed that might affect the bridge analysis.
Remarks
This function returns zero if the flag is successfully set, otherwise it returns a
nonzero value.
This flag is by default set to True for each new Sap2000 Object.
VBA Example
Sub SetBridgeAnalysisFlag()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Flag as Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'set flag
Flag = False
ret =
SapModel.BridgeObj.SetBridgeUpdateForAnalysisFlag(Flag)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetBridgeUpdateForAnalysisFlag
Add
Syntax
SapObject.SapModel.RespCombo.Add
VB6 Procedure
Function Add(ByVal Name As String, ByVal ComboType As Long) As Long
Parameters
Name
The name of a new load combination.
ComboType
This is 0, 1, 2, 3 or 4 indicating the load combination type.
0= Linear Additive
1= Envelope
2= Absolute Additive
3= SRSS
4= Range Additive
Remarks
This function adds a new load combination.
The function returns zero if the load combination is successfully added,
otherwise it returns a nonzero value.
The new load combination must have a different name from all other load
combinations and all load cases. If the name is not unique, an error will be
returned.
VBA Example
Sub AddNewCombo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AddDesignDefaultCombos
AddDesignDefaultCombos
Syntax
SapObject.SapModel.RespCombo.AddDesignDefaultCombos
VB6 Procedure
Function AddDesignDefaultCombos(ByVal DesignSteel As Boolean, ByVal
DesignConcrete As Boolean, ByVal DesignAluminum As Boolean, ByVal
DesignColdFormed As Boolean) As Long
Parameters
DesignSteel
If this item is True, default steel design combinations are to be added to the
model.
DesignConcrete
If this item is True, default concrete design combinations are to be added to the
model.
DesignAluminum
If this item is True, default aluminum design combinations are to be added to the
model.
DesignColdFormed
If this item is True, default cold formed design combinations are to be added to
the model.
Remarks
This function adds a new default design load combinations to the model.
The function returns zero if the load combinations are successfully added,
otherwise it returns a nonzero value.
VBA Example
Sub AddNewDefaultSteelDesignCombos()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add combo
ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False,
False, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Add
ChangeName
Syntax
SapObject.SapModel.RespCombo.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined load combination.
NewName
The new name for the combination.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
The new load combination name must be different from all other load
combinations and all load cases. If the name is not unique, an error will be
returned.
VBA Example
Sub ChangeComboName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 1)

'change combo name


ret = SapModel.RespCombo.ChangeName("COMB1", "MyCombo")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.RespCombo.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of load combinations defined in the model.
VBA Example
Sub CountCombos()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 1)

'return number of combos


Count = SapModel.RespCombo.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
CountCase
Syntax
SapObject.SapModel.RespCombo.CountCase
VB6 Procedure
Function CountCase(ByVal Name As String, ByRef Count As Long) As Long
Parameters
Name
The name of an existing load combination.
Count
The number of load case and/or combinations included in the specified
combination.
Remarks
This function retrieves the total number of load case and/or combinations
included in a specified load combination.
The function returns zero if the count is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub CountComboCases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add load case to combo


ret = SapModel.RespCombo.SetCaseList("COMB1", LoadCase,
"DEAD", 1.4)

'count cases and combos in combo COMB1


ret = SapModel.RespCombo.CountCase("COMB1", Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetCaseList
SetCaseList
Delete
Syntax
SapObject.SapModel.RespCombo.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing load combination.
Remarks
This function deletes the specified load combination.
The function returns zero if the combination is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeleteCombo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'delete combo
ret = SapModel.RespCombo.Delete("COMB1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Add
DeleteCase
Syntax
SapObject.SapModel.RespCombo.DeleteCase
VB6 Procedure
Function DeleteCase(ByVal Name As String, ByVal CType As eCType, ByVal
CName As String) As Long
Parameters
Name
The name of an existing load combination.
CType
This is one of the following items in the eCType enumeration:
LoadCase = 0
LoadCombo = 1

This item indicates whether the CName item is an analysis case (LoadCase) or
a load combination (LoadCombo).
CName
The name of the load case or load combination to be deleted from the specified
combination.
Remarks
This function deletes one load case or load combination from the list of cases
included in the specified load combination.
The function returns zero if the item is successfully deleted, otherwise it returns
a nonzero value.
VBA Example
Sub DeleteComboCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add load case to combo


ret = SapModel.RespCombo.SetCaseList("COMB1", LoadCase,
"DEAD", 1.4)

'delete load case from combo


ret = SapModel.RespCombo.DeleteCase("COMB1", LoadCase,
"DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetCaseList
SetCaseList
GetCaseList
Syntax
SapObject.SapModel.RespCombo.GetCaseList
VB6 Procedure
Function GetCaseList(ByVal Name As String, ByRef NumberItems As Long,
ByRef CType() As eCType, ByRef CName() As String, ByRef SF() As Double)
As Long
Parameters
Name
The name of an existing load combination.
NumberItems
The total number of load cases and load combinations included in the load
combination specified by the Name item.
CType
This is an array of one of the following items in the eCType enumeration:
LoadCase = 0
LoadCombo = 1

This item indicates if the associated CName item is an load case (LoadCase)
or a load combination (LoadCombo).
CName
This is an array of the names of the load cases or load combinations included in
the load combination specified by the Name item.
SF
The scale factor multiplying the case or combination indicated by the CName
item.
Remarks
This function returns all load cases and response combinations included in the
load combination specified by the Name item.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetCasesInCombo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CType() As eCType
Dim CName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add load case to combo


ret = SapModel.RespCombo.SetCaseList("COMB1", LoadCase,
"DEAD", 1.4)

'get all cases and combos included in combo COMB1


ret = SapModel.RespCombo.GetCaseList("COMB1", NumberItems,
CType, CName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetCaseList
GetNameList
Syntax
SapObject.SapModel.RespCombo.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of load combination names retrieved by the program.
MyName
This is a one-dimensional array of load combination names. The MyName array
is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined response combinations.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetComboNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combos
ret = SapModel.RespCombo.Add("COMB1", 0)
ret = SapModel.RespCombo.Add("COMB2", 2)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNote
Syntax
SapObject.SapModel.RespCombo.GetNote
VB6 Procedure
Function GetNote(ByVal Name As String, ByRef Note As String) As Long
Parameters
Name
The name of an existing load combination.
Note
The user note, if any, included with the specified combination.
Remarks
This function retrieves the user note for specified response combination. The
note may be blank.
The function returns zero if the note is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetComboNote()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Note As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add note to combo


ret = SapModel.RespCombo.SetNote("COMB1", "My combo note")

'get note for combo


ret = SapModel.RespCombo.GetNote("COMB1", Note)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNote
GetTypeOAPI
Syntax
SapObject.SapModel.RespCombo.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef ComboType As Long) As
Long
Parameters
Name
The name of an existing load combination.
ComboType
This is 0, 1, 2, 3 or 4 indicating the load combination type.
0= Linear Additive
1= Envelope
2= Absolute Additive
3= SRSS
4= Range Additive
Remarks
This function retrieves the combination type for specified load combination.
The function returns zero if the type is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetComboType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ComboType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 2)

'get combo type


ret = SapModel.RespCombo.GetTypeOAPI("COMB1", ComboType )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
SetTypeOAPI
SetCaseList
Syntax
SapObject.SapModel.RespCombo.SetCaseList
VB6 Procedure
Function SetCaseList(ByVal Name As String, CType As eCType, ByVal CName
As String, ByVal SF As Double) As Long
Parameters
Name
The name of an existing load combination.
CType
This is one of the following items in the eCType enumeration:
LoadCase = 0
LoadCombo = 1

This item indicates if the CName item is an load case (LoadCase) or a load
combination (LoadCombo).
CName
The name of the load case or load combination to be added to or modified in the
combination specified by the Name item. If the load case or combination already
exists in the combination specified by the Name item, the scale factor is
modified as indicated by the SF item for that load case or combination. If the
analysis case or combination does not exist in the combination specified by the
Name item, it is added.
SF
The scale factor multiplying the case or combination indicated by the CName
item.
Remarks
This function adds or modifies one load case or response combination in the list
of cases included in the load combination specified by the Name item.
The function returns zero if the item is successfully added or modified, otherwise
it returns a nonzero value.
VBA Example
Sub AddCaseToCombo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add load case to combo


ret = SapModel.RespCombo.SetCaseList("COMB1", LoadCase,
"DEAD", 1.4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetCaseList
SetNote
Syntax
SapObject.SapModel.RespCombo.SetNote
VB6 Procedure
Function SetNote(ByVal Name As String, ByVal Note As String) As Long
Parameters
Name
The name of an existing load combination.
Note
The user note included with the specified combination. It may be a blank string.
Remarks
This function sets the user note for specified response combination. The note
may be blank.
The function returns zero if the note is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub AddComboNote()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Note As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'add note to combo


ret = SapModel.RespCombo.SetNote("COMB1", "My combo note")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNote
SetTypeOAPI
Syntax
SapObject.SapModel.RespCombo.SetTypeOAPI
VB6 Procedure
Function SetTypeOAPI(ByVal Name As String, ByVal ComboType As Long) As
Long
Parameters
Name
The name of an existing load combination.
ComboType
This is 0, 1, 2, 3 or 4 indicating the load combination type.
0= Linear Additive
1= Envelope
2= Absolute Additive
3= SRSS
4= Range Additive
Remarks
This function sets the combination type for specified load combination.
The function returns zero if the type is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetComboType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add combo
ret = SapModel.RespCombo.Add("COMB1", 0)

'set combo type to Envelope


ret = SapModel.RespCombo.SetTypeOAPI("COMB1", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Changed function name to SetTypeOAPI in v17.0.0.
See Also
GetTypeOAPI
ChangeName
Syntax
SapObject.SapModel.ConstraintDef.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined constraint.
NewName
The new name for the constraint.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangeConstraintName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1",
AutoAxis)

'change name of contraint


ret = SapModel.ConstraintDef.ChangeName("Diaph1",
"MyConstraint")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.ConstraintDef.Count
VB6 Procedure
Function Count(Optional ByVal ConstraintType As eConstraintType) As Long
Parameters
ConstraintType
This optional value is one of the following items in the eConstraintType
enumeration.
CONSTRAINT_BODY = 1
CONSTRAINT_DIAPHRAGM = 2
CONSTRAINT_PLATE = 3
CONSTRAINT_ROD = 4
CONSTRAINT_BEAM = 5
CONSTRAINT_EQUAL = 6
CONSTRAINT_LOCAL = 7
CONSTRAINT_WELD = 8
CONSTRAINT_LINE = 13
Remarks
If the ConstraintType item is specified, the function returns the number of
defined constraints of the specified type. Otherwise it returns the total number of
defined constraints without regard for type.
VBA Example
Sub CountConstraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined constraints


ret = SapModel.ConstraintDef.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument ConstraintType to be ByVal in version 12.0.1.
See Also
Delete
Syntax
SapObject.Sap2000.ConstraintDef.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing constraint.
Remarks
The function deletes the specified constraint. All constraint assignments for that
constraint are also deleted.
The function returns zero if the constraint is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeleteConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1",
AutoAxis)

'delete constraint
ret = SapModel.ConstraintDef.Delete("Diaph1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetBeam
SetBody
SetDiaphragm
SetEqual
SetLine
SetLocal
SetPlate
SetRod
SetWeld
GetBeam
Syntax
SapObject.SapModel.ConstraintDef.GetBeam
VB6 Procedure
Function GetBeam(ByVal Name As String, ByRef Axis As eConstraintAxis,
ByRef CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is parallel to the axis of
the constraint. If AutoAxis is specified, the axis of the constraint is automatically
determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetBeamConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintType As eConstraintType
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


ret = SapModel.ConstraintDef.SetBeam("Beam1")

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Beam1",
ConstraintType)
If ConstraintType = CONSTRAINT_BEAM Then
ret = SapModel.ConstraintDef.GetBeam("Beam1", Axis, CSys)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetBeam
GetBody
Syntax
SapObject.SapModel.ConstraintDef.GetBody
VB6 Procedure
Function GetBody(ByVal Name As String, ByRef Value() As Boolean, ByRef
CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetBodyConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim CSys as String
Dim UY as Boolean
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetBody("Body1", Value)

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Body1",
ConstraintType)
If ConstraintType = CONSTRAINT_BODY Then
ret = SapModel.ConstraintDef.GetBody("Body1", Value,
CSys)
if ret = 0 Then UY = Value(1)
End If
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetBody
GetConstraintType
Syntax
SapObject.SapModel.ConstraintDef.GetConstraintType
VB6 Procedure
Function GetConstraintType(ByVal Name As String, ByRef ConstraintType As
eConstraintType) As Long
Parameters
Name
The name of an existing constraint.
ConstraintType
This optional value is one of the following items in the eConstraintType
enumeration.
CONSTRAINT_BODY = 1
CONSTRAINT_DIAPHRAGM = 2
CONSTRAINT_PLATE = 3
CONSTRAINT_ROD = 4
CONSTRAINT_BEAM = 5
CONSTRAINT_EQUAL = 6
CONSTRAINT_LOCAL = 7
CONSTRAINT_WELD = 8
CONSTRAINT_LINE = 13
Remarks
The function returns the constraint type for the specified constraint.
The function returns zero if the constraint type is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub ConstraintType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1",
AutoAxis)

'get constraint type


ret = SapModel.ConstraintDef.GetConstraintType("Diaph1",
ConstraintType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetBeam
GetBody
GetDiaphragm
GetEqual
GetLine
GetLocal
GetPlate
GetRod
GetWeld
GetDiaphragm
Syntax
SapObject.SapModel.ConstraintDef.GetDiaphragm
VB6 Procedure
Function GetDiaphragm(ByVal Name As String, ByRef Axis As eConstraintAxis,
ByRef CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is perpendicular to the
plane of the constraint. If AutoAxis is specified, the axis of the constraint is
automatically determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetDiaphragmConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintType As eConstraintType
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Diaph1",
ConstraintType)
If ConstraintType = CONSTRAINT_DIAPHRAGM Then
ret = SapModel.ConstraintDef.GetDiaphragm("Diaph1", Axis,
CSys)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetDiaphragm
GetEqual
Syntax
SapObject.SapModel.ConstraintDef.GetEqual
VB6 Procedure
Function GetEqual(ByVal Name As String, ByRef Value() As Boolean, ByRef
CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetEqualConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim CSys as String
Dim UY as Boolean
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetEqual("Equal1", Value)

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Equal1",
ConstraintType)
If ConstraintType = CONSTRAINT_EQUAL Then
ret = SapModel.ConstraintDef.GetEqual("Equal1", Value,
CSys)
if ret = 0 Then UY = Value(1)
End If
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetEqual
GetLine
Syntax
SapObject.SapModel.ConstraintDef.GetLine
VB6 Procedure
Function GetLine(ByVal Name As String, ByRef Value() As Boolean, ByRef
CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetLineConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim CSys as String
Dim UY as Boolean
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetLine("Line1", Value)

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Line1",
ConstraintType)
If ConstraintType = CONSTRAINT_LINE Then
ret = SapModel.ConstraintDef.GetLine("Line1", Value,
CSys)
if ret = 0 Then UY = Value(1)
End If
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLine
GetLocal
Syntax
SapObject.SapModel.ConstraintDef.GetLocal
VB6 Procedure
Function GetLocal(ByVal Name As String, ByRef Value() As Boolean) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are U1, U2, U3, R1, R2 and R3.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetLocalConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim UY as Boolean
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetLocal("Local1", Value)

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Local1",
ConstraintType)
If ConstraintType = CONSTRAINT_LOCAL Then
ret = SapModel.ConstraintDef.GetLocal("Local1", Value)
if ret = 0 Then UY = Value(1)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocal
GetNameList
Syntax
SapObject.SapModel.ConstraintDef.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of joint constraint names retrieved by the program.
MyName
This is a one-dimensional array of joint constraint names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined joint constraints.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetJointConstraintNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1",
AutoAxis)

'get constraint names


ret = SapModel.ConstraintDef.GetNameList(NumberNames,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPlate
Syntax
SapObject.SapModel.ConstraintDef.GetPlate
VB6 Procedure
Function GetPlate(ByVal Name As String, ByRef Axis As eConstraintAxis,
ByRef CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is perpendicular to the
plane of the constraint. If AutoAxis is specified, the axis of the constraint is
automatically determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetPlateConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintType As eConstraintType
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetPlate("Plate1")

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Plate1",
ConstraintType)
If ConstraintType = CONSTRAINT_PLATE Then
ret = SapModel.ConstraintDef.GetPlate("Plate1", Axis,
CSys)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPlate
GetRod
Syntax
SapObject.SapModel.ConstraintDef.GetRod
VB6 Procedure
Function GetRod(ByVal Name As String, ByRef Axis As eConstraintAxis, ByRef
CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is parallel to the axis of
the constraint. If AutoAxis is specified, the axis of the constraint is automatically
determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetRodConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintType As eConstraintType
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetRod("Rod1")

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Rod1",
ConstraintType)
If ConstraintType = CONSTRAINT_ROD Then
ret = SapModel.ConstraintDef.GetRod("Rod1", Axis, CSys)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetRod
GetSpecialRigidDiaphragmList
Syntax
SapObject.SapModel.ConstraintDef.GetSpecialRigidDiaphragmList
VB6 Procedure
Function GetSpecialRigidDiaphragmList(ByRef Num As Long, ByRefDiaph() As
String) As Long
Parameters
Num
The number of special rigid diaphragm constraints.
Diaph
This is an array that includes the name of each special rigid diaphragm
constraint.
Remarks
This function retrieves the list of the names of each special rigid diaphragm
constraint. A special rigid diaphragm constraint is required for assignment of
auto seismic load diaphragm eccentricity overwrites. It is also required for
calculation of auto wind loads whose exposure widths are determined from the
extents of rigid diaphragms.
A special rigid diaphragm constraint is a constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.

The function returns zero if the name list is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSpecialDiaphragmList()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2")
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph3", Z)

'get special rigid diaphragm name list


ret =
SapModel.ConstraintDef.GetSpecialRigidDiaphragmList(Num, Diaph)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetWeld
Syntax
SapObject.SapModel.ConstraintDef.GetWeld
VB6 Procedure
Function GetWeld(ByVal Name As String, ByRef Value() As Boolean, ByRef
Tolerance As Double, ByRef CSys As String) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
Tolerance
Joints within this distance of each other are constrained together.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
The function returns the definition for the specified constraint.
The function returns zero if the constraint data is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetWeldConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim Tolerance As Double
Dim CSys as String
Dim UY as Boolean
Dim ConstraintType As eConstraintType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
Tolerance = 2
ret = SapModel.ConstraintDef.SetWeld("Weld1", Value,
Tolerance)

'get constraint data


ret = SapModel.ConstraintDef.GetConstraintType("Weld1",
ConstraintType)
If ConstraintType = CONSTRAINT_WELD Then
ret = SapModel.ConstraintDef.GetWeld("Weld1", Value,
Tolerance, CSys)
if ret = 0 Then UY = Value(1)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetWeld
SetBeam
Syntax
SapObject.SapModel.ConstraintDef.SetBeam
VB6 Procedure
Function SetBeam(ByVal Name As String, Optional ByVal Axis As
eConstraintAxis = AutoAxis, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is parallel to the axis of
the constraint. If AutoAxis is specified, the axis of the constraint is automatically
determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Beam constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Beam constraint, the definition of that
constraint is modified. If the specified name is already used for some constraint
that is not a Beam constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetBeamConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetBeam("Beam1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetBeam
SetBody
Syntax
SapObject.SapModel.ConstraintDef.SetBody
VB6 Procedure
Function SetBody(ByVal Name As String, ByRef Value() As Boolean, Optional
ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Body constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Body constraint, the definition of that
constraint is modified. If the specified name is already used for some constraint
that is not a Body constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetBodyConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetBody("Body1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetBody
SetDiaphragm
Syntax
SapObject.SapModel.ConstraintDef.SetDiaphragm
VB6 Procedure
Function SetDiaphragm(ByVal Name As String, Optional ByVal Axis As
eConstraintAxis = AutoAxis, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is perpendicular to the
plane of the constraint. If AutoAxis is specified, the axis of the constraint is
automatically determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Diaphragm constraint. If the specified name is not used
for a constraint, a new constraint is defined using the specified name. If the
specified name is already used for another Diaphragm constraint, the definition
of that constraint is modified. If the specified name is already used for some
constraint that is not a Diaphragm constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetDiaphragmConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetDiaphragm
SetEqual
Syntax
SapObject.SapModel.ConstraintDef.SetEqual
VB6 Procedure
Function SetEqual(ByVal Name As String, ByRef Value() As Boolean, Optional
ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines an Equal constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified name
is already used for another Equal constraint, the definition of that constraint is
modified. If the specified name is already used for some constraint that is not an
Equal constraint, an error is returned.
The function returns zero if the constraint data is successfully added or modified,
otherwise it returns a nonzero value.
VBA Example
Sub SetEqualConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetEqual("Equal1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEqual
SetLine
Syntax
SapObject.SapModel.ConstraintDef.SetLine
VB6 Procedure
Function SetLine(ByVal Name As String, ByRef Value() As Boolean, Optional
ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Line constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Line constraint, the definition of that constraint
is modified. If the specified name is already used for some constraint that is not
a Line constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetLineConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetLine("Line1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLine
SetLocal
Syntax
SapObject.SapModel.ConstraintDef.SetLocal
VB6 Procedure
Function SetLocal(ByVal Name As String, ByRef Value() As Boolean) As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are U1, U2, U3, R1, R2 and R3.
Remarks
This function defines a Local constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Local constraint, the definition of that
constraint is modified. If the specified name is already used for some constraint
that is not a Local constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetLocalConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
ret = SapModel.ConstraintDef.SetLocal("Local1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocal
SetPlate
Syntax
SapObject.SapModel.ConstraintDef.SetPlate
VB6 Procedure
Function SetPlate(ByVal Name As String, Optional ByVal Axis As
eConstraintAxis = AutoAxis, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is perpendicular to the
plane of the constraint. If AutoAxis is specified, the axis of the constraint is
automatically determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Plate constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Plate constraint, the definition of that
constraint is modified. If the specified name is already used for some constraint
that is not a Plate constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetPlateConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetPlate("Plate1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPlate
SetRod
Syntax
SapObject.SapModel.ConstraintDef.SetRod
VB6 Procedure
Function SetRod(ByVal Name As String, Optional ByVal Axis As eConstraintAxis
= AutoAxis, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a constraint.
Axis
This is one of the following items from the eConstraintAxis enumeration. It
specifies the axis in the specified coordinate system that is parallel to the axis of
the constraint. If AutoAxis is specified, the axis of the constraint is automatically
determined from the joints assigned to the constraint.
X=1
Y=2
Z=3
AutoAxis = 4
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Rod constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Rod constraint, the definition of that constraint
is modified. If the specified name is already used for some constraint that is not
a Rod constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetRodConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Axis As eConstraintAxis
Dim CSys as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new constraint


ret = SapModel.ConstraintDef.SetRod("Rod1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRod
SetWeld
Syntax
SapObject.SapModel.ConstraintDef.SetWeld
VB6 Procedure
Function SetWeld(ByVal Name As String, ByRef Value() As Boolean, ByVal
Tolerance As Double, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing constraint.
Value
Value is an array of six booleans that indicate which joint degrees of freedom
are included in the constraint. In order, the degrees of freedom addressed in the
array are UX, UY, UZ, RX, RY and RZ.
Tolerance
Joints within this distance of each other are constrained together.
CSys
The name of the coordinate system in which the constraint is defined.
Remarks
This function defines a Weld constraint. If the specified name is not used for a
constraint, a new constraint is defined using the specified name. If the specified
name is already used for another Weld constraint, the definition of that
constraint is modified. If the specified name is already used for some constraint
that is not a Weld constraint, an error is returned.
The function returns zero if the constraint data is successfully added or
modified, otherwise it returns a nonzero value.
VBA Example
Sub SetWeldConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as long
Dim ret As Long
Dim Value() As Boolean
Dim Tolerance As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new contraint


redim Value(5)
for i = 0 To 5
Value(i) = True
Next i
Tolerance = 1
ret = SapModel.ConstraintDef.SetWeld("Weld1", Value,
Tolerance)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetWeld
ChangeName
Syntax
SapObject.SapModel.CoordSys.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined coordinate system.
NewName
The new name for the coordinate system.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
Changing the name of the Global coordinate system will fail and return an error.
VBA Example
Sub ChangeCoordSystemName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'change name of new coordinate system


ret = SapModel.CoordSys.ChangeName("CSys1", "MyCSys")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.CoordSys.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
The function returns the number of defined coordinate systems.
VBA Example
Sub CountCoordSystems()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined coordinate systems


ret = SapModel.CoordSys.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.CoordSys.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing coordinate system.
Remarks
The function deletes the specified coordinate system. Attempting to delete the
Global coordinate system will fail and return an error.
The function returns zero if the coordinate system is successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCoordSystem()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'delete coordinate system


ret = SapModel.CoordSys.Delete("CSys1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetCoordSys
GetCoordSys
Syntax
SapObject.SapModel.CoordSys.GetCoordSys
VB6 Procedure
Function GetCoordSys(ByVal Name As String, ByRef x As Double, ByRef y As
Double, ByRef z As Double, ByRef RZ As Double, ByRef RY As Double, ByRef
RX As Double) As Long
Parameters
Name
The name of an existing coordinate system.
x
The global X coordinate of the origin of the coordinate system. [L]
y
The global Y coordinate of the origin of the coordinate system. [L]
z
The global Z coordinate of the origin of the coordinate system. [L]
RZ, RY, RX
The rotation of an axis of the new coordinate system relative to the global
coordinate system is defined as follows: (1) Rotate the coordinate system about
the positive global Z-axis as defined by the RZ item. (2) Rotate the coordinate
system about the positive global Y-axis as defined by the RY item. (3) Rotate the
coordinate system about the positive global X-axis as defined by the RX
item. Note that the order in which these rotations are performed is
important. RX, RY and RZ are angles in degrees [deg].
Remarks
The function returns zero if the coordinate system data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCoordSystem()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim x as Double, y as Double, z as Double
Dim RX as Double, RY as Double, RZ as Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'get new coordinate system data


ret = SapModel.CoordSys.GetCoordSys("CSys1", x, y, z, RZ,
RY, RX)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetCoordSys
GetNameList
Syntax
SapObject.SapModel.CoordSys.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of coordinate system names retrieved by the program.
MyName
This is a one-dimensional array of coordinate system names. The MyName
array is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined coordinate systems.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetCoordinateSystemNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get coordinate system names


ret = SapModel.CoordSys.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTransformationMatrix
Syntax
SapObject.SapModel.CoordSys.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing coordinate system.
Value
Value is an array of nine direction cosines that define the transformation matrix
from the specified global coordinate system to the global coordinate system.
The following matrix equation shows how the transformation matrix is used to
convert coordinates from a coordinate system to the global coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array;
(x, y, z) are the coordinates of a point in the CSys coordinate system; (ux, uy, uz)
are the offset of the origin of the CSys coordinate system from the global
coordinate system; and (gx, gy, gz) are the global coordinates of the point.
Remarks
The function returns zero if the coordinate system transformation matrix is
successfully returned, otherwise it returns a nonzero value.
VBA Example
Sub GetCoordSystemMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Value() as double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'get coordinate system transformation matrix


redim Value(8)
ret = SapModel.CoordSys.GetTransformationMatrix("CSys1",
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetCoordSys
Syntax
SapObject.SapModel.CoordSys.SetCoordSys
VB6 Procedure
Function SetCoordSys(ByVal Name As String, ByVal x As Double, ByVal y As
Double, ByVal z As Double, ByVal RZ As Double, ByVal RY As Double, ByVal RX
As Double) As Long
Parameters
Name
This is the name of a coordinate system. If this is the name of an existing
coordinate system, that coordinate system is modified, otherwise a new
coordinate system is added.
x
The global X coordinate of the origin of the coordinate system. [L]
y
The global Y coordinate of the origin of the coordinate system. [L]
z
The global Z coordinate of the origin of the coordinate system. [L]
RZ, RY, RX
The rotation of an axis of the new coordinate system relative to the global
coordinate system is defined as follows: (1) Rotate the coordinate system about
the positive global Z-axis as defined by the RZ item. (2) Rotate the coordinate
system about the positive global Y-axis as defined by the RY item. (3) Rotate the
coordinate system about the positive global X-axis as defined by the RX
item. Note that the order in which these rotations are performed is
important. RX, RY and RZ are angles in degrees [deg].
Remarks
The function returns zero if the coordinate system is successfully added or
modified, otherwise it returns a nonzero value.
Modifying the Global coordinate system will fail and return an error.
VBA Example
Sub AddCoordSystem()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new coordinate system


ret = SapModel.CoordSys.SetCoordSys("CSys1", 1000, 1000, 0,
0, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordSys
Delete
ChangeName
Syntax
SapObject.SapModel.Func.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined function.
NewName
The new name for the function.
Remarks
This function changes the name of an existing function.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeFunctionName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name of function


ret = SapModel.Func.ChangeName("UNIFRS", "MyFunc")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
See Also
ConvertToUser
Syntax
SapObject.SapModel.Func.ConvertToUser
VB6 Procedure
Function ConvertToUser(ByVal Name As String) As Long
Parameters
Name
The name of an existing function that is not a user defined function.
Remarks
This function converts an existing function to a user defined function.
The function returns zero if the function definition is successfully converted;
otherwise it returns a nonzero value. An error is returned if the specified function
is already a user defined function.
VBA Example
Sub ConvertFuncToUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'convert to user function


ret = SapModel.Func.ConvertToUser("TH-1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.Func.Count
VB6 Procedure
Function Count(Optional ByVal FuncType As Long = 0) As Long
Parameters
FuncType
This optional value is one of the following numbers, indicating the type of function
for which the count is desired.
0= All function types
1= Response spectrum
2= Time history
3= Power spectral density
4= Steady state
Remarks
This function returns the total number of defined functions in the model of the
specified type.
VBA Example
Sub CountFunctions()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined functions of all types


Count = SapModel.Func.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
See Also
Delete
Syntax
SapObject.SapModel.Func.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing function.
Remarks
The function deletes a specified function.
The function returns zero if the function is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified function can not be
deleted if, for example, it is being used in an load case.
VBA Example
Sub DeleteFunction()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete function
ret = SapModel.Func.Delete("UNIFRS")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNameList
Syntax
SapObject.SapModel.Func.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal FuncType As Long = 0) As Long
Parameters
NumberNames
The number of function names retrieved by the program.
MyName
This is a one-dimensional array of function names. The MyName array is
created as a dynamic, zero-based array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
FuncType
This is one of the following numbers, indicating the type of function for which the
name list is desired.
0= All function types
1= Response spectrum
2= Time history
3= Power spectral density
4= Steady state
Remarks
This function retrieves the names of all defined functions of the specified type.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetFunctionNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get function names


ret = SapModel.Func.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
See Also
GetTypeOAPI
Syntax
SapObject.SapModel.Func.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef FuncType As Long,
ByRef AddType As Long) As Long
Parameters
Name
The name of an existing function.
FuncType
This is one of the following numbers, indicating the type of function.
1= Response spectrum
2= Time history
3= Power spectral density
4= Steady state
AddType
The is one of the following items, indicating the function subtype.
Response Spectrum Functions
0 = From file
1 = User
2 = UBC 94
3 = UBC 97
4 = BOCA 96
5 = NBCC 95
6 = IBC 2003
7 = NEHRP 97
8 = Eurocode 8-1998
9 = NZS4203 1992
10 = Chinese 2010
11 = Italian Ordinanza 3274
12 = IS1893:2002
13 = AASHTO LRFD 2006
14 = NCHRP Project 20-07
15 = IBC 2006
16 = NBCC 2005
17 = Eurocode 8-2004
18 = AS 1170.4-2007
19 = NZS 1170.5-2004
20 = AASHTO 2007
21 = Chinese JTG/T B02-2013
22 = Chinese GB 50111-2006
23 = IBC 2009
24 = NBCC 2010
25 = NTC 2008
26 = AASHTO 2012
27 = IBC 2012
28 = TSC 2007
29 = SI 413(1995)
30 = Argentina INPRES-CIRSOC 103
31 = Chile Norma NCh433+DS61
32 = Chile Norma NCh2369-2003
33 = Colombia NSR-10
34 = Ecuador NEC-11 Capitulo 2
35 = Guatemala AGIES NSE 2-10
36 = Mexico NTC 2004
37 = Peru Norma E.030
38 = Dominican Republic R-001
39 = Venezuela COVENIN 1756-2:2001
40 = KBC 2009
41 = Mexico CFE-93
42 = Peru NTE E.030 2014
43 = Mexico CFE-2008
44 = Ecuado Norma NEC-SE-DS 2015
45 = Costa Rica Seismic Code 2010
46 = SP 14.13330.2014
47 = Chinese CJJ 166-2011
Time History Functions
0 = From file
1 = User
2 = Sine
3 = Cosine
4 = Ramp
5 = Sawtooth
6 = Triangular
7 = User periodic
Power Spectral Density Functions
0 = From file
1 = User
Steady State Functions
0 = From file
1 = User
Remarks
This function retrieves the function type for the specified function.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetFunctionType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FuncType As Long
Dim AddType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get function type


ret = SapModel.Func.GetTypeOAPI("UNIFRS", FuncType, AddType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed function name to GetTypeOAPI in v17.0.0.
Updated list of AddType values for response spectrum functions in v18.2.0.
See Also
GetValues
Syntax
SapObject.SapModel.Func.GetValues
VB6 Procedure
Function GetValues(ByVal Name As String, ByRef NumberItems As Long,
ByRef MyTime() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of an existing function.
NumberItems
The number of time and function value pairs retrieved.
MyTime
This is an array that includes the time value for each data point. [s] for response
spectrum and time history functions, [cyc/s] for power spectral density and
steady state functions
Value
This is an array that includes the function value for each data point.
Remarks
This function retrieves the time and function values for any defined function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFuncValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyTime() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'get function values


ret = SapModel.Func.GetValues("TH-1", NumberItems, MyTime,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetFromFile
Syntax
SapObject.SapModel.Func.FuncPSD.GetFromFile
VB6 Procedure
Function GetFromFile(ByVal Name As String, ByRef FileName As String, ByRef
HeadLines As Long, ByRef PreChars As Long, ByRef PointsPerLine As Long,
ByRef ValueType As Long, ByRef FreeFormat As Boolean, ByRef NumberFixed
As Long, ByRef FreqTypeInFile As Long) As Long
Parameters
Name
The name of a defined power spectral density function specified to be from a
text file.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item applies only when the FreeFormat item is False. It is the number of
characters per item.
FreqTypeInFile
This is either 1 or 2, indicating frequency type.
1 = Hz
2 = RPM
Remarks
This function retrieves the definition of a power spectral density function from
file.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPSDFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim HeadLines As Long
Dim PreChars As Long
Dim PointsPerLine As Long
Dim ValueType As Long
Dim FreeFormat As Boolean
Dim NumberFixed As Long
Dim FreqTypeInFile As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add PSD function from file


ret = SapModel.Func.FuncPSD.SetFromFile("PSD-1",
"C:\SapAPI\FuncPSD.txt", 2, 0, 1, 2, True)

'get PSD function from file


ret = SapModel.Func.FuncPSD.GetFromFile("PSD-1", FileName,
HeadLines, PreChars, PointsPerLine, ValueType, FreeFormat,
NumberFixed, FreqTypeInFile)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncPSD.txt used in the VBA
Example.
Power Spectral Density Function
One pair of Frequency (Hz) and Value items per line
0 1
1 1
2 2
3 2
Release Notes
Initial release in version 11.02.
See Also
SetFromFile
GetUser
Syntax
SapObject.SapModel.Func.FuncPSD.GetUser
VB6 Procedure
Function GetUser(ByVal Name As String, ByRef NumberItems As Long, ByRef
Frequency() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of a user defined power spectral density function.
NumberItems
The number of frequency and value pairs defined.
Frequency
This is an array that includes the frequency in Hz for each data point. [cyc/s]
Value
This is an array that includes the function value for each data point.
Remarks
This function retrieves the definition of a user defined power spectral density
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetPSDFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Freq() As Double
Dim Val() As Double
Dim NumberItems As Long
Dim Frequency() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user PSD function


Num = 4
ReDim Freq(Num - 1)
ReDim Val(Num - 1)
Freq(0) = 0: Val(0) = 1
Freq(1) = 1: Val(1) = 1
Freq(2) = 2: Val(2) = 2
Freq(3) = 3: Val(3) = 2
ret = SapModel.Func.FuncPSD.SetUser("PSD-1", Num, Freq, Val)

'get user PSD function


ret = SapModel.Func.FuncPSD.GetUser("PSD-1", NumberItems,
Frequency, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUser
SetFromFile
Syntax
SapObject.SapModel.Func.FuncPSD.SetFromFile
VB6 Procedure
Function SetFromFile(ByVal Name As String, ByVal FileName As String, ByVal
HeadLines As Long, ByVal PreChars As Long, ByVal PointsPerLine As Long,
ByVal ValueType As Long, ByVal FreeFormat As Boolean, Optional ByVal
NumberFixed As Long = 10, Optional ByVal FreqTypeInFile As Long = 1) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item only applies when the FreeFormat item is False. It is the number of
characters per item.
FreqTypeInFile
This is either 1 or 2, indicating frequency type.
1 = Hz
2 = RPM
Remarks
This function defines a power spectral density function from file.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetPSDFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add PSD function from file


ret = SapModel.Func.FuncPSD.SetFromFile("PSD-1",
"C:\SapAPI\FuncPSD.txt", 2, 0, 1, 2, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncPSD.txt used in the VBA
Example.
Power Spectral Density Function
One pair of Frequency (Hz) and Value items per line
0 1
1 1
2 2
3 2
Release Notes
Initial release in version 11.02.
See Also
GetFromFile
SetUser
Syntax
SapObject.SapModel.Func.FuncPSD.SetUser
VB6 Procedure
Function SetUser(ByVal Name As String, ByVal NumberItems As Long, ByRef
Frequency() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NumberItems
The number of frequency and value pairs defined.
Frequency
This is an array that includes the frequency in Hz for each data point. [cyc/s]
Value
This is an array that includes the function value for each data point.
Remarks
This function defines a user power spectral density function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetPSDFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim Frequency() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user PSD function


NumberItems = 4
ReDim Frequency(NumberItems - 1)
ReDim Value(NumberItems - 1)
Frequency(0) = 0: Value(0) = 1
Frequency(1) = 1: Value(1) = 1
Frequency(2) = 2: Value(2) = 2
Frequency(3) = 3: Value(3) = 2
ret = SapModel.Func.FuncPSD.SetUser("PSD-1", NumberItems,
Frequency, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUser
GetAASHTO2006
Syntax
SapObject.SapModel.Func.FuncRS.GetAASHTO2006
VB6 Procedure
Function GetAASHTO2006(ByVal Name As String, ByRef AASHTO2006A As
Double, ByRef AASHTO2006SoilProfileType As Long, ByRef DampRatio As
Double) As Long
Parameters
Name
The name of an AASHTO2006 response spectrum function.
AASHTO2006A
The acceleration coefficient, A.
AASHTO2006SoilProfileType
This is 1, 2, 3 or 4, indicating the soil profile type.
1= I
2= II
3= III
4= IV
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of an AASHTO2006 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncAASHTO2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AASHTO2006A As Double
Dim AASHTO2006SoilProfileType As Long
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AASHTO2006 RS function


ret = SapModel.Func.FuncRS.SetAASHTO2006("RS-1", 0.3, 4,
0.04)

'get AASHTO2006 RS function


ret = SapModel.Func.FuncRS.GetAASHTO2006("RS-1",
AASHTO2006A, AASHTO2006SoilProfileType, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAASHTO2006
GetAASHTO2007
Syntax
SapObject.SapModel.Func.FuncRS.GetAASHTO2007
VB6 Procedure
Function GetAASHTO2007(ByVal Name As String, ByRef AASHTO2007Option
As Long, ByRef AASHTO2007Latitude As Double, ByRef
AASHTO2007Longitude As Double, ByRef AASHTO2007ZipCode As String,
ByRef AASHTO2007SS As Double, ByRef AASHTO2007S1 As Double, ByRef
AASHTO2007PGA As Double, ByRef AASHTO2007SiteClass As Long, ByRef
AASHTO2007Fa As Double, ByRef AASHTO2007Fv As Double, ByRef
AASHTO2007Fpga As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of an AASHTO 20-07 response spectrum function.
AASHTO2007Option
This is 0, 1, or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
AASHTO2007Latitude, AASHTO2007Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when AASHTO2007Option = 0.
AASHTO2007ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when AASHTO2007Option = 1.
AASHTO2007SS, AASHTO2007S1, AASHTO2007PGA
The seismic coefficients Ss, S1 and PGA. These items are used only when
AASHTO2007Option = 2.
AASHTO2007SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
AASHTO2007Fa, AASHTO2007Fv, AASHTO2007Fpga
The site coefficients Fa, Fv and Fpga. These items are used only when
AASHTO2007SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a AASHTO 20-07 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncAASHTO2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AASHTO2007Option As Long
Dim AASHTO2007Latitude As Double
Dim AASHTO2007Longitude As Double
Dim AASHTO2007ZipCode As String
Dim AASHTO2007SS As Double
Dim AASHTO2007S1 As Double
Dim AASHTO2007PGA As Double
Dim AASHTO2007SiteClass As Long
Dim AASHTO2007Fa As Double
Dim AASHTO2007Fv As Double
Dim AASHTO2007Fpga As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AASHTO2007 RS function


ret = SapModel.Func.FuncRS.SetAASHTO2007("RS-1", 1, 0, 0,
"94704", 0, 0, 0, 4, 0, 0, 0, 0.04)

'get AASHTO2007 RS function


ret = SapModel.Func.FuncRS.GetAASHTO2007("RS-1",
AASHTO2007Option, AASHTO2007Latitude, AASHTO2007Longitude,
AASHTO2007ZipCode, AASHTO2007SS, AASHTO2007S1, AASHTO2007PGA,
AASHTO2007SiteClass, AASHTO2007Fa, AASHTO2007Fv, AASHTO2007Fpga,
DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetAASHTO2007
GetAS11702007
Syntax
SapObject.SapModel.Func.FuncRS.GetAS11702007
VB6 Procedure
Function GetAS11702007(ByVal Name As String, ByRef AS2007SiteClass As
Long, ByRef AS2007kp As Double, ByRef AS2007Z As Double, ByRef
AS2007Sp As Double, ByRef AS2007Mu As Double, ByRef DampRatio As
Double) As Long
Parameters
Name
The name of a AS 1170 2007 response spectrum function.
AS2007SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
AS2007kp
The probability factor, kp.
AS2007Z
The hazard factor, Z.
AS2007Sp
The structural performance factor, Sp.
AS2007Mu
The structural ductility factor, u.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of an AS 1170 2007 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncAS11702007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AS2007SiteClass As Long
Dim AS2007kp As Double
Dim AS2007Z As Double
Dim AS2007Sp As Double
Dim AS2007Mu As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AS 1170 2007 RS function


ret = SapModel.Func.FuncRS.SetAS11702007("RS-1", 3, 1.3,
0.9, 0.77, 2, 0.04)

'get AS 1170 2007 RS function


ret = SapModel.Func.FuncRS.GetAS11702007("RS-1",
AS2007SiteClass, AS2007kp, AS2007Z, AS2007Sp, AS2007Mu, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetAS11702007
GetBOCA96
Syntax
SapObject.SapModel.Func.FuncRS.GetBOCA96
VB6 Procedure
Function GetBOCA96(ByVal Name As String, ByRef BOCA96Aa As Double,
ByRef BOCA96Av As Double, ByRef BOCA96S As Double, ByRef BOCA96R
As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a BOCA96 response spectrum function.
BOCA96Aa
The effective peak acceleration, Aa.
BOCA96Av
The effective peak velocity, Av.
BOCA96S
The soil profile coefficient, S.
BOCA96R
The response modification factor, R.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a BOCA96 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim BOCA96Aa As Double
Dim BOCA96Av As Double
Dim BOCA96S As Double
Dim BOCA96R As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add BOCA96 RS function


ret = SapModel.Func.FuncRS.SetBOCA96("RS-1", 0.3, 0.3, 1.2,
1, 0.04)

'get BOCA96 RS function


ret = SapModel.Func.FuncRS.GetBOCA96("RS-1", BOCA96Aa,
BOCA96Av, BOCA96S, BOCA96R, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetBOCA96
GetChinese2010
Syntax
SapObject.SapModel.Func.FuncRS.GetChinese2010
VB6 Procedure
Function GetChinese2010(ByVal Name As String, ByRef JGJ32010AlphaMax
As Double, ByRef JGJ32010SI As Long, ByRef JGJ32010Tg As Double, ByRef
JGJ32010PTDF As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a Chinese 2010 response spectrum function.
JGJ32010AlphaMax
The maximum influence factor.
JGJ32010SI
This is 1, 2, 3, 4, 5 or 6, indicating the seismic intensity.
1= 6 (0.05g)
2= 7 (0.10g)
3= 7 (0.15g)
4= 8 (0.20g)
5= 8 (0.30g)
6= 9 (0.40g)
JGJ32010Tg
The characteristic ground period, Tg > 0.1. [s]
JGJ32010PTDF
The period time discount factor.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a Chinese 2010 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim JGJ32010AlphaMax As Double
Dim JGJ32010SI As Long
Dim JGJ32010Tg As Double
Dim JGJ32010PTDF As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Chinese2010 RS function


ret = SapModel.Func.FuncRS.SetChinese2010("RS-1", 0.18, 5,
0.36, 1, 0.04)

'get Chinese2010 RS function


ret = SapModel.Func.FuncRS.GetChinese2010("RS-1",
JGJ32010AlphaMax, JGJ32010SI, JGJ32010Tg, JGJ32010PTDF, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetChinese2010
GetCJJ1662011 {RS}
Syntax
SapObject.SapModel.Func.FuncRS.GetCJJ1662011
VB6 Procedure
Function GetCJJ1662011(ByVal Name As String, ByRef Direction As Integer,
ByRef PeakAccel As Double, ByRef Tg As Double, ByRef DampRatio As
Double) As Long
Parameters
Name
The name of a CJJ 166-2011 response spectrum function.
Direction
This is 1 or 2, indicating the response spectrum direction.
1 = Horizontal
2 = Vertical

PeakAccel
The peak acceleration, A.

Tg
The characteristic ground period , Tg > 0.1. [s]

DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a CJJ 166-2011 response spectrum
function.
The function returns zero if the function is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetRSFuncCJJ1662011()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Direction As Long
Dim PeakAccel As Double
Dim Tg As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add CJJ 166-2011 RS function


ret = SapModel.Func.FuncRS.SetCJJ1662011("RS-1", 0.35, 0.25,
0.04)
'get CJJ 166-2011 RS function
ret = SapModel.Func.FuncRS.GetCJJ1662011("RS-1", Direction,
PeakAccel, Tg, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
See Also
SetCJJ1662011
GetEuroCode8
Syntax
SapObject.SapModel.Func.FuncRS.GetEuroCode8
VB6 Procedure
Function GetEuroCode8(ByVal Name As String, ByRef EuroCode8AG As
Double, ByRef EuroCode8S As Long, ByRef EuroCode8n As Double, ByRef
DampRatio As Double) As Long
Parameters
Name
The name of a EuroCode8 response spectrum function.
EuroCode8AG
The design ground acceleration, Ag.
EuroCode8S
This is 1, 2 or 3, indicating the subsoil class.
1=A
2=B
3=C
EuroCode8n
The damping correction factor, n, where n >= 0.7.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a EuroCode8 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncEuroCode8()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim EuroCode8AG As Double
Dim EuroCode8S As Long
Dim EuroCode8n As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add EuroCode8 RS function


ret = SapModel.Func.FuncRS.SetEuroCode8("RS-1", 0.3, 3, 1.2,
0.04)

'get EuroCode8 RS function


ret = SapModel.Func.FuncRS.GetEuroCode8("RS-1", EuroCode8AG,
EuroCode8S, EuroCode8n, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetEuroCode8
GetEurocode82004_1
Syntax
SapObject.SapModel.Func.FuncRS.GetEurocode82004_1
VB6 Procedure
Function GetEurocode82004_1(ByVal Name As String, ByRef
EURO2004Country As Long, ByRef EURO2004Direction As Long, ByRef
EURO2004SpectrumType As Long, ByRef EURO2004GroundType As Long,
ByRef EURO2004ag As Double, ByRef EURO2004S As Double, ByRef
EURO2004AvgoverAg As Double, ByRef EURO2004Tb As Double, ByRef
EURO2004Tc As Double, ByRef EURO2004Td As Double, ByRef
EURO2004Beta As Double, ByRef EURO2004q As Double, ByRef DampRatio
As Double) As Long
Parameters
Name
The name of a Eurocode 8 2004 response spectrum function.
EURO2004Country
This is 0, 1, 5, or 10 indicating the country for which the Nationally Determined
Parameters (NDPs) are specified.
0 = Other (NDPs are user specified)
1 = CEN Default
5 = Norway 10 = Portugal
EURO2004Direction
This is 1 or 2, indicating the ground motion direction.
1 = Horizontal
2 = Vertical
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type. This item only applies when the
EURO2004Direction item is 1 (horizontal).
1=A
2=B
3=C
4=D
5=E
EURO2004ag
The design ground acceleration in g, ag.
EURO2004S
The soil factor, S. This item only applies when the EURO2004Direction item is 1
(horizontal).
EURO2004AvgoverAg
The vertical ground acceleration divided by the horizontal ground acceleration,
Avg/Ag. This item only applies when the EURO2004Direction item is 2 (vertical).
EURO2004Tb
The lower limit of period of the constant spectral acceleration branch, Tb.
EURO2004Tc
The upper limit of period of the constant spectral acceleration branch, Tc.
EURO2004Td
The period defining the start of the constant displacement range, Td.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a Eurocode 8 2004 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncEurocode82004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim EURO2004Country As Long
Dim EURO2004Direction As Long
Dim EURO2004SpectrumType As Long
Dim EURO2004GroundType As Long
Dim EURO2004ag As Double
Dim EURO2004S As Double
Dim EURO2004AvgoverAg As Double
Dim EURO2004Tb As Double
Dim EURO2004Tc As Double
Dim EURO2004Td As Double
Dim EURO2004Beta As Double
Dim EURO2004q As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.SetEurocode82004_1("RS-1", 1, 1,
1, 2, 0.4, 1.2, 0.9, 0.15, 0.5, 2, 0.2, 2, 0.04)

'get Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.GetEurocode82004_1("RS-1",
EURO2004Country, EURO2004Direction, EURO2004SpectrumType,
EURO2004GroundType, EURO2004ag, EURO2004S, EURO2004AvgoverAg,
EURO2004Tb, EURO2004Tc, EURO2004Td, EURO2004Beta, EURO2004q,
DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes GetEurocode82004.
Added Portugal as a Country parameter in SAP2000 Version 15.0.0 and
CSiBridge Version 15.1.0.
See Also
SetEurocode82004_1
GetFromFile
Syntax
SapObject.SapModel.Func.FuncRS.GetFromFile
VB6 Procedure
Function GetFromFile(ByVal Name As String, ByRef FileName As String, ByRef
HeadLines As Long, ByRef DampRatio As Double, ByRef ValueType As Long)
As Long
Parameters
Name
The name of a defined response spectrum function specified to be from a text
file.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
ValueType
This is either 1 or 2, indicating time value type.
1 = Frequency
2 = Period
Remarks
This function retrieves the definition of a response spectrum function from file.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim HeadLines As Long
Dim DampRatio As Double
Dim ValueType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add RS function from file


ret = SapModel.Func.FuncRS.SetFromFile("RS-1",
"C:\SapAPI\FuncRS.txt", 3, 0.04)

'get RS function from file


ret = SapModel.Func.FuncRS.GetFromFile("RS-1", FileName,
HeadLines, DampRatio, ValueType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncRS.txt used in the VBA
Example.
Reponse Spectrum Function
One pair of Period (sec) and Acceleration (g) values per line
Acceleration values at equal spacing of 0.01 seconds.
0.030 0.500
0.125 1.355
0.587 1.355
0.660 1.355
1.562 0.576
4.000 0.219
10.00 0.037
Release Notes
Initial release in version 11.02.
See Also
SetFromFile
GetJTGB022013
Syntax
SapObject.SapModel.Func.FuncRS.GetJTGB022013
VB6 Procedure
Function GetJTGB022013(ByVal Name As String, ByRef Direction As Integer,
ByRef PeakAccel As Double, ByRef Tg As Double, ByRef Ci As Double, ByRef
Cs As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a JTG B02-2013 response spectrum function.
Direction
This is 1, 2 or 3, indicating the response spectrum direction.
1 = Horizontal
2 = Vertical-Rock
3 = Vertical-Soil
PeakAccel
The peak acceleration, A.
Tg
The characteristic ground period, Tg > 0.1. [s]
Ci
The importance coefficient.
Cs
The site soil coefficient.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a JTG B02-2013 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncJTGB022013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Direction As Long
Dim PeakAccel As Double
Dim Tg As Double
Dim Ci As Double
Dim Cs As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add JTG B02-2013 RS function


ret = SapModel.Func.FuncRS.SetJTGB022013("RS-1", 1, 0.18,
0.36, 0.4, 1, 0.04)

'get JTG B02-2013 RS function


ret = SapModel.Func.FuncRS.GetJTGB022013("RS-1", Direction,
PeakAccel, Tg, Ci, Cs, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in v18.2.0.
See Also
SetJTBG022013
GetIBC2003
Syntax
SapObject.SapModel.Func.FuncRS.GetIBC2003
VB6 Procedure
Function GetIBC2003(ByVal Name As String, ByRef IBC2003SS As Double,
ByRef IBC2003S1 As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a IBC2003 response spectrum function.
IBC2003SS
The design spectral acceleration at short periods, Sds.
IBC2003S1
The design spectral acceleration at a one second period, Sd1.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a IBC2003 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncIBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim IBC2003SS As Double
Dim IBC2003S1 As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IBC2003 RS function


ret = SapModel.Func.FuncRS.SetIBC2003("RS-1", 1.2, 0.3,
0.04)

'get IBC2003 RS function


ret = SapModel.Func.FuncRS.GetIBC2003("RS-1", IBC2003SS,
IBC2003S1, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetIBC2003
GetIBC2006
Syntax
SapObject.SapModel.Func.FuncRS.GetIBC2006
VB6 Procedure
Function GetIBC2006(ByVal Name As String, ByRef IBC2006Option As Long,
ByRef IBC2006Latitude As Double, ByRef IBC2006Longitude As Double, ByRef
IBC2006ZipCode As String, ByRef IBC2006SS As Double, ByRef IBC2006S1
As Double, ByRef IBC2006TL As Double, ByRef IBC2006SiteClass As Long,
ByRef IBC2006Fa As Double, ByRef IBC2006Fv As Double, ByRef DampRatio
As Double) As Long
Parameters
Name
The name of a IBC2006 response spectrum function.
IBC2006Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitiude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
IBC2006Latitude, IBC2006Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when IBC2006Option = 0.
IBC2006ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when IBC2006Option = 1.
IBC2006SS, IBC2006S1
The seismic coefficients Ss and S1. This item is used only when IBC2006Option
= 2.
IBC2006TL
The long-period transition period. [s]
IBC2006SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
IBC2006Fa, IBC2006Fv
The site coefficients Fa and Fv. These items are used only when
IBC2006SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a IBC2006 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncIBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim IBC2006Option As Long
Dim IBC2006Latitude As Double
Dim IBC2006Longitude As Double
Dim IBC2006ZipCode As String
Dim IBC2006SS As Double
Dim IBC2006S1 As Double
Dim IBC2006TL As Double
Dim IBC2006SiteClass As Long
Dim IBC2006Fa As Double
Dim IBC2006Fv As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IBC2006 RS function


ret = SapModel.Func.FuncRS.SetIBC2006("RS-1", 1, 0, 0,
"94704", 0, 0, 7.5, 4, 0, 0, 0.04)

'get IBC2006 RS function


ret = SapModel.Func.FuncRS.GetIBC2006("RS-1", IBC2006Option,
IBC2006Latitude, IBC2006Longitude, IBC2006ZipCode, IBC2006SS,
IBC2006S1, IBC2006TL, IBC2006SiteClass, IBC2006Fa, IBC2006Fv,
DampRatio)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetIBC2006
GetIS18932002
Syntax
SapObject.SapModel.Func.FuncRS.GetIS18932002
VB6 Procedure
Function GetIS18932002(ByVal Name As String, ByRef INZ As Double, ByRef
INS As Long, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a IS1893-2002 response spectrum function.
INZ
The seismic zone factor, Z.
INS
This is 1, 2 or 3, indicating the soil type.
1=I
2 = II
3 = III
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a IS1893-2002 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncIS18932002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim INZ As Double
Dim INS As Long
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IS18932002 RS function


ret = SapModel.Func.FuncRS.SetIS18932002("RS-1", 0.3, 3,
0.04)

'get IS18932002 RS function


ret = SapModel.Func.FuncRS.GetIS18932002("RS-1", INZ, INS,
DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetIS18932002
GetItalian3274
Syntax
SapObject.SapModel.Func.FuncRS.GetItalian3274
VB6 Procedure
Function GetItalian3274(ByVal Name As String, ByRef Italag As Double, ByRef
ItalSoilType As Long, ByRef Italq As Double, ByRef ItalLevel As Double, ByRef
DampRatio As Double) As Long
Parameters
Name
The name of a Italian 3274 response spectrum function.
Italag
The peak ground acceleration.
ItalSoilType
This is 1, 2, 3, 4 or 5, indicating the seismic intensity.
1= A
2= B
3= C
4= E
5= D
Italq
The structure factor.
ItalLevel
This is 0, 1, 2, 3, 4, 5, 6 or 7, indicating the spectral level, direction and building
type.
0= SLU/H/Building
1= SLU/H/Bridge
2= SLU/V/Building
3= SLU/V/Bridge
4= EL/H/Building
5= EL/H/Bridge
6= EL/V/Building
7= EL/V/Bridge

SLU refers to ultimate strength design and EL refers to elastic design. H and V
are horizontal and vertical, respectively.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a Italian 3274 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncItalian3274()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Italag As Double
Dim ItalSoilType As Long
Dim Italq As Double
Dim ItalLevel As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Italian3274 RS function


ret = SapModel.Func.FuncRS.SetItalian3274("RS-1", 0.3, 2,
1.1, 4, 0.04)

'get Italian3274 RS function


ret = SapModel.Func.FuncRS.GetItalian3274("RS-1", Italag,
ItalSoilType, Italq, ItalLevel, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetItalian3274
GetNBCC2015
Syntax
SapObject.SapModel.Func.FuncRS.GetNBCC2015
VB6 Procedure
Function GetNBCC2015(ByVal Name As String, ByRef PGA As Double, ByRef
S02 As Double, ByRef S05 As Double, ByRef S1 As Double, ByRef S2 As
Double, ByRef S5 As Double, ByRef S10 As Double, ByRef SiteClass As Long,
ByRef F02 As Double, ByRef F05 As Double, ByRef F1 As Double, ByRef F2
As Double, ByRef F5 As Double, ByRef F10 As Double, ByRef DampRatio As
Double) As Long
Parameters
Name
The name of a NBCC2015 response spectrum function.
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S5
The spectral acceleration at a 5 second period.
S10
The spectral acceleration at a 10 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
F02
The site coefficient at a 0.2 second period. This item is read when the site class
is F only.
F05
The site coefficient at a 0.5 second period. This item is read when the site class
is F only.
F1
The site coefficient at a 1 second period. This item is read when the site class is
F only.
F2
The site coefficient at a 2 second period. This item is read when the site class is
F only.
F5
The site coefficient at a 5 second period. This item is read when the site class is
F only.
F10
The site coefficient at a 10 second period. This item is read when the site class
is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NBCC2015 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PGA As Double
Dim S02 As Double
Dim S05 As Double
Dim S1 As Double
Dim S2 As Double
Dim S5 As Double
Dim S10 As Double
Dim SiteClass As Long
Dim F02 As Double
Dim F05 As Double
Dim F1 As Double
Dim F2 As Double
Dim F5 As Double
Dim F10 As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2015 RS function


ret = SapModel.Func.FuncRS.SetNBCC2015("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 0.035, 0.01, 6, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
0.04)

'get NBCC2015 RS function


ret = SapModel.Func.FuncRS.GetNBCC2015("RS-1", PGA, S02,
S05, S1, S2, S5, S10, SiteClass, F02, F05, F1, F2, F5, F10,
DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetNBCC2015
GetNBCC2010
Syntax
SapObject.SapModel.Func.FuncRS.GetNBCC2010
VB6 Procedure
Function GetNBCC2010(ByVal Name As String, ByRef PGA As Double, ByRef
S02 As Double, ByRef S05 As Double, ByRef S1 As Double, ByRef S2 As
Double, ByRef SiteClass As Long, ByRef Fa As Double, ByRef Fv As Double,
ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NBCC2010 response spectrum function.
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa
The site coefficient, Fa. This item is read when the site class is F only.
Fv
The site coefficient, Fv. This item is read when the site class is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NBCC2010 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PGA As Double
Dim S02 As Double
Dim S05 As Double
Dim S1 As Double
Dim S2 As Double
Dim SiteClass As Long
Dim Fa As Double
Dim Fv As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2010 RS function


ret = SapModel.Func.FuncRS.SetNBCC2010("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 6, 1.8, 2, 0.04)

'get NBCC2010 RS function


ret = SapModel.Func.FuncRS.GetNBCC2010("RS-1", PGA, S02,
S05, S1, S2, SiteClass, Fa, Fv, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetNBCC2010
GetNBCC2005
Syntax
SapObject.SapModel.Func.FuncRS.GetNBCC2005
VB6 Procedure
Function GetNBCC2005(ByVal Name As String, ByRef NBCC2005PGA As
Double, ByRef NBCC2005S02 As Double, ByRef NBCC2005S05 As Double,
ByRef NBCC2005S1 As Double, ByRef NBCC2005S2 As Double, ByRef
NBCC2005SiteClass As Long, ByRef NBCC2005Fa As Double, ByRef
NBCC2005Fv As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NBCC2005 response spectrum function.
NBCC2005PGA
The peak ground acceleration.
NBCC2005S02
The spectral acceleration at a 0.2 second period.
NBCC2005S05
The spectral acceleration at a 0.52 second period.
NBCC2005S1
The spectral acceleration at a 1 second period.
NBCC2005S2
The spectral acceleration at a 2 second period.
NBCC2005SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NBCC2005Fa
The site coefficient, Fa. This item is read when the site class is F only.
NBCC2005Fv
The site coefficient, Fv. This item is read when the site class is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NBCC2005 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NBCC2005PGA As Double
Dim NBCC2005S02 As Double
Dim NBCC2005S05 As Double
Dim NBCC2005S1 As Double
Dim NBCC2005S2 As Double
Dim NBCC2005SiteClass As Long
Dim NBCC2005Fa As Double
Dim NBCC2005Fv As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2005 RS function


ret = SapModel.Func.FuncRS.SetNBCC2005("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 6, 1.8, 2, 0.04)

'get NBCC2005 RS function


ret = SapModel.Func.FuncRS.GetNBCC2005("RS-1", NBCC2005PGA,
NBCC2005S02, NBCC2005S05, NBCC2005S1, NBCC2005S2,
NBCC2005SiteClass, NBCC2005Fa, NBCC2005Fv, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetNBCC2005
GetNBCC95
Syntax
SapObject.SapModel.Func.FuncRS.GetNBCC95
VB6 Procedure
Function GetNBCC95(ByVal Name As String, ByRef NBCC95ZVR As Double,
ByRef NBCC95ZA As Long, ByRef NBCC95ZV As Long, ByRef DampRatio As
Double) As Long
Parameters
Name
The name of a NBCC95 response spectrum function.
NBCC95ZVR
The zonal velocity ratio.
NBCC95ZA
The acceleration-related seismic zone.
NBCC95ZV
The velocity-related seismic zone.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NBCC95 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NBCC95ZVR As Double
Dim NBCC95ZA As Long
Dim NBCC95ZV As Long
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC95 RS function


ret = SapModel.Func.FuncRS.SetNBCC95("RS-1", 0.3, 5, 5,
0.04)

'get NBCC95 RS function


ret = SapModel.Func.FuncRS.GetNBCC95("RS-1", NBCC95ZVR,
NBCC95ZA, NBCC95ZV, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetNBCC95
GetNCHRP2007
Syntax
SapObject.SapModel.Func.FuncRS.GetNCHRP2007
VB6 Procedure
Function GetNCHRP2007(ByVal Name As String, ByRef NCHRP2007Option
As Long, ByRef NCHRP2007Latitude As Double, ByRef NCHRP2007Longitude
As Double, ByRef NCHRP2007ZipCode As String, ByRef NCHRP2007SS As
Double, ByRef NCHRP2007S1 As Double, ByRef NCHRP2007SiteClass As
Long, ByRef NCHRP2007Fa As Double, ByRef NCHRP2007Fv As Double,
ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NCHRP 20-07 response spectrum function.
NCHRP2007Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitiude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
NCHRP2007Latitude, NCHRP2007Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when NCHRP2007Option = 0.
NCHRP2007ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when NCHRP2007Option = 1.
NCHRP2007SS, NCHRP2007S1
The seismic coefficients Ss and S1. This item is used only when
NCHRP2007Option = 2.
NCHRP2007SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NCHRP2007Fa, NCHRP2007Fv
The site coefficients Fa and Fv. These items are used only when
NCHRP2007SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NCHRP 20-07 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNCHRP2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NCHRP2007Option As Long
Dim NCHRP2007Latitude As Double
Dim NCHRP2007Longitude As Double
Dim NCHRP2007ZipCode As String
Dim NCHRP2007SS As Double
Dim NCHRP2007S1 As Double
Dim NCHRP2007SiteClass As Long
Dim NCHRP2007Fa As Double
Dim NCHRP2007Fv As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NCHRP2007 RS function


ret = SapModel.Func.FuncRS.SetNCHRP2007("RS-1", 1, 0, 0,
"94704", 0, 0, 4, 0, 0, 0.04)

'get NCHRP2007 RS function


ret = SapModel.Func.FuncRS.GetNCHRP2007("RS-1",
NCHRP2007Option, NCHRP2007Latitude, NCHRP2007Longitude,
NCHRP2007ZipCode, NCHRP2007SS, NCHRP2007S1, NCHRP2007SiteClass,
NCHRP2007Fa, NCHRP2007Fv, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetNCHRP2007
GetNEHRP97
Syntax
SapObject.SapModel.Func.FuncRS.GetNEHRP97
VB6 Procedure
Function GetNEHRP97(ByVal Name As String, ByRef NEHRP97SS As Double,
ByRef NEHRP97S1 As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NEHRP97 response spectrum function.
NEHRP97SS
The design spectral acceleration at short periods, Sds.
NEHRP97S1
The design spectral acceleration at a one second period, Sd1.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NEHRP97 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNEHRP97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NEHRP97SS As Double
Dim NEHRP97S1 As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NEHRP97 RS function


ret = SapModel.Func.FuncRS.SetNEHRP97("RS-1", 1.2, 0.3,
0.04)

'get NEHRP97 RS function


ret = SapModel.Func.FuncRS.GetNEHRP97("RS-1", NEHRP97SS,
NEHRP97S1, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetNEHRP97
GetNZS11702004
Syntax
SapObject.SapModel.Func.FuncRS.GetNZS11702004
VB6 Procedure
Function GetNZS11702004(ByVal Name As String, ByVal NZS2004SiteClass
As Long, ByVal NZS2004Z As Double, ByVal NZS2004R As Double, ByVal
NZS2004DIST As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NZS 1170 2004 response spectrum function.
NZS2004SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
NZS2004Z
The hazard factor, Z.
NZS2004R
The return period factor, R.
NZS2004DIST
Distance to the fault in km, used to calculate the near fault factor.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of an NZS 1170 2004 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNZS11702004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NZS2004SiteClass As Long
Dim NZS2004Z As Double
Dim NZS2004R As Double
Dim NZS2004DIST As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NZS 1170 2004 RS function


ret = SapModel.Func.FuncRS.SetNZS11702004("RS-1", 3, 0.4,
1.3, 20, 0.04)

'get NZS 1170 2004 RS function


ret = SapModel.Func.FuncRS.GetNZS11702004("RS-1",
NZS2004SiteClass, NZS2004Z, NZS2004R, NZS2004DIST, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
Modified NZS2004N to NZS2004DIST in version 14.1.0.
See Also
SetNZS11702004
GetNZS42031992
Syntax
SapObject.SapModel.Func.FuncRS.GetNZS42031992
VB6 Procedure
Function GetNZS42031992(ByVal Name As String, ByRef NZS4203SF As
Double, ByRef NZS4203S As Long, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a NZS4203-1992 response spectrum function.
NZS4203SF
The scaling factor (Sm * Sp * R * Z * L).
NZS4203S
This is 1, 2 or 3, indicating the site subsoil category.
1=A
2=B
3=C
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NZS4203-1992 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncNZS42031992()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NZS4203SF As Double
Dim NZS4203S As Long
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NZS42031992 RS function


ret = SapModel.Func.FuncRS.SetNZS42031992("RS-1", 1.2, 3,
0.04)

'get NZS42031992 RS function


ret = SapModel.Func.FuncRS.GetNZS42031992("RS-1", NZS4203SF,
NZS4203S, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetNZS42031992
GetNTC2008
Syntax
SapObject.SapModel.Func.FuncRS.GetNTC2008
VB6 Procedure
Function GetNTC2008(ByVal Name As String, ByRef ParamsOption As Long,
ByRef Latitude As Double, ByRef Longitude As Double, ByRef Island As Long,
ByRef LimitState As Long, ByRef UsageClass As Long, ByRef NomLife As
Double, ByRef PeakAccel As Double, ByRef F0 As Double, ByRef Tcs As
Double, ByRef SpecType As Long, ByRef SoilType As Long, ByRef Topography
As Long, ByRef hRatio As Double, ByRef Damping As Double, ByRef q As
Double) As Long
Parameters
Name
The name of a NTC2008 response spectrum function.
ParamsOption
This is 1, 2, or 3, indicating the option for defining the parameters.
1 = by latitude and longitude
2 = by island
3 = user specified
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when ParamsOption = 1.
Island
This is one of the following values. This item is used only when ParamsOption =
2.
1 = Alicudi
2 = Arcipelago Toscano
3 = Filcudi
4 = Isole Egadi
5 = Lampedusa
6 = Linosa
7 = Lipari
8 = Palmarola
9 = Panarea
10 = Pantelleria
11 = Ponza
12 = Salina
13 = Santo Stefano
14 = Sardegna
15 = Stromboli
16 = Tremiti
17 = Ustica
18 = Ventotene
19 = Vulcano
20 = Zannone
LimitState
This is 1, 2, 3, or 4, indicating the limit state.
1 = SLO
2 = SLD
3 = SLV
4 = SLC
UsageClass
This is 1, 2, 3, or 4, indicating the usage class.
1= I
2= II
3= III
4= IV
NomLife
The nominal life to be considered.
PeakAccel
The peak ground acceleration, ag/g.
F0
The magnitude factor, F0.
Tcs
The reference period, Tc* [s].
SpecType
This is 1, 2, 3, or 4, indicating the type of spectrum to consider.
1= Elastic horizontal
2= Elastic vertical
3= Design horizontal
4= Design vertical
SoilType
This is 1, 2, 3, 4, or 5, indicating the subsoil type.
1= A
2= B
3= C
4= D
5= E

Topography
This is 1, 2, 3, or 4, indicating the topography type.
1= T1
2= T2
3= T3
4= T4
hRatio
The ratio for the site altitude at the base of the hill to the height of the hill.
Damping
The damping, in percent. This is only applicable for SpecType 1 and 2.
q
The behavior correction factor. This is only applicable for SpecType 3 and 4.
Remarks
This function retrieves the definition of a NTC2008 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub GetRSFuncNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ParamsOption As Long
Dim Latitude As Double
Dim Longitude As Double
Dim Island As Long
Dim LimitState As Long
Dim UsageClass As Long
Dim NomLife As Double
Dim PeakAccel As Double
Dim F0 As Double
Dim Tcs As Double
Dim SpecType As Long
Dim SoilType As Long
Dim Topography As Long
Dim hRatio As Double
Dim Damping As Double
Dim q As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NTC2008 RS function


ret = SapModel.Func.FuncRS.SetNTC2008("RS-1", 1, 45.9, 12.6,
1, 3, 2, 50, 0.2, 2.4, 0.3, 3, 2, 1, 1, 5, 1)
'get NTC2008 RS function
ret = SapModel.Func.FuncRS.GetNTC2008("RS-1", ParamsOption,
Latitude, Longitude, Island, LimitState, UsageClass, NomLife,
PeakAccel, F0, Tcs, SpecType, SoilType, Topography, hRatio,
Damping, q)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetNTC2008
GetSP14133302014
Syntax
SapObject.SapModel.Func.FuncRS.GetSP14133302014
VB6 Procedure
Function GetSP14133302014(ByVal Name As String, ByRef Direction As Long,
ByRef Seismicity As Long, ByRef SoilCat As Long, ByRef K0Factor As Double,
ByRef K1Factor As Double, ByRef KPsiFactor As Double, ByRef NonlinSoil As
Boolean, ByRef ASoil As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a SP 14.13330.2014 response spectrum function.
Direction
This is 1, 2, 3, or 4, indicating the direction and structure type for which the
response spectrum is generated.
1= Building Horizontal
2= Building Vertical
3= Bridge Horizontal
4= Bridge Vertical

Seismicity
This is 1, 2, 3, or 4, indicating the region seismicity of the construction site.
1= 6
2= 7
3= 8
4= 9

SoilCat
This is 1, 2, 3, or 4, indicating the soil category.
1= I
2= II
3= III
4= IV

K0Factor
The K0Factor, 0 < K0 <= 2.0. This is only applicable when the Direction
parameter is 1 or 3 for horizontal spectra.
K1Factor
The K1Factor, 0 < K1 <= 1.0.
KPsiFactor
The KPsiFactor, 0.5 < KPsi <= 1.5. This is only applicable when the Direction
parameter is 1 or 3 for horizontal spectra.
NonlinSoil
This item is True if nonlinear soil deformation should be accounted for. This is
only applicable when the Direction parameter is 1 or 2 for buildings and the
SoilCat parameter is 3 or 4.
ASoil
The nonlinear soil deformation factor, 0 > a_soil <= 1.0. This is only applicable
when the NonlinSoil parameter is True, the Direction parameter is 1 or 2
buildings, and the SoilCat parameter is 3 or 4.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a SP 14.13330.2014 response spectrum
function.
The function returns zero if the function is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetRSFuncSP14133302014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Direction As Long
Dim Seismicity As Long
Dim SoilCat As Long
Dim K0Factor As Double
Dim K1Factor As Double
Dim KPsiFactor As Double
Dim NonlinSoil As Boolean
Dim ASoil As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add SP 14.13330.2014 RS function


ret = SapModel.Func.FuncRS.SetSP14133302014("RS-1", 1, 2, 2,
1.0, 0.25, 1.0, False, 0.7, 0.04)
'get SP 14.13330.2014 RS function
ret = SapModel.Func.FuncRS.GetSP14133302014("RS-1",
Direction, Seismicity, SoilCat, K0Factor, K1Factor, KPsiFactor,
NonlinSoil, ASoil, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
See Also
SetSP14133302014
GetUBC94
Syntax
SapObject.SapModel.Func.FuncRS.GetUBC94
VB6 Procedure
Function GetUBC94(ByVal Name As String, ByRef UBC94Z As Double, ByRef
UBC94S As Long, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a UBC94 response spectrum function.
UBC94Z
The seismic zone factor, Z.
UBC94S
This is 1, 2 or 3, indicating the soil type.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a UBC94 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim UBC94Z As Double
Dim UBC94S As Long
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC94 RS function


ret = SapModel.Func.FuncRS.SetUBC94("RS-1", 0.35, 3, 0.04)

'get UBC94 RS function


ret = SapModel.Func.FuncRS.GetUBC94("RS-1", UBC94Z, UBC94S,
DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUBC94
GetUBC97
Syntax
SapObject.SapModel.Func.FuncRS.GetUBC97
VB6 Procedure
Function GetUBC97(ByVal Name As String, ByRef UBC97Ca As Double, ByRef
UBC97Cv As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a UBC97 response spectrum function.
UBC97Ca
The seismic coefficient, Ca.
UBC97Cv
The seismic coefficient, Cv.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a UBC97 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim UBC97Ca As Double
Dim UBC97Cv As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC97 RS function


ret = SapModel.Func.FuncRS.SetUBC97("RS-1", 0.36, 0.54,
0.04)

'get UBC97 RS function


ret = SapModel.Func.FuncRS.GetUBC97("RS-1", UBC97Ca,
UBC97Cv, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUBC97
GetUser
Syntax
SapObject.SapModel.Func.FuncRS.GetUser
VB6 Procedure
Function GetUser(ByVal Name As String, ByRef NumberItems As Long, ByRef
Period() As Double, ByRef Value() As Double, ByRef DampRatio As Double) As
Long
Parameters
Name
The name of a user defined response spectrum function.
NumberItems
The number of frequency and value pairs defined.
Period
This is an array that includes the time for each data point. [s]
Value
This is an array that includes the function value for each data point.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a user defined response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Tmp() As Double
Dim Val() As Double
Dim NumberItems As Long
Dim Period() As Double
Dim Value() As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user RS function


NumberItems = 6
ReDim Tmp(NumberItems - 1)
ReDim Val(NumberItems - 1)
Tmp(0) = 0.03: Val(0) = 0.4
Tmp(1) = 0.05: Val(1) = 2.2
Tmp(2) = 0.80: Val(2) = 2.2
Tmp(3) = 1.20: Val(3) = 1.0
Tmp(4) = 4.00: Val(4) = 0.2
Tmp(5) = 10.0: Val(5) = 0.05
ret = SapModel.Func.FuncRS.SetUser("RS-1", NumberItems, Tmp,
Val, 0.04)

'get user RS function


ret = SapModel.Func.FuncRS.GetUser("RS-1", NumberItems,
Period, Value, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUser
SetAASHTO2006
Syntax
SapObject.SapModel.Func.FuncRS.SetAASHTO2006
VB6 Procedure
Function SetAASHTO2006(ByVal Name As String, ByVal AASHTO2006A As
Double, ByVal AASHTO2006SoilProfileType As Long, ByVal DampRatio As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified, otherwise, a new function is added.
AASHTO2006A
The acceleration coefficient, A.
AASHTO2006SoilProfileType
This is 1, 2, 3 or 4, indicating the soil profile type.
1= I
2= II
3= III
4= IV
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines an AASHTO2006 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncAASHTO2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AASHTO2006 RS function


ret = SapModel.Func.FuncRS.SetAASHTO2006("RS-1", 0.3, 4,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAASHTO2006
SetAASHTO2007
Syntax
SapObject.SapModel.Func.FuncRS.SetAASHTO2007
VB6 Procedure
Function SetAASHTO2007(ByVal Name As String, ByVal AASHTO2007Option
As Long, ByVal AASHTO2007Latitude As Double, ByVal
AASHTO2007Longitude As Double, ByVal AASHTO2007ZipCode As String,
ByVal AASHTO2007SS As Double, ByVal AASHTO2007S1 As Double, ByVal
AASHTO2007PGA As Double, ByVal AASHTO2007SiteClass As Long, ByVal
AASHTO2007Fa As Double, ByRef AASHTO2007Fv As Double, ByVal
AASHTO2007Fpga As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
AASHTO2007Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
AASHTO2007Latitude, AASHTO2007Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when AASHTO2007Option = 0.
AASHTO2007ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when AASHTO2007Option = 1.
AASHTO2007SS, AASHTO2007S1, AASHTO2007PGA
The seismic coefficients Ss, S1 and PGA. These items are used only when
AASHTO2007Option = 2.
AASHTO2007SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
AASHTO2007Fa, AASHTO2007Fv, AASHTO2007Fpga
The site coefficients Fa, Fv and Fpga. These items are used only when
AASHTO2007SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a AASHTO 2007 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncAASHTO2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AASHTO2007 RS function


ret = SapModel.Func.FuncRS.SetAASHTO2007("RS-1", 1, 0, 0,
"94704", 0, 0, 0, 4, 0, 0, 0, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetAASHTO2007
SetAS11702007
Syntax
SapObject.SapModel.Func.FuncRS.SetAS11702007
VB6 Procedure
Function SetAS11702007(ByVal Name As String, ByVal AS2007SiteClass As
Long, ByVal AS2007kp As Double, ByVal AS2007Z As Double, ByVal AS2007Sp
As Double, ByVal AS2007Mu As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified, otherwise, a new function is added.
AS2007SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
AS2007kp
The probability factor, kp.
AS2007Z
The hazard factor, Z.
AS2007Sp
The structural performance factor, Sp.
AS2007Mu
The structural ductility factor, u.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines an AS 1170.4 2007 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncAS11702007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add AS 1170 2007 RS function


ret = SapModel.Func.FuncRS.SetAS11702007("RS-1", 3, 1.3,
0.9, 0.77, 2, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetAS11702007
SetBOCA96
Syntax
SapObject.SapModel.Func.FuncRS.SetBOCA96
VB6 Procedure
Function SetBOCA96(ByVal Name As String, ByVal BOCA96Aa As Double,
ByVal BOCA96Av As Double, ByVal BOCA96S As Double, ByVal BOCA96R As
Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
BOCA96Aa
The effective peak acceleration, Aa.
BOCA96Av
The effective peak velocity, Av.
BOCA96S
The soil profile coefficient, S.
BOCA96R
The response modification factor, R.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a BOCA96 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add BOCA96 RS function


ret = SapModel.Func.FuncRS.SetBOCA96("RS-1", 0.3, 0.3, 1.2,
1, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetBOCA96
SetChinese2010
Syntax
SapObject.SapModel.Func.FuncRS.SetChinese2010
VB6 Procedure
Function SetChinese2010(ByVal Name As String, ByVal JGJ32010AlphaMax As
Double, ByVal JGJ32010SI As Long, ByVal JGJ32010Tg As Double, ByVal
JGJ32010PTDF As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
JGJ32010AlphaMax
The maximum influence factor.
JGJ32010SI
This is 1, 2, 3, 4, 5 or 6, indicating the seismic intensity.
1= 6 (0.05g)
2= 7 (0.10g)
3= 7 (0.15g)
4= 8 (0.20g)
5= 8 (0.30g)
6= 9 (0.40g)
JGJ32010Tg
The characteristic ground period, Tg > 0.1. [s]
JGJ32010PTDF
The period time discount factor.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a Chinese 2010 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Chinese2010 RS function


ret = SapModel.Func.FuncRS.SetChinese2010("RS-1", 0.18, 5,
0.36, 1, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetChinese2010
SetCJJ1662011
Syntax
SapObject.SapModel.Func.FuncRS.SetCJJ1662011
VB6 Procedure
Function SetCJJ1662011(ByVal Name As String, ByVal Direction As Long,
ByVal PeakAccel As Double, ByVal Tg As Double, ByVal DampRatio As Double)
As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
Direction
This is 1 or 2, indicating the response spectrum direction.
1 = Horizontal
2 = Vertical

PeakAccel
The peak acceleration, A.
Tg
The characteristic ground period, Tg > 0.1. [s]
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a CJJ 166-2011 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncCJJ1662011()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add CJJ 166-2011 RS function


ret = SapModel.Func.FuncRS.SetCJJ1662011("RS-1", 1, 0.35,
0.25, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in v18.2.0.
See Also
GetCJJ1662011
SetEuroCode8
Syntax
SapObject.SapModel.Func.FuncRS.SetEuroCode8
VB6 Procedure
Function SetEuroCode8(ByVal Name As String, ByVal EuroCode8AG As
Double, ByVal EuroCode8S As Long, ByVal EuroCode8n As Double, ByVal
DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
EuroCode8AG
The design ground acceleration, Ag.
EuroCode8S
This is 1, 2 or 3, indicating the subsoil class.
1=A
2=B
3=C
EuroCode8n
The damping correction factor, n, where n >= 0.7.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a EuroCode8 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncEuroCode8()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add EuroCode8 RS function


ret = SapModel.Func.FuncRS.SetEuroCode8("RS-1", 0.3, 3, 1.2,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetEuroCode8
SetEurocode82004_1
Syntax
SapObject.SapModel.Func.FuncRS.SetEurocode82004_1
VB6 Procedure
Function SetEurocode82004_1(ByVal Name As String, ByVal
EURO2004Country As Long, ByVal EURO2004Direction As Long, ByVal
EURO2004SpectrumType As Long, ByVal EURO2004GroundType As Long,
ByVal EURO2004ag As Double, ByVal EURO2004S As Double, ByVal
EURO2004AvgoverAg As Double, ByVal EURO2004Tb As Double, ByVal
EURO2004Tc As Double, ByVal EURO2004Td As Double, ByVal
EURO2004Beta As Double, ByVal EURO2004q As Double, ByVal DampRatio
As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function,n that
function is modified; otherwise, a new function is added.
EURO2004Country
This is 0, 1, 5, or 10 indicating the country for which the Nationally Determined
Parameters (NDPs) are specified.
0 = Other (NDPs are user specified)
1 = CEN Default
5 = Norway
10 = Portugal
EURO2004Direction
This is 1 or 2, indicating the ground motion direction.
1 = Horizontal
2 = Vertical
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type. This item only applies when the
EURO2004Direction item is 1 (horizontal).
1=A
2=B
3=C
4=D
5=E
EURO2004ag
The design ground acceleration in g, ag.
EURO2004S
The soil factor, S. This item only applies when the EURO2004Direction item is 1
(horizontal). If the EURO2004Country item is not 0, then the input value for this
item is ignored.
EURO2004AvgoverAg
The vertical ground acceleration divided by the horizontal ground acceleration,
Avg/Ag. This item only applies when the EURO2004Direction item is 2
(vertical). If the EURO2004Country item is not 0, then the input value for this
item is ignored.
EURO2004Tb
The lower limit of period of the constant spectral acceleration branch, Tb. If the
EURO2004Country item is not 0, then the input value for this item is ignored.
EURO2004Tc
The upper limit of period of the constant spectral acceleration branch, Tc. If the
EURO2004Country item is not 0, then the input value for this item is ignored.
EURO2004Td
The period defining the start of the constant displacement range, Td. If the
EURO2004Country item is not 0, then the input value for this item is ignored.
EURO2004Beta
The lower bound factor, Beta. If the EURO2004Country item is not 0, then the
input value for this item is ignored.
EURO2004q
The behavior factor, q.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a Eurocode 8 2004 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncEurocode82004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.SetEurocode82004_1("RS-1", 1, 1,
1, 2, 0.4, 1.2, 0.9, 0.15, 0.5, 2, 0.2, 2, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes .SetEurocode82004.
Added Portugal as a Country parameter in SAP2000 Version 15.0.0 and
CSiBridge Version 15.1.0.
See Also
GetEurocode82004_1
SetFromFile
Syntax
SapObject.SapModel.Func.FuncRS.SetFromFile
VB6 Procedure
Function SetFromFile(ByVal Name As String, ByVal FileName As String, ByVal
HeadLines As Long, ByVal DampRatio As Double, Optional ByVal ValueType As
Long = 2) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function. that
function is modified; otherwise, a new function is added.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
ValueType
This is either 1 or 2, indicating time value type.
1 = Frequency
2 = Period
Remarks
This function defines a response spectrum function from file.
The function returns zero if the function is successfully defined, otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add RS function from file


ret = SapModel.Func.FuncRS.SetFromFile("RS-1",
"C:\SapAPI\FuncRS.txt", 3, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncRS.txt used in the VBA
Example.
Reponse Spectrum Function
One pair of Period (sec) and Acceleration (g) values per line
Acceleration values at equal spacing of 0.01 seconds.
0.030 0.500
0.125 1.355
0.587 1.355
0.660 1.355
1.562 0.576
4.000 0.219
10.00 0.037
Release Notes
Initial release in version 11.02.
See Also
GetFromFile
SetJTBG022013
Syntax
SapObject.SapModel.Func.FuncRS.SetJTGB022013
VB6 Procedure
Function SetJTGB022013(ByVal Name As String, ByVal Direction As Long,
ByVal PeakAccel As Double, ByVal Tg As Double, ByVal Ci As Double, ByVal Cs
As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
Direction
This is 1, 2 or 3, indicating the response spectrum direction.
1 = Horizontal
2 = Vertical-Rock
3 = Vertical-Soil
PeakAccel
The peak acceleration, A.
Tg
The characteristic ground period, Tg > 0.1. [s]
Ci
The importance coefficient.
Cs
The site soil coefficient.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a JTG B02-2013 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncJTGB022013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add JTG B02-2013 RS function


ret = SapModel.Func.FuncRS.SetJTGB022013("RS-1", 1, 0.18,
0.36, 0.4, 1, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in v18.2.0.
See Also
GetJTBG022013
SetIBC2003
Syntax
SapObject.SapModel.Func.FuncRS.SetIBC2003
VB6 Procedure
Function SetIBC2003(ByVal Name As String, ByVal IBC2003SS As Double,
ByVal IBC2003S1 As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified, otherwise, a new function is added.
IBC2003SS
The design spectral acceleration at short periods, Sds.
IBC2003S1
The design spectral acceleration at a one second period, Sd1.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a IBC2003 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncIBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IBC2003 RS function


ret = SapModel.Func.FuncRS.SetIBC2003("RS-1", 1.2, 0.3,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetIBC2003
SetIBC2006
Syntax
SapObject.SapModel.Func.FuncRS.SetIBC2006
VB6 Procedure
Function SetIBC2006(ByVal Name As String, ByVal IBC2006Option As Long,
ByVal IBC2006Latitude As Double, ByVal IBC2006Longitude As Double, ByVal
IBC2006ZipCode As String, ByVal IBC2006SS As Double, ByVal IBC2006S1 As
Double, ByVal IBC2006TL As Double, ByVal IBC2006SiteClass As Long, ByVal
IBC2006Fa As Double, ByRef IBC2006Fv As Double, ByVal DampRatio As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified; otherwise, a new function is added.
IBC2006Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitiude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
IBC2006Latitude, IBC2006Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when IBC2006Option = 0.
IBC2006ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when IBC2006Option = 1.
IBC2006SS, IBC2006S1
The seismic coefficients Ss and S1. This item is used only when IBC2006Option
= 2.
IBC2006TL
The long-period transition period. [s]
IBC2006SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
IBC2006Fa, IBC2006Fv
The site coefficients Fa and Fv. These items are used only when
IBC2006SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a IBC2006 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncIBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IBC2006 RS function


ret = SapModel.Func.FuncRS.SetIBC2006("RS-1", 1, 0, 0,
"94704", 0, 0, 7.5, 4, 0, 0, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetIBC2006
SetIS18932002
Syntax
SapObject.SapModel.Func.FuncRS.SetIS18932002
VB6 Procedure
Function SetIS18932002(ByVal Name As String, ByVal INZ As Double, ByVal
INS As Long, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
INZ
The seismic zone factor, Z.
INS
This is 1, 2 or 3, indicating the soil type.
1=I
2 = II
3 = III
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a IS1893-2002 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncIS18932002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add IS18932002 RS function


ret = SapModel.Func.FuncRS.SetIS18932002("RS-1", 0.3, 3,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetIS18932002
SetItalian3274
Syntax
SapObject.SapModel.Func.FuncRS.SetItalian3274
VB6 Procedure
Function SetItalian3274(ByVal Name As String, ByVal Italag As Double, ByVal
ItalSoilType As Long, ByVal Italq As Double, ByVal ItalLevel As Double, ByVal
DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
Italag
The peak ground acceleration.
ItalSoilType
This is 1, 2, 3, 4 or 5, indicating the seismic intensity.
1= A
2= B
3= C
4= E
5= D
Italq
The structure factor.
ItalLevel
This is 0, 1, 2, 3, 4, 5, 6 or 7, indicating the spectral level, direction and building
type.
0= SLU/H/Building
1= SLU/H/Bridge
2= SLU/V/Building
3= SLU/V/Bridge
4= EL/H/Building
5= EL/H/Bridge
6= EL/V/Building
7= EL/V/Bridge

SLU refers to ultimate strength design and EL refers to elastic design. H and V
are horizontal and vertical, respectively.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a Italian 3274 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncItalian3274()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Italian3274 RS function


ret = SapModel.Func.FuncRS.SetItalian3274("RS-1", 0.3, 2,
1.1, 4, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetItalian3274
SetNBCC2015
Syntax
SapObject.SapModel.Func.FuncRS.SetNBCC2015
VB6 Procedure
Function SetNBCC2015(ByVal Name As String, ByVal PGA As Double, ByVal
S02 As Double, ByVal S05 As Double, ByVal S1 As Double, ByVal S2 As
Double, ByVal S5 As Double, ByVal S10 As Double, ByVal SiteClass As Long,
ByVal F02 As Double, ByVal F05 As Double, ByVal F1 As Double, ByVal F2 As
Double, ByVal F5 As Double, ByVal F10 As Double, ByVal DampRatio As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S5
The spectral acceleration at a 5 second period.
S10
The spectral acceleration at a 10 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
F02
The site coefficient at a 0.2 second period. This item is read when the site class
is F only.
F05
The site coefficient at a 0.5 second period. This item is read when the site class
is F only.
F1
The site coefficient at a 1 second period. This item is read when the site class is
F only.
F2
The site coefficient at a 2 second period. This item is read when the site class is
F only.
F5
The site coefficient at a 5 second period. This item is read when the site class is
F only.
F10
The site coefficient at a 10 second period. This item is read when the site class
is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a NBCC2015 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub SetRSFuncNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2015 RS function


ret = SapModel.Func.FuncRS.SetNBCC2015("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 0.035, 0.01, 6, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetNBCC2015
SetNBCC2010
Syntax
SapObject.SapModel.Func.FuncRS.SetNBCC2010
VB6 Procedure
Function SetNBCC2010(ByVal Name As String, ByVal PGA As Double, ByVal
S02 As Double, ByVal S05 As Double, ByVal S1 As Double, ByVal S2 As
Double, ByVal SiteClass As Long, ByVal Fa As Double, ByVal Fv As Double,
ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa
The site coefficient, Fa. This item is read when the site class is F only.
Fv
The site coefficient, Fv. This item is read when the site class is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NBCC2010 response spectrum function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub SetRSFuncNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2010 RS function


ret = SapModel.Func.FuncRS.SetNBCC2010("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 6, 1.8, 2, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetNBCC2010
SetNBCC2005
Syntax
SapObject.SapModel.Func.FuncRS.SetNBCC2005
VB6 Procedure
Function SetNBCC2005(ByVal Name As String, ByVal NBCC2005PGA As
Double, ByVal NBCC2005S02 As Double, ByVal NBCC2005S05 As Double,
ByVal NBCC2005S1 As Double, ByVal NBCC2005S2 As Double, ByVal
NBCC2005SiteClass As Long, ByVal NBCC2005Fa As Double, ByVal
NBCC2005Fv As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NBCC2005PGA
The peak ground acceleration.
NBCC2005S02
The spectral acceleration at a 0.2 second period.
NBCC2005S05
The spectral acceleration at a 0.52 second period.
NBCC2005S1
The spectral acceleration at a 1 second period.
NBCC2005S2
The spectral acceleration at a 2 second period.
NBCC2005SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NBCC2005Fa
The site coefficient, Fa. This item is read when the site class is F only.
NBCC2005Fv
The site coefficient, Fv. This item is read when the site class is F only.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NBCC2005 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC2005 RS function


ret = SapModel.Func.FuncRS.SetNBCC2005("RS-1", 0.6, 1.1,
0.7, 0.35, 0.2, 6, 1.8, 2, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetNBCC2005
SetNBCC95
Syntax
SapObject.SapModel.Func.FuncRS.SetNBCC95
VB6 Procedure
Function SetNBCC95(ByVal Name As String, ByVal NBCC95ZVR As Double,
ByVal NBCC95ZA As Long, ByVal NBCC95ZV As Long, ByVal DampRatio As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified; otherwise, a new function is added.
NBCC95ZVR
The zonal velocity ratio.
NBCC95ZA
The acceleration-related seismic zone.
NBCC95ZV
The velocity-related seismic zone.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NBCC95 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NBCC95 RS function


ret = SapModel.Func.FuncRS.SetNBCC95("RS-1", 0.3, 5, 5,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNBCC95
SetNCHRP2007
Syntax
SapObject.SapModel.Func.FuncRS.SetNCHRP2007
VB6 Procedure
Function SetNCHRP2007(ByVal Name As String, ByVal NCHRP2007Option As
Long, ByVal NCHRP2007Latitude As Double, ByVal NCHRP2007Longitude As
Double, ByVal NCHRP2007ZipCode As String, ByVal NCHRP2007SS As
Double, ByVal NCHRP2007S1 As Double, ByVal NCHRP2007SiteClass As
Long, ByVal NCHRP2007Fa As Double, ByRef NCHRP2007Fv As Double,
ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NCHRP2007Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitiude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
NCHRP2007Latitude, NCHRP2007Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when NCHRP2007Option = 0.
NCHRP2007ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when NCHRP2007Option = 1.
NCHRP2007SS, NCHRP2007S1
The seismic coefficients Ss and S1. This item is used only when
NCHRP2007Option = 2.
NCHRP2007SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NCHRP2007Fa, NCHRP2007Fv
The site coefficients Fa and Fv. These items are used only when
NCHRP2007SiteClass= 6.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NCHRP 20-07 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNCHRP2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NCHRP2007 RS function


ret = SapModel.Func.FuncRS.SetNCHRP2007("RS-1", 1, 0, 0,
"94704", 0, 0, 4, 0, 0, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNCHRP2007
SetNEHRP97
Syntax
SapObject.SapModel.Func.FuncRS.SetNEHRP97
VB6 Procedure
Function SetNEHRP97(ByVal Name As String, ByVal NEHRP97SS As Double,
ByVal NEHRP97S1 As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function then that
function is modified; otherwise, a new function is added.
NEHRP97SS
The design spectral acceleration at short periods, Sds.
NEHRP97S1
The design spectral acceleration at a one second period, Sd1.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NEHRP97 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNEHRP97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NEHRP97 RS function


ret = SapModel.Func.FuncRS.SetNEHRP97("RS-1", 1.2, 0.3,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNEHRP97
SetNTC2008
Syntax
SapObject.SapModel.Func.FuncRS.SetNTC2008
VB6 Procedure
Function SetNTC2008(ByVal Name As String, ByVal ParamsOption As Long,
ByVal Latitude As Double, ByVal Longitude As Double, ByVal Island As Long,
ByVal LimitState As Long, ByVal UsageClass As Long, ByVal NomLife As
Double, ByVal PeakAccel As Double, ByVal F0 As Double, ByVal Tcs As Double,
ByVal SpecType As Long, ByVal SoilType As Long, ByVal Topography As Long,
ByVal hRatio As Double, ByVal Damping As Double, ByVal q As Double) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
ParamsOption
This is 1, 2, or 3, indicating the option for defining the parameters.
1 = by latitude and longitude
2 = by island
3 = user specified
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when ParamsOption = 1.
Island
This is one of the following values. This item is used only when ParamsOption =
2.
1 = Alicudi
2 = Arcipelago Toscano
3 = Filcudi
4 = Isole Egadi
5 = Lampedusa
6 = Linosa
7 = Lipari
8 = Palmarola
9 = Panarea
10 = Pantelleria
11 = Ponza
12 = Salina
13 = Santo Stefano
14 = Sardegna
15 = Stromboli
16 = Tremiti
17 = Ustica
18 = Ventotene
19 = Vulcano
20 = Zannone
LimitState
This is 1, 2, 3, or 4, indicating the limit state.
1 = SLO
2 = SLD
3 = SLV
4 = SLC
UsageClass
This is 1, 2, 3, or 4, indicating the usage class.
1= I
2= II
3= III
4= IV
NomLife
The nominal life to be considered.
PeakAccel
The peak ground acceleration, ag/g.
F0
The magnitude factor, F0.
Tcs
The reference period, Tc* [s].
SpecType
This is 1, 2, 3, or 4, indicating the type of spectrum to consider.
1= Elastic horizontal
2= Elastic vertical
3= Design horizontal
4= Design vertical
SoilType
This is 1, 2, 3, 4, or 5, indicating the subsoil type.
1= A
2= B
3= C
4= D
5= E

Topography
This is 1, 2, 3, or 4, indicating the topography type.
1= T1
2= T2
3= T3
4= T4
hRatio
The ratio for the site altitude at the base of the hill to the height of the hill.
Damping
The damping, in percent. This is only applicable for SpecType 1 and 2.
q
The behavior correction factor. This is only applicable for SpecType 3 and 4.
Remarks
This function defines a NTC2008 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NTC2008 RS function


ret = SapModel.Func.FuncRS.SetNTC2008("RS-1", 1, 45.9, 12.6,
1, 3, 2, 50, 0.2, 2.4, 0.3, 3, 2, 1, 1, 5, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetNTC2008
SetNZS11702004
Syntax
SapObject.SapModel.Func.FuncRS.SetNZS11702004
VB6 Procedure
Function SetNZS11702004(ByVal Name As String, ByVal NZS2004SiteClass
As Long, ByVal NZS2004Z As Double, ByVal NZS2004R As Double, ByVal
NZS2004DIST As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NZS2004SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
NZS2004Z
The hazard factor, Z.
NZS2004R
The return period factor, R.
NZS2004DIST
Distance to the fault in kim, used to calculate the near fault factor.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines an NZS 1170.5 2004 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNZS11702004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NZS 1170 2004 RS function


ret = SapModel.Func.FuncRS.SetNZS11702004("RS-1", 3, 0.4,
1.3, 20, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
Modified NZS2004N to NZS2004DIST in version 14.1.0.
See Also
GetNZS11702004
SetNZS42031992
Syntax
SapObject.SapModel.Func.FuncRS.SetNZS42031992
VB6 Procedure
Function SetNZS42031992(ByVal Name As String, ByVal NZS4203SF As
Double, ByVal NZS4203S As Long, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NZS4203SF
The scaling factor (Sm * Sp * R * Z * L).
NZS4203S
This is 1, 2 or 3, indicating the site subsoil category.
1=A
2=B
3=C
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a NZS4203-1992 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncNZS42031992()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add NZS42031992 RS function


ret = SapModel.Func.FuncRS.SetNZS42031992("RS-1", 1.2, 3,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNZS42031992
SetSP14133302014
Syntax
SapObject.SapModel.Func.FuncRS.SetSP14133302014
VB6 Procedure
Function SetSP14133302014(ByVal Name As String, ByVal Direction As Long,
ByVal Seismicity As Long, ByVal SoilCat As Long, ByVal K0Factor As Double,
ByVal K1Factor As Double, ByVal KPsiFactor As Double, ByVal NonlinSoil As
Boolean, ByVal ASoil As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
Direction
This is 1, 2, 3, or 4, indicating the direction and structure type for which the
response spectrum is generated.
1= Building Horizontal
2= Building Vertical
3= Bridge Horizontal
4= Bridge Vertical

Seismicity
This is 1, 2, 3, or 4, indicating the region seismicity of the construction site.
1= 6
2= 7
3= 8
4= 9

SoilCat
This is 1, 2, 3, or 4, indicating the soil category.
1= I
2= II
3= III
4= IV

K0Factor
The K0Factor, 0 < K0 <= 2.0. This is only applicable when the Direction
parameter is 1 or 3 for horizontal spectra.
K1Factor
The K1Factor, 0 < K1 <= 1.0.
KPsiFactor
The KPsiFactor, 0.5 < KPsi <= 1.5. This is only applicable when the Direction
parameter is 1 or 3 for horizontal spectra.
NonlinSoil
This item is True if nonlinear soil deformation should be accounted for. This is
only applicable when the Direction parameter is 1 or 2 for buildings and the
SoilCat parameter is 3 or 4.
ASoil
The nonlinear soil deformation factor, 0 > a_soil <= 1.0. This is only applicable
when the NonlinSoil parameter is True, the Direction parameter is 1 or 2
buildings, and the SoilCat parameter is 3 or 4.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a SP 14.13330.2014 response spectrum
function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncSP14133302014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add SP 14.13330.2014 RS function


ret = SapModel.Func.FuncRS.SetSP14133302014("RS-1", 1, 2, 2,
1.0, 0.25, 1.0, False, 0.7, 0.04)
'get SP 14.13330.2014 RS function
ret = SapModel.Func.FuncRS.GetSP14133302014("RS-1",
Direction, Seismicity, SoilCat, K0Factor, K1Factor, KPsiFactor,
NonlinSoil, ASoil, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
See Also
GetSP14133302014
SetUBC94
Syntax
SapObject.SapModel.Func.FuncRS.SetUBC94
VB6 Procedure
Function SetUBC94(ByVal Name As String, ByVal UBC94Z As Double, ByVal
UBC94S As Long, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
UBC94Z
The seismic zone factor, Z.
UBC94S
This is 1, 2 or 3, indicating the soil type.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a UBC94 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC94 RS function


ret = SapModel.Func.FuncRS.SetUBC94("RS-1", 0.35, 3, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUBC94
SetUBC97
Syntax
SapObject.SapModel.Func.FuncRS.SetUBC97
VB6 Procedure
Function SetUBC97(ByVal Name As String, ByVal UBC97Ca As Double, ByVal
UBC97Cv As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
UBC97Ca
The seismic coefficient, Ca.
UBC97Cv
The seismic coefficient, Cv.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a UBC97 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC97 RS function


ret = SapModel.Func.FuncRS.SetUBC97("RS-1", 0.36, 0.54,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUBC97
SetUser
Syntax
SapObject.SapModel.Func.FuncRS.SetUser
VB6 Procedure
Function SetUser(ByVal Name As String, ByVal NumberItems As Long, ByRef
Period() As Double, ByRef Value() As Double, ByVal DampRatio As Double) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NumberItems
The number of period and value pairs defined.
Period
This is an array that includes the period for each data point. [s]
Value
This is an array that includes the function value for each data point.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a user response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim Period() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user RS function


NumberItems = 6
ReDim Period(NumberItems - 1)
ReDim Value(NumberItems - 1)
Period(0) = 0.03: Value(0) = 0.4
Period(1) = 0.05: Value(1) = 2.2
Period(2) = 0.80: Value(2) = 2.2
Period(3) = 1.20: Value(3) = 1.0
Period(4) = 4.00: Value(4) = 0.2
Period(5) = 10.0: Value(5) = 0.05
ret = SapModel.Func.FuncRS.SetUser("RS-1", NumberItems,
Period, Value, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUser
GetFromFile
Syntax
SapObject.SapModel.Func.FuncSS.GetFromFile
VB6 Procedure
Function GetFromFile(ByVal Name As String, ByRef FileName As String, ByRef
HeadLines As Long, ByRef PreChars As Long, ByRef PointsPerLine As Long,
ByRef ValueType As Long, ByRef FreeFormat As Boolean, ByRef NumberFixed
As Long, ByRef FreqTypeInFile As Long) As Long
Parameters
Name
The name of a defined steady state function specified to be from a text file.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item only applies when the FreeFormat item is False. It is the number of
characters per item.
FreqTypeInFile
This is either 1 or 2, indicating frequency type.
1 = Hz
2 = RPM
Remarks
This function retrieves the definition of a steady state function from file.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSSFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim HeadLines As Long
Dim PreChars As Long
Dim PointsPerLine As Long
Dim ValueType As Long
Dim FreeFormat As Boolean
Dim NumberFixed As Long
Dim FreqTypeInFile As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add SS function from file


ret = SapModel.Func.FuncSS.SetFromFile("SS-1",
"C:\SapAPI\FuncSS.txt", 2, 0, 1, 2, True)

'get SS function from file


ret = SapModel.Func.FuncSS.GetFromFile("SS-1", FileName,
HeadLines, PreChars, PointsPerLine, ValueType, FreeFormat,
NumberFixed, FreqTypeInFile)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncSS.txt used in the VBA
Example.
Steady State Function
One pair of Frequency (Hz) and Value items per line
0 1
1 1
2 2
3 2
Release Notes
Initial release in version 11.02.
See Also
SetFromFile
GetUser
Syntax
SapObject.SapModel.Func.FuncSS.GetUser
VB6 Procedure
Function GetUser(ByVal Name As String, ByRef NumberItems As Long, ByRef
Frequency() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of a user defined steady state function.
NumberItems
The number of frequency and value pairs defined.
Frequency
This is an array that includes the frequency in Hz for each data point. [cyc/s]
Value
This is an array that includes the function value for each data point.
Remarks
This function retrieves the definition of a user defined steady state function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSSFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Freq() As Double
Dim Val() As Double
Dim NumberItems As Long
Dim Frequency() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user SS function


Num = 4
ReDim Freq(Num - 1)
ReDim Val(Num - 1)
Freq(0) = 0: Val(0) = 1
Freq(1) = 1: Val(1) = 1
Freq(2) = 2: Val(2) = 2
Freq(3) = 3: Val(3) = 2
ret = SapModel.Func.FuncSS.SetUser("SS-1", Num, Freq, Val)

'get user SS function


ret = SapModel.Func.FuncSS.GetUser("SS-1", NumberItems,
Frequency, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUser
SetFromFile
Syntax
SapObject.SapModel.Func.FuncSS.SetFromFile
VB6 Procedure
Function SetFromFile(ByVal Name As String, ByVal FileName As String, ByVal
HeadLines As Long, ByVal PreChars As Long, ByVal PointsPerLine As Long,
ByVal ValueType As Long, ByVal FreeFormat As Boolean, Optional ByVal
NumberFixed As Long = 10, Optional ByVal FreqTypeInFile As Long = 1) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item only applies when the FreeFormat item is False. It is the number of
characters per item.
FreqTypeInFile
This is either 1 or 2, indicating frequency type.
1 = Hz
2 = RPM
Remarks
This function defines a steady state function from file.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetSSFuncFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add SS function from file


ret = SapModel.Func.FuncSS.SetFromFile("SS-1",
"C:\SapAPI\FuncSS.txt", 2, 0, 1, 2, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncSS.txt used in the VBA
Example.
Steady State Function
One pair of Frequency (Hz) and Value items per line
0 1
1 1
2 2
3 2
Release Notes
Initial release in version 11.02.
See Also
GetFromFile
SetUser
Syntax
SapObject.SapModel.Func.FuncSS.SetUser
VB6 Procedure
Function SetUser(ByVal Name As String, ByVal NumberItems As Long, ByRef
Frequency() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NumberItems
The number of frequency and value pairs defined.
Frequency
This is an array that includes the frequency in Hz for each data point. [cyc/s]
Value
This is an array that includes the function value for each data point.
Remarks
This function defines a user steady state function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetSSFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim Frequency() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user SS function


NumberItems = 4
ReDim Frequency(NumberItems - 1)
ReDim Value(NumberItems - 1)
Frequency(0) = 0: Value(0) = 1
Frequency(1) = 1: Value(1) = 1
Frequency(2) = 2: Value(2) = 2
Frequency(3) = 3: Value(3) = 2
ret = SapModel.Func.FuncSS.SetUser("SS-1", NumberItems,
Frequency, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUser
GetCosine
Syntax
SapObject.SapModel.Func.FuncTH.GetCosine
VB6 Procedure
Function GetCosine(ByVal Name As String, ByRef CosineP As Double, ByRef
CosineSteps As Long, ByRef CosineCycles As Long, ByRef CosineAmp As
Double) As Long
Parameters
Name
The name of a cosine-type time history function.
CosineP
The period of the cosine function. [s]
CosineSteps
The number of steps in the cosine function. This item can not be less than 8.
CosineCycles
The number of cycles in the cosine function.
CosineAmp
The amplitude of the cosine function.
Remarks
This function retrieves the definition of a cosine-type time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncCosine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CosineP As Double
Dim CosineSteps As Long
Dim CosineCycles As Long
Dim CosineAmp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cosine TH function


ret = SapModel.Func.FuncTH.SetCosine("TH-1", 1, 16, 4, 1.25)

'get cosine TH function


ret = SapModel.Func.FuncTH.GetCosine("TH-1", CosineP,
CosineSteps, CosineCycles, CosineAmp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetCosine
GetFromFile_1
Syntax
SapObject.SapModel.Func.FuncTH.GetFromFile_1
VB6 Procedure
Function GetFromFile_1(ByVal Name As String, ByRef FileName As String,
ByRef HeadLines As Long, ByRef PreChars As Long, ByRef PointsPerLine As
Long, ByRef ValueType As Long, ByRef FreeFormat As Boolean, ByRef
NumberFixed As Long, DT As Double) As Long
Parameters
Name
The name of a defined time history function specified to be from a text file.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item applies only when the FreeFormat item is False. It is the number of
characters per item.
DT
This item applies only when the ValueType item is 1 (equal time intervals). It is
the time interval between function points.
Remarks
This function retrieves the definition of a time history function from file.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncFromFile_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim HeadLines As Long
Dim PreChars As Long
Dim PointsPerLine As Long
Dim ValueType As Long
Dim FreeFormat As Boolean
Dim NumberFixed As Long
Dim DT As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add TH function from file


ret = SapModel.Func.FuncTH.SetFromFile_1("TH-1",
"C:\SapAPI\FuncTH.txt", 3, 0, 3, 2, True)

'get TH function from file


ret = SapModel.Func.FuncTH.GetFromFile_1("TH-1", FileName,
HeadLines, PreChars, PointsPerLine, ValueType, FreeFormat,
NumberFixed, DT)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncTH.txt used in the VBA
Example.
Time History Function
Time (sec) and Acceleration (g) values
3 points per line
0.00000 .01080 .04200 .00100 .09700 .01590
.16100 -.00010 .22100 .01890 .26300 .00010
.29100 .00590 .33200 -.00120 .37400 .02000
.42900 -.02370 .47100 .00760 .58100 .04250
.62300 .00940 .66500 .01380 .72000 -.00880
.72010 -.02560 .78900 -.03870 .78910 -.05680
.87200 -.02320 .87210 -.03430 .94100 -.04020
.94110 -.06030 .99700 -.07890 1.06600 -.06660
1.06610 -.03810 1.09400 -.04290 1.16800 .08970
1.31500 -.16960 1.38400 -.08280 1.41200 -.08280
1.44000 -.09450 1.48100 -.08850 1.50900 -.10800
1.53700 -.12800 1.62800 .11440 1.70300 .23550
1.80000 .14280 1.85500 .17770 1.92400 -.26100
2.00700 -.31940 2.21500 .29520 2.27000 .26340
2.32000 -.29840 2.39500 .00540 2.45000 .28650
2.51900 -.04690 2.57500 .15160 2.65200 .20770
2.70800 .10870 2.76900 -.03250 2.89300 .10330
2.97600 -.08030 3.06800 .05200 3.12900 -.15470
3.21200 .00650 3.25300 -.20600 3.38600 .19270
3.41900 -.09370 3.53000 .17080 3.59900 -.03590
3.66800 .03650 3.73800 -.07360 3.83500 .03110
3.90400 -.18330 4.01400 .02270 4.05600 -.04350
4.10600 .02160 4.22200 -.19720 4.31400 -.17620
4.41600 .14600 4.47100 -.00470 4.61800 .25720
4.66500 -.20450 4.75600 .06080 4.83100 -.27330
4.97000 .17790 5.03900 .03010 5.10800 .21830
5.19900 .02670 5.23300 .12520 5.30200 .12900
5.33000 .10890 5.34300 -.02390 5.45400 .17230
5.51000 -.10210 5.60600 .01410 5.69000 -.19490
5.77300 -.02420 5.80000 -.00500 5.80900 -.02750
5.86900 -.05730 5.88300 -.03270 5.92500 .02160
5.98000 .01080 6.01300 .02350 6.08500 -.06650
6.13200 .00140 6.17400 .04930 6.18800 .01490
6.18810 -.02000 6.22900 -.03810 6.27900 .02070
6.32600 -.00580 6.36800 -.06030 6.38200 -.01620
6.40900 .02000 6.45900 -.01760 6.47800 -.00330
6.52000 .00430 6.53400 -.00400 6.56200 -.00990
6.57500 -.00170 6.60300 -.01700 6.64500 .03730
6.68600 .04570 6.71400 .03850 6.72800 .00090
6.76900 -.02880 6.76910 .00160 6.81100 .01130
6.85200 .00220 6.90800 .00920 6.99100 -.09960
7.07400 .03600 7.12100 .00780 7.14300 -.02770
7.14900 .00260 7.17100 .02720 7.22600 .05760
7.29500 -.04920 7.37000 .02970 7.40600 .01090
7.42500 .01860 7.46100 -.02530 7.52500 -.03470
7.57200 .00360 7.60000 -.06280 7.64100 -.02800
7.66900 -.01960 7.69100 .00680 7.75200 -.00540
7.79400 -.06030 7.83500 -.03570 7.87700 -.07160
7.96000 -.01400 7.98700 -.00560 8.00100 .02220
8.07000 .04680 8.12600 .02600 8.12610 -.03350
8.19500 -.01280 8.22300 .06610 8.27800 .03050
8.33400 .02460 8.40300 .03470 8.45800 -.03690
8.53300 -.03440 8.59600 -.01040 8.63800 -.02600
8.73500 .15340 8.81800 -.00280 8.86000 .02330
8.88200 -.02610 8.91500 -.00220 8.95600 -.18490
9.05300 .12600 9.09500 .03200 9.12300 .09550
9.15000 .12460 9.25300 -.03280 9.28900 -.04510
9.42700 .13010 9.44100 -.16570 9.51000 .04190
9.63500 -.09360 9.70400 .08160 9.81500 -.08810
9.89800 .00640 9.93900 -.00060 9.99500 .05860
10.02200 -.07130 10.05000 -.04480 10.05010 -.02210
10.10500 .00930 10.10510 .00240 10.18800 .05100
10.27200 -.12430 10.38200 .05870 10.42400 .01330
10.45200 .03860 10.46500 .11640 10.50700 -.03740
10.53400 -.05720 10.64500 .03080 10.70100 .02230
10.71400 .05150 10.77000 .09030 10.83900 -.01940
10.92200 .04710 10.92210 -.06770 10.96400 -.07940
10.99100 -.01200 11.07400 .06080 11.08800 -.02690
11.11600 -.04160 11.20700 .02930 11.20710 .05520
11.22700 .07560 11.26800 .04310 11.32400 .02080
11.43400 .11800 11.57300 -.09990 11.65600 -.12470
11.72500 -.20940 11.72510 -.14180 11.78000 -.11630
11.80800 0.00000 11.87700 .07620 11.91900 .05700
11.98800 .13540 12.04300 .06730 12.11300 .08650
Release Notes
Initial release in version 14.12.
This function supersedes GetFromFile.
See Also
SetFromFile_1
GetRamp
Syntax
SapObject.SapModel.Func.FuncTH.GetRamp
VB6 Procedure
Function GetRamp(ByVal Name As String, ByRef RampTime As Double, ByRef
RampAmp As Double, ByRef RampMaxTime As Double) As Long
Parameters
Name
The name of a ramp-type time history function.
RampTime
The time it takes for the ramp function to initially reach its maximum value. [s]
RampAmp
The maximum amplitude of the ramp function.
RampMaxTime
The time at the end of the ramp function. This time must be greater than the
RampTime. [s]
Remarks
This function retrieves the definition of a ramp-type time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncRamp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim RampTime As Double
Dim RampAmp As Double
Dim RampMaxTime As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ramp TH function


ret = SapModel.Func.FuncTH.SetRamp("TH-1", 1, 1.25, 8)

'get ramp TH function


ret = SapModel.Func.FuncTH.GetRamp("TH-1", RampTime,
RampAmp, RampMaxTime)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetRamp
GetSawtooth
Syntax
SapObject.SapModel.Func.FuncTH.GetSawtooth
VB6 Procedure
Function GetSawtooth(ByVal Name As String, ByRef SawP As Double, ByRef
SawTime As Double, ByRef SawCycles As Long, ByRef SawAmp As Double)
As Long
Parameters
Name
The name of a sawtooth-type time history function.
SawP
The period of the sawtooth function. [s]
SawTime
The time it takes for the sawtooth function to ramp up from a function value of
zero to its maximum amplitude. [s]
SawCycles
The number of cycles in the function.
SawAmp
The maximum amplitude of the sawtooth function.
Remarks
This function retrieves the definition of a sawtooth-type time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncSawtooth()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SawP As Double
Dim SawTime As Double
Dim SawCycles As Long
Dim SawAmp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sawtooth TH function


ret = SapModel.Func.FuncTH.SetSawtooth("TH-1", 1, 0.25, 4,
1.75)

'get sawtooth TH function


ret = SapModel.Func.FuncTH.GetSawtooth("TH-1", SawP,
SawTime, SawCycles, SawAmp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetSawtooth
GetSine
Syntax
SapObject.SapModel.Func.FuncTH.GetSine
VB6 Procedure
Function GetSine(ByVal Name As String, ByRef SineP As Double, ByRef
SineSteps As Long, ByRef SineCycles As Long, ByRef SineAmp As Double) As
Long
Parameters
Name
The name of a sine-type time history function.
SineP
The period of the sine function. [s]
SineSteps
The number of steps in the sine function. This item can not be less than 8.
SineCycles
The number of cycles in the sine function.
SineAmp
The amplitude of the sine function.
Remarks
This function retrieves the definition of a sine-type time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncSine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SineP As Double
Dim SineSteps As Long
Dim SineCycles As Long
Dim SineAmp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'get sine TH function


ret = SapModel.Func.FuncTH.GetSine("TH-1", SineP, SineSteps,
SineCycles, SineAmp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetSine
GetTriangular
Syntax
SapObject.SapModel.Func.FuncTH.GetTriangular
VB6 Procedure
Function GetTriangular(ByVal Name As String, ByRef TriP As Double, ByRef
TriCycles As Long, ByRef TriAmp As Double) As Long
Parameters
Name
The name of a triangular-type time history function.
TriP
The period of the triangular function. [s]
TriCycles
The number of cycles in the function.
TriAmp
The maximum amplitude of the triangular function.
Remarks
This function retrieves the definition of a triangular-type time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncTriangular()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim TriP As Double
Dim TriCycles As Long
Dim TriAmp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add triangular TH function


ret = SapModel.Func.FuncTH.SetTriangular("TH-1", 1, 4, 1.75)

'get triangular TH function


ret = SapModel.Func.FuncTH.GetTriangular("TH-1", TriP,
TriCycles, TriAmp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTriangular
GetUser
Syntax
SapObject.SapModel.Func.FuncTH.GetUser
VB6 Procedure
Function GetUser(ByVal Name As String, ByRef NumberItems As Long, ByRef
MyTime() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of a user defined time history function.
NumberItems
The number of frequency and value pairs defined.
MyTime
This is an array that includes the time for each data point. [s]
Value
This is an array that includes the function value for each data point.
Remarks
This function retrieves the definition of a user defined time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Tmp() As Double
Dim Val() As Double
Dim NumberItems As Long
Dim MyTime() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user TH function


NumberItems = 6
ReDim Tmp(NumberItems - 1)
ReDim Val(NumberItems - 1)
Tmp(0) = 0: Val(0) = 0.1
Tmp(1) = 1: Val(1) = 0.02
Tmp(2) = 2: Val(2) = -0.06
Tmp(3) = 3: Val(3) = -0.02
Tmp(4) = 4: Val(4) = 0.05
Tmp(5) = 5: Val(5) = 0.02
ret = SapModel.Func.FuncTH.SetUser("TH-1", NumberItems, Tmp,
Val)

'get user TH function


ret = SapModel.Func.FuncTH.GetUser("TH-1", NumberItems,
MyTime, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUser
GetUserPeriodic
Syntax
SapObject.SapModel.Func.FuncTH.GetUserPeriodic
VB6 Procedure
Function GetUserPeriodic(ByVal Name As String, ByRef UPCycles As Long,
ByRef NumberItems As Long, ByRef MyTime() As Double, ByRef Value() As
Double) As Long
Parameters
Name
The name of a user periodic time history function.
UPCycles
The number of cycles in the function.
NumberItems
The number of frequency and value pairs defined.
MyTime
This is an array that includes the time for each data point. [s]
Value
This is an array that includes the function value for each data point.
Remarks
This function retrieves the definition of a user periodic time history function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncUserPeriodic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Tmp() As Double
Dim Val() As Double
Dim UPCycles As Long
Dim NumberItems As Long
Dim MyTime() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user periodic TH function


NumberItems = 6
ReDim Tmp(NumberItems - 1)
ReDim Val(NumberItems - 1)
Tmp(0) = 0: Val(0) = 0.1
Tmp(1) = 1: Val(1) = 0.02
Tmp(2) = 2: Val(2) = -0.06
Tmp(3) = 3: Val(3) = -0.02
Tmp(4) = 4: Val(4) = 0.05
Tmp(5) = 5: Val(5) = 0.02
ret = SapModel.Func.FuncTH.SetUserPeriodic("TH-1", 4,
NumberItems, Tmp, Val)

'get user periodic TH function


ret = SapModel.Func.FuncTH.GetUserPeriodic("TH-1", UPCycles,
NumberItems, MyTime, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetUserPeriodic
SetCosine
Syntax
SapObject.SapModel.Func.FuncTH.SetCosine
VB6 Procedure
Function SetCosine(ByVal Name As String, ByVal CosineP As Double, ByVal
CosineSteps As Long, ByVal CosineCycles As Long, ByVal CosineAmp As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
CosineP
The period of the cosine function. [s]
CosineSteps
The number of steps in the cosine function. This item can not be less than 8.
CosineCycles
The number of cycles in the cosine function.
CosineAmp
The amplitude of the cosine function.
Remarks
This function defines a cosine-type time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncCosine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cosine TH function


ret = SapModel.Func.FuncTH.SetCosine("TH-1", 1, 16, 4, 1.25)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetCosine
SetFromFile_1
Syntax
SapObject.SapModel.Func.FuncTH.SetFromFile_1
VB6 Procedure
Function SetFromFile_1(ByVal Name As String, ByVal FileName As String,
ByVal HeadLines As Long, ByVal PreChars As Long, ByVal PointsPerLine As
Long, ByVal ValueType As Long, ByVal FreeFormat As Boolean, Optional ByVal
NumberFixed As Long = 10, Optional ByVal DT As Double = 0.02) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item applies only when the FreeFormat item is False. It is the number of
characters per item.
DT
This item applies only when the ValueType item is 1 (equal time intervals). It is
the time interval between function points.
Remarks
This function defines a time history function from file.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncFromFile_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject =
CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add TH function from file


ret = SapModel.Func.FuncTH.SetFromFile_1("TH-1",
"C:\SapAPI\FuncTH.txt", 3, 0, 3, 2, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncTH.txt used in the VBA
Example.
Time History Function
Time (sec) and Acceleration (g) values
3 points per line
0.00000 .01080 .04200 .00100 .09700 .01590
.16100 -.00010 .22100 .01890 .26300 .00010
.29100 .00590 .33200 -.00120 .37400 .02000
.42900 -.02370 .47100 .00760 .58100 .04250
.62300 .00940 .66500 .01380 .72000 -.00880
.72010 -.02560 .78900 -.03870 .78910 -.05680
.87200 -.02320 .87210 -.03430 .94100 -.04020
.94110 -.06030 .99700 -.07890 1.06600 -.06660
1.06610 -.03810 1.09400 -.04290 1.16800 .08970
1.31500 -.16960 1.38400 -.08280 1.41200 -.08280
1.44000 -.09450 1.48100 -.08850 1.50900 -.10800
1.53700 -.12800 1.62800 .11440 1.70300 .23550
1.80000 .14280 1.85500 .17770 1.92400 -.26100
2.00700 -.31940 2.21500 .29520 2.27000 .26340
2.32000 -.29840 2.39500 .00540 2.45000 .28650
2.51900 -.04690 2.57500 .15160 2.65200 .20770
2.70800 .10870 2.76900 -.03250 2.89300 .10330
2.97600 -.08030 3.06800 .05200 3.12900 -.15470
3.21200 .00650 3.25300 -.20600 3.38600 .19270
3.41900 -.09370 3.53000 .17080 3.59900 -.03590
3.66800 .03650 3.73800 -.07360 3.83500 .03110
3.90400 -.18330 4.01400 .02270 4.05600 -.04350
4.10600 .02160 4.22200 -.19720 4.31400 -.17620
4.41600 .14600 4.47100 -.00470 4.61800 .25720
4.66500 -.20450 4.75600 .06080 4.83100 -.27330
4.97000 .17790 5.03900 .03010 5.10800 .21830
5.19900 .02670 5.23300 .12520 5.30200 .12900
5.33000 .10890 5.34300 -.02390 5.45400 .17230
5.51000 -.10210 5.60600 .01410 5.69000 -.19490
5.77300 -.02420 5.80000 -.00500 5.80900 -.02750
5.86900 -.05730 5.88300 -.03270 5.92500 .02160
5.98000 .01080 6.01300 .02350 6.08500 -.06650
6.13200 .00140 6.17400 .04930 6.18800 .01490
6.18810 -.02000 6.22900 -.03810 6.27900 .02070
6.32600 -.00580 6.36800 -.06030 6.38200 -.01620
6.40900 .02000 6.45900 -.01760 6.47800 -.00330
6.52000 .00430 6.53400 -.00400 6.56200 -.00990
6.57500 -.00170 6.60300 -.01700 6.64500 .03730
6.68600 .04570 6.71400 .03850 6.72800 .00090
6.76900 -.02880 6.76910 .00160 6.81100 .01130
6.85200 .00220 6.90800 .00920 6.99100 -.09960
7.07400 .03600 7.12100 .00780 7.14300 -.02770
7.14900 .00260 7.17100 .02720 7.22600 .05760
7.29500 -.04920 7.37000 .02970 7.40600 .01090
7.42500 .01860 7.46100 -.02530 7.52500 -.03470
7.57200 .00360 7.60000 -.06280 7.64100 -.02800
7.66900 -.01960 7.69100 .00680 7.75200 -.00540
7.79400 -.06030 7.83500 -.03570 7.87700 -.07160
7.96000 -.01400 7.98700 -.00560 8.00100 .02220
8.07000 .04680 8.12600 .02600 8.12610 -.03350
8.19500 -.01280 8.22300 .06610 8.27800 .03050
8.33400 .02460 8.40300 .03470 8.45800 -.03690
8.53300 -.03440 8.59600 -.01040 8.63800 -.02600
8.73500 .15340 8.81800 -.00280 8.86000 .02330
8.88200 -.02610 8.91500 -.00220 8.95600 -.18490
9.05300 .12600 9.09500 .03200 9.12300 .09550
9.15000 .12460 9.25300 -.03280 9.28900 -.04510
9.42700 .13010 9.44100 -.16570 9.51000 .04190
9.63500 -.09360 9.70400 .08160 9.81500 -.08810
9.89800 .00640 9.93900 -.00060 9.99500 .05860
10.02200 -.07130 10.05000 -.04480 10.05010 -.02210
10.10500 .00930 10.10510 .00240 10.18800 .05100
10.27200 -.12430 10.38200 .05870 10.42400 .01330
10.45200 .03860 10.46500 .11640 10.50700 -.03740
10.53400 -.05720 10.64500 .03080 10.70100 .02230
10.71400 .05150 10.77000 .09030 10.83900 -.01940
10.92200 .04710 10.92210 -.06770 10.96400 -.07940
10.99100 -.01200 11.07400 .06080 11.08800 -.02690
11.11600 -.04160 11.20700 .02930 11.20710 .05520
11.22700 .07560 11.26800 .04310 11.32400 .02080
11.43400 .11800 11.57300 -.09990 11.65600 -.12470
11.72500 -.20940 11.72510 -.14180 11.78000 -.11630
11.80800 0.00000 11.87700 .07620 11.91900 .05700
11.98800 .13540 12.04300 .06730 12.11300 .08650
Release Notes
Initial release in version 14.12.
This function supersedes SetFromFile.
See Also
GetFromFile_1
SetRamp
Syntax
SapObject.SapModel.Func.FuncTH.SetRamp
VB6 Procedure
Function SetRamp(ByVal Name As String, ByVal RampTime As Double, ByVal
RampAmp As Double, ByVal RampMaxTime As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
RampTime
The time it takes for the ramp function to initially reach its maximum value. [s]
RampAmp
The maximum amplitude of the ramp function.
RampMaxTime
The time at the end of the ramp function. This time must be greater than the
RampTime. [s]
Remarks
This function defines a ramp-type time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncRamp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ramp TH function


ret = SapModel.Func.FuncTH.SetRamp("TH-1", 1, 1.25, 8)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetRamp
SetSawtooth
Syntax
SapObject.SapModel.Func.FuncTH.SetSawtooth
VB6 Procedure
Function SetSawtooth(ByVal Name As String, ByVal SawP As Double, ByVal
SawTime As Double, ByVal SawCycles As Long, ByVal SawAmp As Double) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
SawP
The period of the sawtooth function. [s]
SawTime
The time it takes for the sawtooth function to ramp up from a function value of
zero to its maximum amplitude. [s]
SawCycles
The number of cycles in the function.
SawAmp
The maximum amplitude of the sawtooth function.
Remarks
This function defines a sawtooth-type time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncSawtooth()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sawtooth TH function


ret = SapModel.Func.FuncTH.SetSawtooth("TH-1", 1, 0.25, 4,
1.75)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetSawtooth
SetSine
Syntax
SapObject.SapModel.Func.FuncTH.SetSine
VB6 Procedure
Function SetSine(ByVal Name As String, ByVal SineP As Double, ByVal
SineSteps As Long, ByVal SineCycles As Long, ByVal SineAmp As Double) As
Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
SineP
The period of the sine function. [s]
SineSteps
The number of steps in the sine function. This item can not be less than 8.
SineCycles
The number of cycles in the sine function.
SineAmp
The amplitude of the sine function.
Remarks
This function defines a sine-type time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncSine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetSine
SetTriangular
Syntax
SapObject.SapModel.Func.FuncTH.SetTriangular
VB6 Procedure
Function SetTriangular(ByVal Name As String, ByVal TriP As Double, ByVal
TriCycles As Long, ByVal TriAmp As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
TriP
The period of the triangular function. [s]
TriCycles
The number of cycles in the function.
TriAmp
The maximum amplitude of the triangular function.
Remarks
This function defines a triangular-type time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncTriangular()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add triangular TH function


ret = SapModel.Func.FuncTH.SetTriangular("TH-1", 1, 4, 1.75)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTriangular
SetUser
Syntax
SapObject.SapModel.Func.FuncTH.SetUser
VB6 Procedure
Function SetUser(ByVal Name As String, ByVal NumberItems As Long, ByRef
MyTime() As Double, ByRef Value() As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
NumberItems
The number of time and value pairs defined.
MyTime
This is an array that includes the time for each data point. [s]
Value
This is an array that includes the function value for each data point.
Remarks
This function defines a user time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyTime() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user TH function


NumberItems = 6
ReDim MyTime(NumberItems - 1)
ReDim Value(NumberItems - 1)
MyTime(0) = 0: Value(0) = 0.1
MyTime(1) = 1: Value(1) = 0.02
MyTime(2) = 2: Value(2) = -0.06
MyTime(3) = 3: Value(3) = -0.02
MyTime(4) = 4: Value(4) = 0.05
MyTime(5) = 5: Value(5) = 0.02
ret = SapModel.Func.FuncTH.SetUser("TH-1", NumberItems,
MyTime, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUser
SetUserPeriodic
Syntax
SapObject.SapModel.Func.FuncTH.SetUserPeriodic
VB6 Procedure
Function SetUserPeriodic(ByVal Name As String, ByVal UPCycles As Long,
ByVal NumberItems As Long, ByRef MyTime() As Double, ByRef Value() As
Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
UPCycles
The number of cycles in the function.
NumberItems
The number of time and value pairs defined.
MyTime
This is an array that includes the time for each data point. [s]
Value
This is an array that includes the function value for each data point.
Remarks
This function defines a user periodic time history function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncUserPeriodic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyTime() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add user periodic TH function


NumberItems = 6
ReDim MyTime(NumberItems - 1)
ReDim Value(NumberItems - 1)
MyTime(0) = 0: Value(0) = 0.1
MyTime(1) = 1: Value(1) = 0.02
MyTime(2) = 2: Value(2) = -0.06
MyTime(3) = 3: Value(3) = -0.02
MyTime(4) = 4: Value(4) = 0.05
MyTime(5) = 5: Value(5) = 0.02
ret = SapModel.Func.FuncTH.SetUserPeriodic("TH-1", 4,
NumberItems, MyTime, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetUserPeriodic
ConvertLineToBLL
Syntax
SapObject.SapModel.GenRefLine.ConvertLineToBLL
VB6 Procedure
Function ConvertLineToBLL(ByVal Name As String, Optional ByVal FirstStation
As Double = 0, Optional ByVal CSys As String = "Global", Optional ByVal OffsetX
As Double = 0, Optional ByVal OffsetY As Double = 0, Optional ByVal OffsetZ As
Double) As Long
Parameters
Name
This is the name of an existing general reference line.
FirstStation
The first station value on the bridge layout line. [L]
CSys
The name of the coordinate system in which the general reference line is offset
to create the bridge layout line.
OffsetX
The distance to offset the general reference line in the x-direction of the
specified CSys, to the location of the new bridge layout line.
OffsetY The distance to offset the general reference line in the y-direction of the
specified CSys, to the location of the new bridge layout line.
OffsetZ
The distance to offset the general reference line in the z-direction of the specified
CSys, to the location of the new bridge layout line.
Remarks
This function converts an existing general reference line to a new bridge layout
line, with the ability to specify offset values.
The function returns zero if the bridge layout line is successfully created;
otherwise it returns a nonzero value.
VBA Example
Sub ConvertGenRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'convert general reference line to bridge layout line


ret = SapModel.GenRefLine.ConvertLineToBLL("GRef1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLine
Count
Syntax
SapObject.SapModel.GenRefLine.Count
VB6 Procedure
Function Count() As Long
Parameters
None.
Remarks
The function returns the number of defined general reference lines.
VBA Example
Sub CountGenRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'get number of general reference line


ret = SapModel.GenRefLine.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLine
Delete
Syntax
SapObject.SapModel.GenRefLine.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing general reference line.
Remarks
The function deletes the specified general reference line.
The function returns zero if the general reference line is successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteGenRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'delete general reference line


ret = SapModel.GenRefLine.Delete("GRef1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLine
SetLinePlanPoints
SetLineElevPoints
GetLine
Syntax
SapObject.SapModel.GenRefLine.GetLine
VB6 Procedure
Function GetLine(ByVal Name As String, ByRef DiscLength As Double, ByRef
DiscAngle As Double, ByRef Color As Long, ByRef Visible As Boolean) As Long
Parameters
Name
The name of an existing general reference line.
DiscLength
The maximum segment discretization length of the segments used to define
curves in the general reference line. [L]
DiscAngle
The maximum discretization angle in degrees for the general reference line.
[deg]
Color
The display color assigned to the general reference line.
Visible
Specifies whether the general reference line will be displayed in windows
displaying the model.
Remarks
The function returns zero if the general reference line data is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetGenRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim discLength As Double, discAngle As Double
Dim color As Long
Dim visible As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'get new general reference line


ret = SapModel.GenRefLine.GetLine("GRef1", discLength,
discAngle, color, visible)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLine
GetLinePlanPoints
GetLineElevPoints
GetLineElevPoints
Syntax
SapObject.SapModel.GenRefLine.GetLineElevPoints
VB6 Procedure
Function GetLineElevPoints(ByVal Name As String, ByRef NumberPoints As
Long, ByRef CurveType() As Long, ByRef Value1() As Double, ByRef Value2()
As Double, ByRef Value3() As Double, ByRef s() As Double, ByRef z() As
Double, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing general reference line.
NumberPoints
The number of points used to define the general reference line elevation layout.
CurveType
This is an array of values indicating the general reference line elevation layout
curve type for each point.
0 = None
1 = Circular Curve
2 = Highway Curve
3 = Parabolic Curve
4 = Bezier Curve
5 = BSpline Curve
6 = Bezier Curve Child Point
7 = BSpline Curve Child Point
Value1
This is the value of a parameter used to define the general reference line layout.
The item that Value1 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Curve Radius [L]
CurveType = 2: Curve Radius [L]
CurveType = 3: Angle measured from the horizontal, up station axis, to
the axis of symmetry of the parabolic curve. [deg]
CurveType = 4: Number of control points. This is currently hard-wired
internally to 4.
CurveType = 5: Number of control points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value2
This is the value of a parameter used to define the general reference line layout.
The item that Value2 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Curve length, including length of spirals on either end.
[L]
CurveType = 3: Rate at which the slope of a parabolic curve is
changing in percent. [1/L]
CurveType = 4: Number of discretization points.
CurveType = 5: Number of discretization points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value3
This is the value of a parameter used to define the general reference line layout.
The item that Value3 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Not Used
CurveType = 3: Not Used
CurveType = 4: Not Used
CurveType = 5: Curve order.
CurveType = 6: Not Used
CurveType = 7: Not Used
s
This is an array of the station coordinate of each point in the coordinate system
specified for the general reference line. [L]
z
This is an array of the Z coordinate of each point in the coordinate system
specified for the general reference line. [L]
Remarks
This function retrieves the general reference line elevation points and the
associated parameters.
The function returns zero if the general reference line parameters are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetElevPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim CurveType() As Long
Dim Value1() As Double
Dim Value2() As Double
Dim Value3() As Double
Dim s() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new general reference line


Name = "GRef1"
ret = SapModel.GenRefLine.SetLine(Name, 120, 5)

'set general reference line elev points data


NumberPoints = 3
ReDim CurveType(NumberPoints 1)
ReDim x(NumberPoints 1)
Redim y(NumberPoints 1)
CurveType(0) = 0
CurveType(1) = 1
CurveType(2) = 0
s(0) = 0: z(0) = 0
s(1) = 100: z(1) = 100
s(2) = 200: z(2) = 100
Value1(0) = 0: Value1(1) = 100: Value1(2) = 0
Value2(0) = 0: Value2(1) = 0: Value2(2) = 0
Value3(0) = 0: Value3(1) = 0: Value3(2) = 0
ret = SapModel.GenRefLine.SetLineElevPoints(Name,
NumberPoints, CurveType, Value1, Value2, Value3, s, z)

'get general reference line plan points data


ReDim CurveType(0)
ReDim Value1(0)
ReDim Value2(0)
ReDim Value3(0)
ReDim s(0)
ReDim z(0)
Ret = SapModel.GenRefLine.GetLinePlanPoints(Name,
NumberPoints, Value1, Value2, Value3, s, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLineElevPoints
GetLine
GetLinePlanPoints
GetLinePlanPoints
Syntax
SapObject.SapModel.GenRefLine.GetLinePlanPoints
VB6 Procedure
Function GetLinePlanPoints(ByVal Name As String, ByRef NumberPoints As
Long, ByRef CurveType() As Long, ByRef Value1() As Double, ByRef Value2()
As Double, ByRef Value3() As Double, ByRef x() As Double, ByRef y() As
Double, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing general reference line.
NumberPoints
The number of points used to define the general reference line plan layout.
CurveType
This is an array of values indicating the general reference line plan layout curve
type for each point.
0 = None
1 = Circular Curve
2 = Highway Curve
3 = Parabolic Curve
4 = Bezier Curve
5 = BSpline Curve
6 = Bezier Curve Child Point
7 = BSpline Curve Child Point
Value1
This is the value of a parameter used to define the general reference line layout.
The item that Value1 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Curve Radius [L]
CurveType = 2: Curve Radius [L]
CurveType = 3: Angle measured from the X-axis of the coordinate
system in which the general reference line is defined, to the axis of
symmetry of the parabolic curve. [deg]
CurveType = 4: Number of control points. This is currently hard-wired
internally to 4.
CurveType = 5: Number of control points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value2
This is the value of a parameter used to define the general reference line layout.
The item that Value2 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Curve length, including length of spirals on either end.
[L]
CurveType = 3: Rate at which the slope of a parabolic curve is
changing in percent. [1/L]
CurveType = 4: Number of discretization points.
CurveType = 5: Number of discretization points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value3
This is the value of a parameter used to define the general reference line layout.
The item that Value3 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Not Used
CurveType = 3: Not Used
CurveType = 4: Not Used
CurveType = 5: Curve order.
CurveType = 6: Not Used
CurveType = 7: Not Used
x
This is an array of the X coordinate of each point in the coordinate system
specified for the general reference line. [L]
y
This is an array of the Y coordinate of each point in the coordinate system
specified for the general reference line. [L]
Remarks
This function retrieves the general reference line plan points and the associated
parameters.
The function returns zero if the general reference line parameters are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetPlanPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim CurveType() As Long
Dim Value1() As Double
Dim Value2() As Double
Dim Value3() As Double
Dim x() As Double
Dim y() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new general reference line


Name = "GRef1"
ret = SapModel.GenRefLine.SetLine(Name, 120, 5)

'set general reference line plan points data


NumberPoints = 3
ReDim CurveType(NumberPoints 1)
ReDim x(NumberPoints 1)
Redim y(NumberPoints 1)
CurveType(0) = 0
CurveType(1) = 1
CurveType(2) = 0
x(0) = 0: y(0) = 0
x(1) = 100: y(1) = 100
x(2) = 200: y(2) = 100
Value1(0) = 0: Value1(1) = 100: Value1(2) = 0
Value2(0) = 0: Value2(1) = 0: Value2(2) = 0
Value3(0) = 0: Value3(1) = 0: Value3(2) = 0
ret = SapModel.GenRefLine.SetLinePlanPoints(Name,
NumberPoints, CurveType, Value1, Value2, Value3, x, y)

'get general reference line plan points data


ReDim CurveType(0)
ReDim Value1(0)
ReDim Value2(0)
ReDim Value3(0)
ReDim x(0)
ReDim y(0)
Ret = SapModel.GenRefLine.GetLinePlanPoints(Name,
NumberPoints, Value1, Value2, Value3, x, y)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLinePlanPoints
GetLine
GetLineElevPoints
GetNameList
Syntax
SapObject.SapModel.GenRefLine.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of general reference line names retrieved by the program.
MyName
This is a one-dimensional array of general reference line names. The MyName
array is created as a dynamic, zero-based array by the API user:
Dim MyName() As String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined general reference lines.
The function returns the names; otherwise it returns a nonzero value.
VBA Example
Sub GetGenRefLineNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'get general reference line names


ret = SapModel.GenRefLine.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
SetLine
SetLine
Syntax
SapObject.SapModel.GenRefLine.SetLine
VB6 Procedure
Function SetLine(ByVal Name As String, ByVal DiscLength As Double, ByVal
DiscAngle As Double, Optional ByVal CSys As String = "Global", Optional ByVal
Color As Long = -1, Optional ByVal Visible As Boolean = True) As Long
Parameters
Name
This is the name of a general reference line. If this is the name of an existing
general reference line, that general reference line is modified; otherwise a new
general reference line is added.
DiscLength
The maximum segment discretization length of the segments used to define
curves in the general reference line. [L]
DiscAngle
The maximum discretization angle in degrees for the general reference line.
[deg]
CSys
The name of the coordinate system in which the general reference line is
defined.
Color
The display color assigned to the general reference line. If Color is specified as
-1, the program will automatically assign a color.
Visible
The item is True if the general reference line should be displayed in windows
displaying the model.
Remarks
The function returns zero if the general reference line is successfully added or
modified; otherwise it returns a nonzero value.
VBA Example
Sub AddGenRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new general reference line


ret = SapModel.GenRefLine.SetLine("GRef1", 120, 5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
GetLine
SetLinePlanPoints
SetLineElevPoints
Delete
SetLineElevPoints
Syntax
SapObject.SapModel.GenRefLine.SetLineElevPoints
VB6 Procedure
Function SetLineElevPoints(ByVal Name As String, ByVal NumberPoints As
Long, ByRef CurveType() As Long, ByRef Value1() As Double, ByRef Value2()
As Double, ByRef Value3() As Double, ByRef s() As Double, ByRef z() As
Double) As Long
Parameters
Name
The name of a defined general reference line.
NumberPoints
The number of points used to define the general reference line elevation layout.
CurveType
This is an array of values indicating the general reference line elevation layout
curve type for each point.
0 = None
1 = Circular Curve
2 = Highway Curve
3 = Parabolic Curve
4 = Bezier Curve
5 = BSpline Curve
6 = Bezier Curve Child Point
7 = BSpline Curve Child Point
Value1
This is the value of a parameter used to define the general reference line layout.
The item that Value1 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Curve Radius [L]
CurveType = 2: Curve Radius [L]
CurveType = 3: Angle measured from the horizontal, up station axis, to
the axis of symmetry of the parabolic curve. [deg]
CurveType = 4: Number of control points. This is currently hard-wired
internally to 4.
CurveType = 5: Number of control points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value2
This is the value of a parameter used to define the general reference line layout.
The item that Value2 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Curve length, including length of spirals on either end.
[L]
CurveType = 3: Rate at which the slope of a parabolic curve is
changing in percent. [1/L]
CurveType = 4: Number of discretization points.
CurveType = 5: Number of discretization points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value3
This is the value of a parameter used to define the general reference line layout.
The item that Value3 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Not Used
CurveType = 3: Not Used
CurveType = 4: Not Used
CurveType = 5: Curve order.
CurveType = 6: Not Used
CurveType = 7: Not Used
x
This is an array of the station coordinate of each point in the coordinate system
specified for the general reference line. [L]
y
This is an array of the Z coordinate of each point in the coordinate system
specified for the general reference line. [L]
Remarks
This function assigns the general reference line elevation layout parameters.
A minimum of three points is required for the Circular, Highway, and Parabolic
curves. The Bezier curve requires a minimum of four points. The BSpline curve
requires a minimum of two points.
The Bezier and BSpline curve types require additional control points as specified
by Value2. These control points are considered to be defined directly after the
point specifying the Bezier or BSpline curve. Any Value1, Value2, or Value3
parameters defined on these control points are ignored.
The function returns zero if the general reference line parameters are
successfully defined; otherwise it returns a nonzero value.
VBA Example
Sub SetElevPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim CurveType() As Long
Dim Value1() As Double
Dim Value2() As Double
Dim Value3() As Double
Dim s() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new general reference line


Name = "GRef1"
ret = SapModel.GenRefLine.SetLine(Name, 120, 5)

'set general reference line elev points data


NumberPoints = 3
ReDim CurveType(NumberPoints 1)
ReDim s(NumberPoints 1)
Redim z(NumberPoints 1)
CurveType(0) = 0
CurveType(1) = 1
CurveType(2) = 0
s(0) = 0: z(0) = 0
s(1) = 100: z(1) = 100
s(2) = 200: z(2) = 100
Value1(0) = 0: Value1(1) = 100: Value1(2) = 0
Value2(0) = 0: Value2(1) = 0: Value2(2) = 0
Value3(0) = 0: Value3(1) = 0: Value3(2) = 0
ret = SapModel.GenRefLine.SetLineElevPoints(Name,
NumberPoints, CurveType, Value1, Value2, Value3, s, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
GetLineElevPoints
SetLine
SetLinePlanPoints
SetLinePlanPoints
Syntax
SapObject.SapModel.GenRefLine.SetLinePlanPoints
VB6 Procedure
Function SetLinePlanPoints(ByVal Name As String, ByVal NumberPoints As
Long, ByRef CurveType() As Long, ByRef Value1() As Double, ByRef Value2()
As Double, ByRef Value3() As Double, ByRef x() As Double, ByRef y() As
Double) As Long
Parameters
Name
The name of a defined general reference line.
NumberPoints
The number of points used to define the general reference line plan layout.
CurveType
This is an array of values indicating the general reference line plan layout curve
type for each point.
0 = None
1 = Circular Curve
2 = Highway Curve
3 = Parabolic Curve
4 = Bezier Curve
5 = BSpline Curve
6 = Bezier Curve Child Point
7 = BSpline Curve Child Point
Value1
This is the value of a parameter used to define the general reference line layout.
The item that Value1 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Curve Radius [L]
CurveType = 2: Curve Radius [L]
CurveType = 3: Angle measured from the X-axis of the coordinate
system in which the general reference line is defined, to the axis of
symmetry of the parabolic curve. [deg]
CurveType = 4: Number of control points. This is currently hard-wired
internally to 4.
CurveType = 5: Number of control points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value2
This is the value of a parameter used to define the general reference line layout.
The item that Value2 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Curve length, including length of spirals on either end.
[L]
CurveType = 3: Rate at which the slope of a parabolic curve is
changing in percent. [1/L]
CurveType = 4: Number of discretization points.
CurveType = 5: Number of discretization points.
CurveType = 6: Not Used
CurveType = 7: Not Used
Value3
This is the value of a parameter used to define the general reference line layout.
The item that Value3 represents depends on the CurveType item.
CurveType = 0: Not Used
CurveType = 1: Not Used
CurveType = 2: Not Used
CurveType = 3: Not Used
CurveType = 4: Not Used
CurveType = 5: Curve order.
CurveType = 6: Not Used
CurveType = 7: Not Used
x
This is an array of the X coordinate of each point in the coordinate system
specified for the general reference line. [L]
y
This is an array of the Y coordinate of each point in the coordinate system
specified for the general reference line. [L]
Remarks
This function assigns the general reference line plan layout parameters.
A minimum of three points is required for the Circular, Highway, and Parabolic
curves. The Bezier curve requires a minimum of four points. The BSpline curve
requires a minimum of two points.
The Bezier and BSpline curve types require additional control points as specified
by Value2. These control points are considered to be defined directly after the
point specifying the Bezier or BSpline curve. Any Value1, Value2, or Value3
parameters defined on these control points are ignored.
The function returns zero if the general reference line parameters are
successfully defined; otherwise it returns a nonzero value.
VBA Example
Sub SetPlanPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim CurveType() As Long
Dim Value1() As Double
Dim Value2() As Double
Dim Value3() As Double
Dim x() As Double
Dim y() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new general reference line


Name = "GRef1"
ret = SapModel.GenRefLine.SetLine(Name, 120, 5)

'set general reference line plan points data


NumberPoints = 3
ReDim CurveType(NumberPoints 1)
ReDim x(NumberPoints 1)
Redim y(NumberPoints 1)
CurveType(0) = 0
CurveType(1) = 1
CurveType(2) = 0
x(0) = 0: y(0) = 0
x(1) = 100: y(1) = 100
x(2) = 200: y(2) = 100
Value1(0) = 0: Value1(1) = 100: Value1(2) = 0
Value2(0) = 0: Value2(1) = 0: Value2(2) = 0
Value3(0) = 0: Value3(1) = 0: Value3(2) = 0
ret = SapModel.GenRefLine.SetLinePlanPoints(Name,
NumberPoints, CurveType, Value1, Value2, Value3, x, y)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.0.
See Also
GetLinePlanPoints
SetLine
SetLineElevPoints
Add
Syntax
SapObject.SapModel.GDispl.Add
VB6 Procedure
Function Add(ByVal Name As String, ByVal MyType As Long) As Long
Parameters
Name
The name of a new generalized displacement.
MyType
This is 1 or 2 indicating the generalized displacement type.
1 = Translational
2 = Rotational
Remarks
This function adds a new generalized displacement with the specified name and
type.
The function returns zero if the generalized displacement is successfully added,
otherwise it returns a nonzero value.
The new generalized displacement must have a different name from all other
generalized displacements. If the name is not unique, an error will be returned.
VBA Example
Sub AddNewGDispl()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPoint
ChangeName
Syntax
SapObject.SapModel.GDispl.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined generalized displacement.
NewName
The new name for the generalized displacement.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
The new generalized displacement name must be different from all other
generalized displacement names. If the name is not unique, an error will be
returned.
VBA Example
Sub ChangeGDisplName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'change generalized displacement name


ret = SapModel.GDispl.ChangeName("GD1", "MyGD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
CountPoint
Syntax
SapObject.SapModel.GDispl.CountPoint
VB6 Procedure
Function CountPoint(ByVal Name As String, ByRef Count As Long) As Long
Parameters
Name
The name of an existing generalized displacement.
Count
The number of point objects included in the specified generalized displacement.
Remarks
This function retrieves the total number of point objects included in a specified
generalized displacement.
The function returns zero if the count is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub CountGDisplPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SF() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add points to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)
ret = SapModel.GDispl.SetPoint("GD1", "7", SF)

'get number of points in generalized displacement


ret = SapModel.GDispl.CountPoint("GD1", Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoint
SetPoint
Delete
Syntax
SapObject.SapModel.GDispl.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing generalized displacement.
Remarks
This function deletes the specified generalized displacement.
The function returns zero if the generalized displacement is successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeleteGDispl()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'delete generalized displacement


ret = SapModel.GDispl.Delete("GD1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Add
DeletePoint
Syntax
SapObject.SapModel.GDispl.DeletePoint
VB6 Procedure
Function DeletePoint(ByVal Name As String, ByVal PointName As String) As
Long
Parameters
Name
The name of an existing generalized displacement.
PointName
The name of a point object included in the generalized displacement that is to be
deleted.
Remarks
This function deletes one point object from a generalized displacement
definition.
The function returns zero if the point is successfully deleted from the generalized
displacement definition, otherwise it returns a nonzero value.
VBA Example
Sub DeleteGDisplPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add points to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)
ret = SapModel.GDispl.SetPoint("GD1", "7", SF)

'delete point from generalized displacement


ret = SapModel.GDispl.DeletePoint("GD1", "3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoint
SetPoint
GetNameList
Syntax
SapObject.SapModel.GDispl.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of generalized displacement names retrieved by the program.
MyName
This is a one-dimensional array of generalized displacement names. The
MyName array is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined generalized displacements.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetGDisplNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacements


ret = SapModel.GDispl.Add("GD1", 1)
ret = SapModel.GDispl.Add("GD2", 2)

'get generalized displacement names


ret = SapModel.GDispl.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.GDispl.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of generalized displacements defined in
the model.
VBA Example
Sub CountGDispls()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'return number of generalized displacements


Count = SapModel.GDispl.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTypeOAPI
Syntax
SapObject.SapModel.GDispl.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef MyType As Long) As
Long
Parameters
Name
The name of an existing generalized displacement.
MyType
This is 1 or 2, indicating the generalized displacement type.
1 = Translational
2 = Rotational
Remarks
This function retrieves the generalized displacement type.
The function returns zero if the type is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetGDisplType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 2)

'get generalized displacement type


ret = SapModel.GDispl.GetTypeOAPI("GD1", MyType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Change function name to GetTypeOAPI in v17.0.0.
See Also
SetTypeOAPI
SetPoint
Syntax
SapObject.SapModel.GDispl.SetPoint
VB6 Procedure
Function SetPoint(ByVal Name As String, ByVal PointName As String, ByRef
SF() As Double) As Long
Parameters
Name
The name of an existing generalized displacement.
PointName
The name of a point object to be included in the generalized displacement
definition.
SF
This is an array of six unitless scale factors for the point object displacement
degrees of freedom.
SF(0) = U1 scale factor
SF(1) = U2 scale factor
SF(2) = U3 scale factor
SF(3) = R1 scale factor
SF(4) = R2 scale factor
SF(5) = R3 scale factor
Remarks
This function adds a point object and its scale factors to a generalized
displacement definition, or, if the point object already exists in the generalized
displacement definition, it modifies the scale factors.
The function returns zero if the data is successfully added or modified,
otherwise it returns a nonzero value.
VBA Example
Sub SetGDisplPointData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add point to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoint
GetPoint
Syntax
SapObject.SapModel.GDispl.GetPoint
VB6 Procedure
Function GetPoint(ByVal Name As String, ByRef NumberItems As Long, ByRef
PointName() As String, ByRef U1() As Double, ByRef U2() As Double, ByRef
U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef R3() As
Double) As Long
Parameters
Name
The name of an existing generalized displacement.
NumberItems
The number of point objects included in the generalized displacement definition.
PointName
This is an array that includes the name of the point objects included in the
generalized displacement definition.
U1, U2, U3, R1, R2, R3
These are arrays that include the unitless scale factors for each of the
displacement degrees of freedom of the associated point objects that are
included in the generalized displacement definition.
Remarks
This function retrieves the point objects and their scale factors from a
generalized displacement definition.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetGDisplPointData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PointName() As String
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add points to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)
ret = SapModel.GDispl.SetPoint("GD1", "7", SF)

'get point data from generalized displacement


ret = SapModel.GDispl.GetPoint("GD1", NumberItems,
PointName, U1, U2, U3, R1, R2, R3)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPoint
SetTypeOAPI
Syntax
SapObject.SapModel.GDispl.SetTypeOAPI
VB6 Procedure
Function SetTypeOAPI(ByVal Name As String, ByVal MyType As Long) As Long
Parameters
Name
The name of an existing generalized displacement.
MyType
This is 1 or 2, indicating the generalized displacement type.
1 = Translational
2 = Rotational
Remarks
This function sets the generalized displacement type.
The function returns zero if the type is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetGDisplType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 2)

'modify generalized displacement type


ret = SapModel.GDispl.SetTypeOAPI("GD1", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed function name to SetTypeOAPI in v17.0.0.
See Also
GetTypeOAPI
ChangeName
Syntax
SapObject.SapModel.GroupDef.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined group.
NewName
The new name for the group.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
Changing the name of group ALL will fail and return an error.
VBA Example
Sub ChangeGroupName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'change name of group


ret = SapModel.GroupDef.ChangeName("Group1", "MyGroup")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Clear
Syntax
SapObject.SapModel.Group.Clear
VB6 Procedure
Function Clear(ByVal Name As String) As Long
Parameters
Name
The name of an existing group.
Remarks
This function clears (removes) all assignments from the specified group.
The function returns zero if the group assignment is successfully cleared,
otherwise it returns a nonzero value.
VBA Example
Sub ClearGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add frame objects to group


ret = SapModel.FrameObj.SetGroupAssign("8", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("10", "Group1")

'clear group
ret = SapModel.GroupDef.Clear("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.GroupDef.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
The function returns the number of defined groups.
VBA Example
Sub CountGroups()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined groups


ret = SapModel.GroupDef.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.GroupDef.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing group.
Remarks
The function deletes the specified group. It will return an error if an attempt is
made to delete the Group named ALL.
The function returns zero if the group is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeleteGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'delete group
ret = SapModel.GroupDef.Delete("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGroup
GetAssignments
Syntax
SapObject.SapModel.Group.GetAssignments
VB6 Procedure
Function GetAssignments(ByVal Name As String, ByRef NumberItems As Long,
ByRef ObjectType() As Long, ByRef ObjectName() As String) As Long
Parameters
Name
The name of an existing group.
NumberItems
The number of assignments made to the specified group.
ObjectType
This is an array that includes the object type of each item in the group.
1= Point object
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6= Solid object
7= Link object
ObjectName
This is an array that includes the name of each item in the group.
Remarks
This function retrieves the assignments to a specified group.
The function returns zero if the group assignment is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetGroupAssignments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim ObjectType() As Long
Dim ObjectName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "5", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add point objects to group


ret = SapModel.PointObj.SetGroupAssign("3", "Group1")
ret = SapModel.PointObj.SetGroupAssign("6", "Group1")
ret = SapModel.PointObj.SetGroupAssign("9", "Group1")

'add frame objects to group


ret = SapModel.FrameObj.SetGroupAssign("8", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("10", "Group1")
'add cable object to group
ret = SapModel.CableObj.SetGroupAssign(Name, "Group1")

'get group assignments


ret = SapModel.GroupDef.GetAssignments("Group1",
NumberItems, ObjectType, ObjectName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGroup
Syntax
SapObject.SapModel.GroupDef.GetGroup
VB6 Procedure
Function GetGroup(ByVal Name As String, ByRef color As Long, ByRef
SpecifiedForSelection As Boolean,ByRef SpecifiedForSectionCutDefinition As
Boolean, ByRef SpecifiedForSteelDesign As Boolean, ByRef
SpecifiedForConcreteDesign As Boolean, ByRef SpecifiedForAluminumDesign
As Boolean, ByRef SpecifiedForColdFormedDesign As Boolean, ByRef
SpecifiedForStaticNLActiveStage As Boolean, ByRef
SpecifiedForBridgeResponseOutput As Boolean, ByRef
SpecifiedForAutoSeismicOutput As Boolean, ByRef
SpecifiedForAutoWindOutput As Boolean, ByRef SpecifiedForMassAndWeight
As Boolean) As Long
Parameters
Name
The name of an existing group.
color
The display color for the group specified as a Long.
SpecifiedForSelection
This item is True if the group is specified to be used for selection; otherwise it is
False.
SpecifiedForSectionCutDefinition
This item is True if the group is specified to be used for defining section cuts;
otherwise it is False.
SpecifiedForSteelDesign
This item is True if the group is specified to be used for defining steel frame
design groups; otherwise it is False.
SpecifiedForConcreteDesign
This item is True if the group is specified to be used for defining concrete frame
design groups; otherwise it is False.
SpecifiedForAluminumDesign
This item is True if the group is specified to be used for defining aluminum frame
design groups; otherwise it is False.
SpecifiedForColdFormedDesign
This item is True if the group is specified to be used for defining cold formed
frame design groups; otherwise it is False.
SpecifiedForStaticNLActiveStage
This item is True if the group is specified to be used for defining stages for
nonlinear static analysis; otherwise it is False.
SpecifiedForBridgeResponseOutput
This item is True if the group is specified to be used for reporting bridge
response output; otherwise it is False.
SpecifiedForAutoSeismicOutput
This item is True if the group is specified to be used for reporting auto seismic
loads; otherwise it is False.
SpecifiedForAutoWindOutput
This item is True if the group is specified to be used for reporting auto wind
loads; otherwise it is False.
SpecifiedForMassAndWeight
This item is True if the group is specified to be used for reporting group masses
and weight; otherwise it is False.
Remarks
The function returns zero if the group data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetGroupData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Color as long
Dim SpecifiedForSelection as Boolean
Dim SpecifiedForSectionCutDefinition as Boolean
Dim SpecifiedForSteelDesign as Boolean
Dim SpecifiedForConcreteDesign as Boolean
Dim SpecifiedForAluminumDesign as Boolean
Dim SpecifiedForColdFormedDesign as Boolean
Dim SpecifiedForStaticNLActiveStage as Boolean
Dim SpecifiedForBridgeResponseOutput as Boolean
Dim SpecifiedForAutoSeismicOutput as Boolean
Dim SpecifiedForAutoWindOutput as Boolean
Dim SpecifiedForMassAndWeight as Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get group data


ret = SapModel.GroupDef.GetGroup("ALL", Color,
SpecifiedForSelection, SpecifiedForSectionCutDefinition,
SpecifiedForSteelDesign, SpecifiedForConcreteDesign,
SpecifiedForAluminumDesign, SpecifiedForColdFormedDesign,
SpecifiedForStaticNLActiveStage, SpecifiedForBridgeResponseOutput,
SpecifiedForAutoSeismicOutput, SpecifiedForAutoWindOutput,
SpecifiedForMassAndWeight)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGroup
GetNameList
Syntax
SapObject.SapModel.GroupDef.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of group names retrieved by the program.
MyName
This is a one-dimensional array of group names. The MyName array is created
as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined groups.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetGroupNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get group names


ret = SapModel.GroupDef.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGroup
Syntax
SapObject.SapModel.GroupDef.SetGroup
VB6 Procedure
Function SetGroup(ByVal Name As String, Optional ByVal color As Long = -1,
Optional ByVal SpecifiedForSelection As Boolean = True, Optional ByVal
SpecifiedForSectionCutDefinition As Boolean = True, Optional ByVal
SpecifiedForSteelDesign As Boolean = True, Optional ByVal
SpecifiedForConcreteDesign As Boolean = True, Optional ByVal
SpecifiedForAluminumDesign As Boolean = True, Optional ByVal
SpecifiedForColdFormedDesign As Boolean = True, Optional ByVal
SpecifiedForStaticNLActiveStage As Boolean = True, Optional ByVal
SpecifiedForBridgeResponseOutput As Boolean = True, Optional ByVal
SpecifiedForAutoSeismicOutput As Boolean = False, Optional ByVal
SpecifiedForAutoWindOutput As Boolean = False, Optional ByVal
SpecifiedForMassAndWeight As Boolean = True) As Long
Parameters
Name
This is the name of a group. If this is the name of an existing group, that group
is modified, otherwise a new group is added.
color
The display color for the group specified as a Long. If this value is input as 1,
the program automatically selects a display color for the group.
SpecifiedForSelection
This item is True if the group is specified to be used for selection; otherwise it is
False.
SpecifiedForSectionCutDefinition
This item is True if the group is specified to be used for defining section cuts;
otherwise it is False.
SpecifiedForSteelDesign
This item is True if the group is specified to be used for defining steel frame
design groups; otherwise it is False.
SpecifiedForConcreteDesign
This item is True if the group is specified to be used for defining concrete frame
design groups; otherwise it is False.
SpecifiedForAluminumDesign
This item is True if the group is specified to be used for defining aluminum frame
design groups; otherwise it is False.
SpecifiedForColdFormedDesign
This item is True if the group is specified to be used for defining cold formed
frame design groups; otherwise it is False.
SpecifiedForStaticNLActiveStage
This item is True if the group is specified to be used for defining stages for
nonlinear static analysis; otherwise it is False.
SpecifiedForBridgeResponseOutput
This item is True if the group is specified to be used for reporting bridge
response output; otherwise it is False.
SpecifiedForAutoSeismicOutput
This item is True if the group is specified to be used for reporting auto seismic
loads; otherwise it is False.
SpecifiedForAutoWindOutput
This item is True if the group is specified to be used for reporting auto wind
loads; otherwise it is False.
SpecifiedForMassAndWeight
This item is True if the group is specified to be used for reporting group masses
and weight; otherwise it is False.
Remarks
The function returns zero if the group data is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetGroupData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGroup
ChangeName
Syntax
SapObject.SapModel.PatternDef.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined joint pattern.
NewName
The new name for the joint pattern.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangePatternName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name of group


ret = SapModel.PatternDef.ChangeName("Default", "MyPattern")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.PatternDef.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
The function returns the number of defined joint patterns.
VBA Example
Sub CountPatterns()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined joint patterns


ret = SapModel.PatternDef.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.PatternDef.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing joint pattern.
Remarks
The function deletes the specified joint pattern. At least one joint pattern must be
defined. The function will return an error if an attempt is made to delete the last
joint pattern.
The function returns zero if the joint pattern is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeletePattern()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern


ret = SapModel.PatternDef.SetPattern("MyPattern")

'delete joint pattern


ret = SapModel.PatternDef.Delete("MyPattern")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPattern
GetNameList
Syntax
SapObject.SapModel.PatternDef.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of joint pattern names retrieved by the program.
MyName
This is a one-dimensional array of joint pattern names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined joint patterns.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetJointPatternNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get joint pattern names


ret = SapModel.PatternDef.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPattern
Syntax
SapObject.SapModel.PatternDef.SetPattern
VB6 Procedure
Function SetPattern(ByVal Name As String) As Long
Parameters
Name
The name of a new joint pattern.
Remarks
The function defines a new joint pattern. It returns an error if the specified joint
pattern name is already in use.
The function returns zero if the new joint pattern is successfully defined,
otherwise it returns a nonzero value.
VBA Example
Sub AddPattern()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern


ret = SapModel.PatternDef.SetPattern("MyPattern")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ChangeName
Syntax
SapObject.SapModel.LoadCases.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined load case.
NewName
The new name for the load case.
Remarks
This function changes the name of an existing load case.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeLoadCaseName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'change load case name


ret = SapModel.LoadCases.ChangeName("DEAD", "DL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.LoadCases.Count
VB6 Procedure
Function Count(Optional ByVal CaseType As eLoadCaseType) As Long
Parameters
CaseType
This optional value is one of the following items in the eLoadCaseType
enumeration.
CASE_LINEAR_STATIC = 1
CASE_NONLINEAR_STATIC = 2
CASE_MODAL = 3
CASE_RESPONSE_SPECTRUM = 4
CASE_LINEAR_HISTORY = 5 (Modal Time History)
CASE_NONLINEAR_HISTORY = 6 (Modal Time History)
CASE_LINEAR_DYNAMIC = 7 (Direct Integration Time History)
CASE_NONLINEAR_DYNAMIC = 8 (Direct Integration Time History)
CASE_MOVING_LOAD = 9
CASE_BUCKLING = 10
CASE_STEADY_STATE = 11
CASE_POWER_SPECTRAL_DENSITY = 12
CASE_LINEAR_STATIC_MULTISTEP = 13
CASE_HYPERSTATIC = 14
If no value is input for CaseType, a count is returned for all load cases in the
model regardless of type.
Remarks
This function returns the total number of defined load cases in the model. If
desired, counts can be returned for all load cases of a specified type in the
model.
VBA Example
Sub CountLoadCases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of load cases of all types


Count = SapModel.LoadCases.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Added optional CaseType parameter in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added one item to the eLoadCaseType enumeration in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.LoadCases.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing load case.
Remarks
The function deletes the specified load case.
The function returns zero if the load case is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeleteLoadCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete load case


ret = SapModel.LoadCases.Delete("DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNameList
Syntax
SapObject.SapModel.LoadCases.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal CaseType As eLoadCaseType) As Long
Parameters
NumberNames
The number of load case names retrieved by the program.
MyName
This is a one-dimensional array of load case names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the Sap2000 program,
filled with the names, and returned to the API user.
CaseType
This optional value is one of the following items in the eLoadCaseType
enumeration.
CASE_LINEAR_STATIC = 1
CASE_NONLINEAR_STATIC = 2
CASE_MODAL = 3
CASE_RESPONSE_SPECTRUM = 4
CASE_LINEAR_HISTORY = 5 (Modal Time History)
CASE_NONLINEAR_HISTORY = 6 (Modal Time History)
CASE_LINEAR_DYNAMIC = 7 (Direct Integration Time History)
CASE_NONLINEAR_DYNAMIC = 8 (Direct Integration Time History)
CASE_MOVING_LOAD = 9
CASE_BUCKLING = 10
CASE_STEADY_STATE = 11
CASE_POWER_SPECTRAL_DENSITY = 12
CASE_LINEAR_STATIC_MULTISTEP = 13
CASE_HYPERSTATIC = 14
If no value is input for CaseType, names are returned for all load cases in the
model regardless of type.
Remarks
This function retrieves the names of all defined load cases of the specified type.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetLoadCaseNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get load case names


ret = SapModel.LoadCases.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Added optional CaseType parameter in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added one item to the eLoadCaseType enumeration in version 12.00.
See Also
GetTypeOAPI_1
Syntax
SapObject.SapModel.LoadCases.GetTypeOAPI_1
VB6 Procedure
Function GetTypeOAPI_1(ByVal Name As String, ByRef CaseType As
eLoadCaseType, ByRef SubType As Long, ByRef DesignType As
eLoadPatternType, ByRef DesignTypeOption As Long, ByRef Auto As Long) As
Long
Parameters
Name
The name of an existing load case.
CaseType
This is one of the following items in the eLoadCaseType enumeration.
CASE_LINEAR_STATIC = 1
CASE_NONLINEAR_STATIC = 2
CASE_MODAL = 3
CASE_RESPONSE_SPECTRUM = 4
CASE_LINEAR_HISTORY = 5 (Modal Time History)
CASE_NONLINEAR_HISTORY = 6 (Modal Time History)
CASE_LINEAR_DYNAMIC = 7 (Direct Integration Time History)
CASE_NONLINEAR_DYNAMIC = 8 (Direct Integration Time History)
CASE_MOVING_LOAD = 9
CASE_BUCKLING = 10
CASE_STEADY_STATE = 11
CASE_POWER_SPECTRAL_DENSITY = 12
CASE_LINEAR_STATIC_MULTISTEP = 13
CASE_HYPERSTATIC = 14
SubType
This is an integer representing the load case sub type. This item applies only for
certain case types.
For CASE_NONLINEAR_STATIC:
1 = Nonlinear
2 = Nonlinear staged construction
For CASE_MODAL:
1 = Eigen
2 = Ritz
For CASE_LINEAR_HISTORY:
1 = Transient
2 = Periodic
DesignType
This is one of the following items in the eLoadPatternType enumeration.
LTYPE_DEAD = 1
LTYPE_SUPERDEAD = 2
LTYPE_LIVE = 3
LTYPE_REDUCELIVE = 4
LTYPE_QUAKE = 5
LTYPE_WIND= 6
LTYPE_SNOW = 7
LTYPE_OTHER = 8
LTYPE_MOVE = 9
LTYPE_TEMPERATURE = 10
LTYPE_ROOFLIVE = 11
LTYPE_NOTIONAL = 12
LTYPE_PATTERNLIVE = 13
LTYPE_WAVE= 14
LTYPE_BRAKING = 15
LTYPE_CENTRIFUGAL = 16
LTYPE_FRICTION = 17
LTYPE_ICE = 18
LTYPE_WINDONLIVELOAD = 19
LTYPE_HORIZONTALEARTHPRESSURE = 20
LTYPE_VERTICALEARTHPRESSURE = 21
LTYPE_EARTHSURCHARGE = 22
LTYPE_DOWNDRAG = 23
LTYPE_VEHICLECOLLISION = 24
LTYPE_VESSELCOLLISION = 25
LTYPE_TEMPERATUREGRADIENT = 26
LTYPE_SETTLEMENT = 27
LTYPE_SHRINKAGE = 28
LTYPE_CREEP = 29
LTYPE_WATERLOADPRESSURE = 30
LTYPE_LIVELOADSURCHARGE = 31
LTYPE_LOCKEDINFORCES = 32
LTYPE_PEDESTRIANLL = 33
LTYPE_PRESTRESS = 34
LTYPE_HYPERSTATIC = 35
LTYPE_BOUYANCY = 36
LTYPE_STREAMFLOW = 37
LTYPE_IMPACT = 38
LTYPE_CONSTRUCTION = 39
DesignTypeOption
This is one of the following options for the DesignType item.
0 = Program determined
1 = User specified
Auto
This is one of the following values indicating if the load case has been
automatically created.
0 = Not automatically created
1 = Automatically created by the bridge construction scheduler
Remarks
This function retrieves the case type, design type, and auto flag for the specified
load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
This function supercedes .GetType (LoadCases).
VBA Example
Sub GetLoadCaseType_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CaseType As eLoadCaseType
Dim SubType As Long
Dim DesignType As Long
Dim DesignTypeOption As Long
Dim Auto As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get load case type


ret = SapModel.LoadCases.GetTypeOAPI_1("DEAD", CaseType,
SubType, DesignType, DesignTypeOption, Auto)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supercedes GetTypeOAPI {Load Case}.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
SetDesignType
Syntax
SapObject.SapModel.LoadCases.SetDesignType
VB6 Procedure
Function SetDesignType(ByVal Name As String, ByVal DesignTypeOption As
Long, Optional ByVal DesignType As eLoadPatternType = LTYPE_DEAD) As
Long
Parameters
Name
The name of an existing load case.
DesignTypeOption
This is one of the following options for the DesignType item.
0 = Program determined
1 = User specified
DesignType
This item only applies when the DesignTypeOption is 1 (user specified). It is one
of the following items in the eLoadPatternType enumeration.
LTYPE_DEAD = 1
LTYPE_SUPERDEAD = 2
LTYPE_LIVE = 3
LTYPE_REDUCELIVE = 4
LTYPE_QUAKE = 5
LTYPE_WIND= 6
LTYPE_SNOW = 7
LTYPE_OTHER = 8
LTYPE_MOVE = 9
LTYPE_TEMPERATURE = 10
LTYPE_ROOFLIVE = 11
LTYPE_NOTIONAL = 12
LTYPE_PATTERNLIVE = 13
LTYPE_WAVE= 14
LTYPE_BRAKING = 15
LTYPE_CENTRIFUGAL = 16
LTYPE_FRICTION = 17
LTYPE_ICE = 18
LTYPE_WINDONLIVELOAD = 19
LTYPE_HORIZONTALEARTHPRESSURE = 20
LTYPE_VERTICALEARTHPRESSURE = 21
LTYPE_EARTHSURCHARGE = 22
LTYPE_DOWNDRAG = 23
LTYPE_VEHICLECOLLISION = 24
LTYPE_VESSELCOLLISION = 25
LTYPE_TEMPERATUREGRADIENT = 26
LTYPE_SETTLEMENT = 27
LTYPE_SHRINKAGE = 28
LTYPE_CREEP = 29
LTYPE_WATERLOADPRESSURE = 30
LTYPE_LIVELOADSURCHARGE = 31
LTYPE_LOCKEDINFORCES = 32
LTYPE_PEDESTRIANLL = 33
LTYPE_PRESTRESS = 34
LTYPE_HYPERSTATIC = 35
LTYPE_BOUYANCY = 36
LTYPE_STREAMFLOW = 37
LTYPE_IMPACT = 38
LTYPE_CONSTRUCTION = 39
Remarks
This function sets the design type for the specified load case.
The function returns zero if the type is successfully set; otherwise it returns
nonzero.
VBA Example
Sub SetLoadCaseDesignType

'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set load case design type


ret = SapModel.LoadCases.SetDesignType("DEAD", 1,
LTYPE_SUPERDEAD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetType_1
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.Buckling.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing buckling load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else then zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseBucklingInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'get initial condition


ret = SapModel.LoadCases.Buckling.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.Buckling.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef SF() As
Double) As Long
Parameters
Name
The name of an existing buckling load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseBucklingLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.Buckling.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)

'get load data


ret = SapModel.LoadCases.Buckling.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetParameters
Syntax
SapObject.SapModel.LoadCases.Buckling.GetParameters
VB6 Procedure
Function GetParameters(ByVal Name As String, ByRef NumBucklingModes As
Long, ByRef EigenTol As Double) As Long
Parameters
Name
The name of an existing buckling load case.
NumBucklingModes
The number of buckling modes requested.
EigenTol
The relative convergence tolerance for eigenvalues.
Remarks
This function retrieves various parameters for the specified load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseBucklingParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumBucklingModes As Long
Dim EigenTol As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'get parameters
ret = SapModel.LoadCases.Buckling.GetParameters("LCASE1",
NumBucklingModes, EigenTol)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetParameters
SetCase
Syntax
SapObject.SapModel.LoadCases.Buckling.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case then that
case is modified, otherwise, a new case is added.
Remarks
This function initializes a buckling load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseBuckling()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.Buckling.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing buckling load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts using the stiffness that occurs at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseBucklingInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'set initial condition


ret = SapModel.LoadCases.Buckling.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.Buckling.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing buckling load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Acce, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseBucklingLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.Buckling.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetParameters
Syntax
SapObject.SapModel.LoadCases.Buckling.SetParameters
VB6 Procedure
Function SetParameters(ByVal Name As String, ByVal NumBucklingModes As
Long, ByVal EigenTol As Double) As Long
Parameters
Name
The name of an existing buckling load case.
NumBucklingModes
The number of buckling modes requested.
EigenTol
The relative convergence tolerance for eigenvalues.
Remarks
This function sets various parameters for the specified buckling load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseBucklingParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add buckling load case


ret = SapModel.LoadCases.Buckling.SetCase("LCASE1")

'set parameters
ret = SapModel.LoadCases.Buckling.SetParameters("LCASE1", 4,
1E-10)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetParameters
GetDampProportional
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.GetDampProportional
VB6 Procedure
Function GetDampProportional(ByVal Name As String, ByRef DampType As
Long, ByRef Dampa As Double, ByRef Dampb As Double, ByRef Dampf1 As
Double, ByRef Dampf2 As Double, ByRef Dampd1 As Double, ByRef Dampd2
As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case that has
proportional damping.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient.
Dampb
The stiffness proportional damping coefficient.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function retrieves the proportional modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistLinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Dampa As Double
Dim Dampb As Double
Dim Dampf1 As Double
Dim Dampf2 As Double
Dim Dampd1 As Double
Dim Dampd2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.DirHistLinear.SetDampProportional("LCASE1", 2,
0, 0, 0.1, 1, 0.05, 0.06)

'get proportional damping


ret =
SapModel.LoadCases.DirHistLinear.GetDampProportional("LCASE1",
DampType, Dampa, Dampb, Dampf1, Dampf2, Dampd1, Dampd2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing linear direct integration time history load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts using the stiffness that occurs at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseDirHistLinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.DirHistLinear.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double,
ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim TF() As Double
Dim AT() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.DirHistLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys, MyAng)

'get load data


ret = SapModel.LoadCases.DirHistLinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, Func, SF, TF, AT, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetTimeIntegration
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.GetTimeIntegration
VB6 Procedure
Function GetTimeIntegration(ByVal Name As String, ByRef IntegrationType As
Long, ByRef Alpha As Double, ByRef Beta As Double, ByRef Gamma As
Double, ByRef Theta As Double, ByRef m As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
IntegrationType
This is 1, 2, 3, 4 or 5, indicating the time integration type.
1= Newmark
2= Wilson
3= Collocation
4= Hilber-Hughes-Taylor
5= Chung and Hulbert
Alpha
The alpha factor (-1/3 <= Alpha <= 0).
This item applies only when IntegrationType = 4 or 5.
Beta
The beta factor (Beta >= 0).
This item applies only when IntegrationType = 1, 3 or 5. It is returned for
informational purposes when IntegrationType = 4.
Gamma
The gamma factor (Gamma >= 0.5).
This item applies only when IntegrationType = 1, 3 or 5. It is returned for
informational purposes when IntegrationType = 4.
Theta
The theta factor (Theta > 0).
This item applies only when IntegrationType = 2 or 3.
m
The alpha-m factor.
This item only applies when IntegrationType = 5.
Remarks
This function retrieves the time integration data assigned to the specified load
case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistLinearTimeIntegration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim IntegrationType As Long
Dim Alpha As Double
Dim Beta As Double
Dim Gamma As Double
Dim Theta As Double
Dim m As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set time integration parameters


ret =
SapModel.LoadCases.DirHistLinear.SetTimeIntegration("LCASE1", 3,
0, 0.17, 0.52, 0.9)

'get time integration parameters


ret =
SapModel.LoadCases.DirHistLinear.GetTimeIntegration("LCASE1",
IntegrationType, Alpha, Beta, Gamma, Theta, m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTimeIntegration
GetTimeStep
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.GetTimeStep
VB6 Procedure
Function GetTimeStep(ByVal Name As String, ByRef nstep As Long, ByRef DT
As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function retrieves the time step data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistLinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nstep As Long
Dim DT As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'get time step data


ret = SapModel.LoadCases.DirHistLinear.GetTimeStep
("LCASE1", nstep, DT )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTimeStep
SetCase
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise a new case is added.
Remarks
This function initializes a linear direct integration time history load case. If this
function is called for an existing load case, all items for the case are reset to
their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseDirHistLinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetDampProportional
VB6 Procedure
Function SetDampProportional(ByVal Name As String, ByVal DampType As
Long, ByVal Dampa As Double, ByVal Dampb As Double, ByVal Dampf1 As
Double, ByVal Dampf2 As Double, ByVal Dampd1 As Double, ByVal Dampd2 As
Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient. This item applies only when
DampType = 1.
Dampb
The stiffness proportional damping coefficient. This item applies only when
DampType = 1.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is either the period or the frequency (depending on the value of the
DampType item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function sets proportional modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseDirHistLinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.DirHistLinear.SetDampProportional("LCASE1", 2,
0, 0, 0.1, 1, 0.05, 0.06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampProportional
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing linear direct integration time history load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case. the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseDirHistLinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.DirHistLinear.SetInitialCase("LCASE1", "SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double, ByRef
CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.DirHistLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys, MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetTimeIntegration
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetTimeIntegration
VB6 Procedure
Function SetTimeIntegration(ByVal Name As String, ByVal IntegrationType As
Long, ByVal Alpha As Double, ByVal Beta As Double, ByVal Gamma As Double,
ByVal Theta As Double, Optional ByVal m As Double = 0) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
IntegrationType
This is 1, 2, 3, 4 or 5, indicating the time integration type.
1= Newmark
2= Wilson
3= Collocation
4= Hilber-Hughes-Taylor
5= Chung and Hulbert
Alpha
The alpha factor (-1/3 <= Alpha <= 0).
This item applies only when IntegrationType = 4 or 5.
Beta
The beta factor (Beta >= 0).
This item applies only when IntegrationType = 1, 3 or 5.
Gamma
The gamma factor (Gamma >= 0.5).
This item applies only when IntegrationType = 1, 3 or 5.
Theta
The theta factor (Theta > 0).
This item applies only when IntegrationType = 2 or 3.
m
The alpha-m factor.
This item applies only when IntegrationType = 5.
Remarks
This function sets time integration data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistLinearTimeIntegration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set time integration parameters


ret =
SapModel.LoadCases.DirHistLinear.SetTimeIntegration("LCASE1", 3,
0, 0.17, 0.52, 0.9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeIntegration
SetTimeStep
Syntax
SapObject.SapModel.LoadCases.DirHistLinear.SetTimeStep
VB6 Procedure
Function SetTimeStep(ByVal Name As String, ByVal nstep As Long, ByVal DT
As Double) As Long
Parameters
Name
The name of an existing linear direct integration time history load case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function sets the time step data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistLinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear direct history load case


ret = SapModel.LoadCases.DirHistLinear.SetCase("LCASE1")

'set time step data


ret = SapModel.LoadCases.DirHistLinear.SetTimeStep("LCASE1",
120, 0.05)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeStep
GetDampProportional
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetDampProportional
VB6 Procedure
Function GetDampProportional(ByVal Name As String, ByRef DampType As
Long, ByRef Dampa As Double, ByRef Dampb As Double, ByRef Dampf1 As
Double, ByRef Dampf2 As Double, ByRef Dampd1 As Double, ByRef Dampd2
As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case that
has proportional damping.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient.
Dampb
The stiffness proportional damping coefficient.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function retrieves the proportional modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Dampa As Double
Dim Dampb As Double
Dim Dampf1 As Double
Dim Dampf2 As Double
Dim Dampd1 As Double
Dim Dampd2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.DirHistNonlinear.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'get proportional damping


ret =
SapModel.LoadCases.DirHistNonlinear.GetDampProportional("LCASE1",
DampType, Dampa, Dampb, Dampf1, Dampf2, Dampd1, Dampd2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
GetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetGeometricNonlinearity
VB6 Procedure
Function GetGeometricNonlinearity(ByVal Name As String, ByRef
NLGeomType As Long) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function retrieves the geometric nonlinearity option for the specified load
case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NLGeomType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'get geometric nonlinearity option


ret =
SapModel.LoadCases.DirHistNonlinear.GetGeometricNonlinearity("LCASE1
NLGeomType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetGeometricNonlinearity
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts from the state at the end of a nonlinear static or nonlinear direct
integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else then zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.DirHistNonlinear.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double,
ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim TF() As Double
Dim AT() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.DirHistNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys,
MyAng)

'get load data


ret = SapModel.LoadCases.DirHistNonlinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, Func, SF, TF, AT, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetMassSource
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetMassSource
VB6 Procedure
Function GetMassSource(ByVal Name As String, ByRef Source As String) As
Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Source as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'get a mass source from the static nonlinear load case


ret =
SapModel.LoadCases.DirHistNonlinear.GetMassSource("LCASE1",
"Source")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
SetMassSource
GetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetSolControlParameters
VB6 Procedure
Function GetSolControlParameters(ByVal Name As String, ByRef DTMax As
Double, ByRef DTMin As Double, ByRef MaxIterCS As Long, ByRef MaxIterNR
As Long, ByRef TolConvD As Double, ByRef UseEventStepping As Boolean,
ByRef TolEventD As Double, ByRef MaxLineSearchPerIter As Long, ByRef
TolLineSearch As Double, ByRef LineSearchStepFact As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
DTMax
The maximum substep size.
DTMin
The minimum substep size.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function retrieves the solution control parameters for the specified load
case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DTMax As Double
Dim DTMin As Double
Dim MaxIterCS As Long
Dim MaxIterNR As Long
Dim TolConvD As Double
Dim UseEventStepping As Boolean
Dim TolEventD As Double
Dim MaxLineSearchPerIter As Long
Dim TolLineSearch As Double
Dim LineSearchStepFact As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'get solution control parameters


ret =
SapModel.LoadCases.DirHistNonlinear.GetSolControlParameters("LCASE1"
DTMax, DTMin, MaxIterCS, MaxIterNR, TolConvD, UseEventStepping,
TolEventD, MaxLineSearchPerIter, TolLineSearch,
LineSearchStepFact)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetSolControlParameters
GetTimeIntegration
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetTimeIntegration
VB6 Procedure
Function GetTimeIntegration(ByVal Name As String, ByRef IntegrationType As
Long, ByRef Alpha As Double, ByRef Beta As Double, ByRef Gamma As
Double, ByRef Theta As Double, ByRef m As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
IntegrationType
This is 1, 2, 3, 4 or 5; indicating the time integration type.
1= Newmark
2= Wilson
3= Collocation
4= Hilber-Hughes-Taylor
5= Chung and Hulbert
Alpha
The alpha factor (-1/3 <= Alpha <= 0).
This item applies only when IntegrationType = 4 or 5.
Beta
The beta factor (Beta >= 0).
This item applies only when IntegrationType = 1, 3 or 5. It is returned for
informational purposes when IntegrationType = 4.
Gamma
The gamma factor (Gamma >= 0.5).
This item applies only when IntegrationType = 1, 3 or 5. It is returned for
informational purposes when IntegrationType = 4.
Theta
The theta factor (Theta > 0).
This item applies only when IntegrationType = 2 or 3.
m
The alpha-m factor.
This item applies only when IntegrationType = 5.
Remarks
This function retrieves the time integration data assigned to the specified load
case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearTimeIntegration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim IntegrationType As Long
Dim Alpha As Double
Dim Beta As Double
Dim Gamma As Double
Dim Theta As Double
Dim m As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set time integration parameters


ret =
SapModel.LoadCases.DirHistNonlinear.SetTimeIntegration("LCASE1",
3, 0, 0.17, 0.52, 0.9)

'get time integration parameters


ret =
SapModel.LoadCases.DirHistNonlinear.GetTimeIntegration("LCASE1",
IntegrationType, Alpha, Beta, Gamma, Theta, m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTimeIntegration
GetTimeStep
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.GetTimeStep
VB6 Procedure
Function GetTimeStep(ByVal Name As String, ByRef nstep As Long, ByRef DT
As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function retrieves the time step data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseDirHistNonlinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nstep As Long
Dim DT As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'get time step data


ret = SapModel.LoadCases.DirHistNonlinear.GetTimeStep
("LCASE1", nstep, DT )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTimeStep
SetCase
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a nonlinear direct integration time history load case. If
this function is called for an existing load case, all items for the case are reset to
their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseDirHistNonlinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetDampProportional
VB6 Procedure
Function SetDampProportional(ByVal Name As String, ByVal DampType As
Long, ByVal Dampa As Double, ByVal Dampb As Double, ByVal Dampf1 As
Double, ByVal Dampf2 As Double, ByVal Dampd1 As Double, ByVal Dampd2 As
Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient. This item applies only when
DampType = 1.
Dampb
The stiffness proportional damping coefficient. This item applies only when
DampType = 1.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function sets proportional modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.DirHistNonlinear.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampProportional
SetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetGeometricNonlinearity
VB6 Procedure
Function SetGeometricNonlinearity(ByVal Name As String, ByVal NLGeomType
As Long) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function sets the geometric nonlinearity option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set geometric nonlinearity option


ret =
SapModel.LoadCases.DirHistNonlinear.SetGeometricNonlinearity("LCASE1
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetGeometricNonlinearity
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts from the state at the end of a nonlinear static or nonlinear direct
integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.DirHistNonlinear.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double, ByRef
CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.DirHistNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys,
MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetMassSource
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetMassSource
VB6 Procedure
Function SetMassSource(ByVal Name As String, ByVal Source As String) As
Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub SetCase DirHistNonlinear MassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'assign a mass source to the static nonlinear load case


ret =
SapModel.LoadCases.DirHistNonlinear.SetMassSource("LCASE1",
"MyMassSource")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
GeGetMassSourcetMassSource
SetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetSolControlParameters
VB6 Procedure
Function SetSolControlParameters(ByVal Name As String, ByVal DTMax As
Double, ByVal DTMin As Double, ByVal MaxIterCS As Long, ByVal MaxIterNR
As Long, ByVal TolConvD As Double, ByVal UseEventStepping As Boolean,
ByVal TolEventD As Double, ByVal MaxLineSearchPerIter As Long, ByVal
TolLineSearch As Double, ByVal LineSearchStepFact As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
DTMax
The maximum substep size.
DTMin
The minimum substep size.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function sets the solution control parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set solution control parameters


ret =
SapModel.LoadCases.DirHistNonlinear.SetSolControlParameters("LCASE1"
0.01, 0.00001, 15, 50, 0.00005, False, 0.02, 10, 0.2, 1.7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSolControlParameters
SetTimeIntegration
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetTimeIntegration
VB6 Procedure
Function SetTimeIntegration(ByVal Name As String, ByVal IntegrationType As
Long, ByVal Alpha As Double, ByVal Beta As Double, ByVal Gamma As Double,
ByVal Theta As Double, Optional ByVal m As Double = 0) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
IntegrationType
This is 1, 2, 3, 4 or 5, indicating the time integration type.
1= Newmark
2= Wilson
3= Collocation
4= Hilber-Hughes-Taylor
5= Chung and Hulbert
Alpha
The alpha factor (-1/3 <= Alpha <= 0).
This item applies only when IntegrationType = 4 or 5.
Beta
The beta factor (Beta >= 0).
This item applies only when IntegrationType = 1, 3 or 5.
Gamma
The gamma factor (Gamma >= 0.5).
This item applies only when IntegrationType = 1, 3 or 5.
Theta
The theta factor (Theta > 0).
This item applies only when IntegrationType = 2 or 3.
m
The alpha-m factor.
This item applies only when IntegrationType = 5.
Remarks
This function sets time integration data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearTimeIntegration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set time integration parameters


ret =
SapModel.LoadCases.DirHistNonlinear.SetTimeIntegration("LCASE1",
3, 0, 0.17, 0.52, 0.9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeIntegration
SetTimeStep
Syntax
SapObject.SapModel.LoadCases.DirHistNonlinear.SetTimeStep
VB6 Procedure
Function SetTimeStep(ByVal Name As String, ByVal nstep As Long, ByVal DT
As Double) As Long
Parameters
Name
The name of an existing nonlinear direct integration time history load case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function sets the time step data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseDirHistNonlinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear direct history load case


ret = SapModel.LoadCases.DirHistNonlinear.SetCase("LCASE1")

'set time step data


ret =
SapModel.LoadCases.DirHistNonlinear.SetTimeStep("LCASE1", 120,
0.05)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeStep
SetCase
Syntax
SapObject.SapModel.LoadCases.ExternalResults.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case for which user-supplied external analysis
results are available for some frame objects. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes an external results load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it returns
a nonzero value.
VBA Example
Sub SetFrameExternalResultStations()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(e2DFrameType.PortalFrame,
3, 124, 3, 200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)

'set frame external result forces at case first step


ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0
SetNumberSteps
Syntax
SapObject.SapModel.LoadCases.ExternalResults.SetNumberSteps
VB6 Procedure
Function SetNumberSteps (ByVal Name As String, ByVal FirstStep As Long, ByVal
LastStep As Long) As Long
Parameters
Name
The name of an existing external results load case.
FirstStep
The number of the first step for which external results are to be subsequently provided
for frame objects in conjunction with this load case. The value may be 0 or 1. A value
of zero is typically used for cases that include the initial conditions, such as time-
history cases.
LastStep
The number of the last step for which external results are to be subsequently provided
for frame objects in conjunction with this load case. The value must be greater than or
equal to FirstStep.
Remarks
In the absence of a call to this function, the default values are FirstStep = 1 and
LastStep = 1.
The number of steps available for this load case will be LastStep FirstStep + 1.
The function returns zero if the number of steps is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameExternalResultStations()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")
ret =
SapModel.LoadCases.ExternalResults.SetNumberSteps("EXTERNAL",
1, 1)

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)

'set frame external result forces at case first step


ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0
GetBaseCase
Syntax
SapObject.SapModel.LoadCases.HyperStatic.GetBaseCase
VB6 Procedure
Function GetBaseCase(ByVal Name As String, ByRef BaseCase As String) As
Long
Parameters
Name
The name of an existing hyperstatic load case.
BaseCase
The name of an existing static linear load case that is the base case for the
specified hyperstatic load case.
Remarks
This function retrieves the base case for the specified hyperstatic load case.
The function returns zero if the base case is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseHyperStaticInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim BaseCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add hyperstatic load case


ret = SapModel.LoadCases.HyperStatic.SetCase("LCASE1")

'set base case


ret = SapModel.LoadCases.HyperStatic.SetBaseCase("LCASE1",
"DEAD")

'get base case


ret = SapModel.LoadCases.HyperStatic.GetBaseCase("LCASE1",
BaseCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetBaseCase
SetBaseCase
Syntax
SapObject.SapModel.LoadCases.HyperStatic.SetBaseCase
VB6 Procedure
Function SetBaseCase(ByVal Name As String, ByVal BaseCase As String) As
Long
Parameters
Name
The name of an existing hyperstatic load case.
BaseCase
The name of an existing static linear load case that is the base case for the
specified hyperstatic load case.
Remarks
This function sets the base case for the specified hyperstatic load case.
The function returns zero if the base case is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseHyperStaticBaseCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add hyperstatic load case


ret = SapModel.LoadCases.HyperStatic.SetCase("LCASE1")

'set base case


ret = SapModel.LoadCases.HyperStatic.SetBaseCase("LCASE1",
"DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetBaseCase
SetCase
Syntax
SapObject.SapModel.LoadCases.HyperStatic.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a hyperstatic load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseHyperStatic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add hyperstatic load case


ret = SapModel.LoadCases.HyperStatic.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModalEigen.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing modal eigen load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseModalEigenInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'get initial condition


ret = SapModel.LoadCases.ModalEigen.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.ModalEigen.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef TargetPar()
As Double, ByRef StaticCorrect() As Boolean) As Long
Parameters
Name
The name of an existing modal eigen load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load, Accel or Link, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
If the LoadType item is Link, this item is not used.
TargetPar
This is an array that includes the target mass participation ratio.
StaticCorrect
This is an array that includes either 0 or 1, indicating if static correction modes
are to be calculated.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModalEigenLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyTargetPar() As Double
Dim MyStaticCorrect() As Boolean
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim TargetPar() As Double
Dim StaticCorrect() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'set load data


ReDim MyLoadType(2)
ReDim MyLoadName(2)
ReDim MyTargetPar(2)
ReDim MyStaticCorrect(2)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyTargetPar(0) = 99
MyStaticCorrect(0) = 1
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MyTargetPar(1) = 99
MyStaticCorrect(1) = 0
MyLoadType(2) = "Link"
MyTargetPar(2) = 99
MyStaticCorrect(2) = 0
ret = SapModel.LoadCases.ModalEigen.SetLoads("LCASE1", 3,
MyLoadType, MyLoadName, MyTargetPar, MyStaticCorrect)

'get load data


ret = SapModel.LoadCases.ModalEigen.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, TargetPar, StaticCorrect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetNumberModes
Syntax
SapObject.SapModel.LoadCases.ModalEigen.GetNumberModes
VB6 Procedure
Function GetNumberModes(ByVal Name As String, ByRef MaxModes As Long,
ByRef MinModes As Long) As Long
Parameters
Name
The name of an existing modal eigen load case.
MaxModes
The maximum number of modes requested.
MinModes
The minimum number of modes requested.
Remarks
This function retrieves the number of modes requested for the specified load
case.
The function returns zero if the number of modes is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseModalEigenNumberModes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MaxModes As Long
Dim MinModes As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'get number of modes requested


ret = SapModel.LoadCases.ModalEigen.GetNumberModes("LCASE1",
MaxModes, MinModes)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNumberModes
GetParameters
Syntax
SapObject.SapModel.LoadCases.ModalEigen.GetParameters
VB6 Procedure
Function GetParameters(ByVal Name As String, ByRef EigenShiftFreq As
Double, ByRef EigenCutOff As Double, ByRef EigenTol As Double, ByRef
AllowAutoFreqShift As Long) As Long
Parameters
Name
The name of an existing modal eigen load case.
EigenShiftFreq
The eigenvalue shift frequency. [cyc/s]
EigenCutOff
The eigencutoff frequency radius. [cyc/s]
EigenTol
The relative convergence tolerance for eigenvalues.
AllowAutoFreqShift
This is either 0 or 1, indicating if automatic frequency shifting is allowed.
0 = Automatic frequency shifting is NOT allowed
1 = Automatic frequency shifting is allowed
Remarks
This function retrieves various parameters for the specified load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseModalEigenParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim EigenShiftFreq As Double
Dim EigenCutOff As Double
Dim EigenTol As Double
Dim AllowAutoFreqShift As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'get parameters
ret = SapModel.LoadCases.ModalEigen.GetParameters("LCASE1",
EigenShiftFreq, EigenCutOff, EigenTol, AllowAutoFreqShift)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetParameters
SetCase
Syntax
SapObject.SapModel.LoadCases.ModalEigen.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a modal eigen load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalEigen()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModalEigen.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing modal eigen load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalEigenInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'set initial condition


ret = SapModel.LoadCases.ModalEigen.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.ModalEigen.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef TargetPar() As
Double, ByRef StaticCorrect() As Boolean) As Long
Parameters
Name
The name of an existing modal eigen load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load, Accel or Link, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
If the LoadType item is Link, this item is not used.
TargetPar
This is an array that includes the target mass participation ratio.
StaticCorrect
This is an array that includes either 0 or 1, indicating if static correction modes
are to be calculated.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModalEigenLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyTargetPar() As Double
Dim MyStaticCorrect() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'set load data


ReDim MyLoadType(2)
ReDim MyLoadName(2)
ReDim MyTargetPar(2)
ReDim MyStaticCorrect(2)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyTargetPar(0) = 99
MyStaticCorrect(0) = 1
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MyTargetPar(1) = 99
MyStaticCorrect(1) = 0
MyLoadType(2) = "Link"
MyTargetPar(2) = 99
MyStaticCorrect(2) = 0
ret = SapModel.LoadCases.ModalEigen.SetLoads("LCASE1", 3,
MyLoadType, MyLoadName, MyTargetPar, MyStaticCorrect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetNumberModes
Syntax
SapObject.SapModel.LoadCases.ModalEigen.SetNumberModes
VB6 Procedure
Function SetNumberModes(ByVal Name As String, ByVal MaxModes As Long,
ByVal MinModes As Long) As Long
Parameters
Name
The name of an existing modal eigen load case.
MaxModes
The maximum number of modes requested.
MinModes
The minimum number of modes requested.
Remarks
This function sets the number of modes requested for the specified load case.
The function returns zero if the number of modes is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalEigenNumberModes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'set number of modes


ret = SapModel.LoadCases.ModalEigen.SetNumberModes("LCASE1",
10, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNumberModes
SetParameters
Syntax
SapObject.SapModel.LoadCases.ModalEigen.SetParameters
VB6 Procedure
Function SetParameters(ByVal Name As String, ByVal EigenShiftFreq As
Double, ByVal EigenCutOff As Double, ByVal EigenTol As Double, ByVal
AllowAutoFreqShift As Long) As Long
Parameters
Name
The name of an existing modal eigen load case.
EigenShiftFreq
The eigenvalue shift frequency. [cyc/s]
EigenCutOff
The eigencutoff frequency radius. [cyc/s]
EigenTol
The relative convergence tolerance for eigenvalues.
AllowAutoFreqShift
This is either 0 or 1, indicating if automatic frequency shifting is allowed.
0 = Automatic frequency shifting is NOT allowed
1 = Automatic frequency shifting is allowed
Remarks
This function sets various parameters for the specified modal eigen load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalEigenParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal eigen load case


ret = SapModel.LoadCases.ModalEigen.SetCase("LCASE1")

'set parameters
ret = SapModel.LoadCases.ModalEigen.SetParameters("LCASE1",
0.05, 0.0001, 1E-10, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetParameters
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModalRitz.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing modal ritz load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts using the stiffness that occurs at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseModalRitzInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'get initial condition


ret = SapModel.LoadCases.ModalRitz.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.ModalRitz.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef
RitzMaxCyc() As Long, ByRef TargetPar() As Double) As Long
Parameters
Name
The name of an existing modal ritz load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load, Accel or Link, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
If the LoadType item is Link, this item is not used.
RitzMaxCyc
This is an array that includes the maximum number of generation cycles to be
performed for the specified ritz starting vector. A value of 0 means there is no
limit on the number of cycles.
TargetPar
This is an array that includes the target dynamic participation ratio.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModalRitzLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyRitzMaxCyc() As Long
Dim MyTargetPar() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim RitzMaxCyc() As Long
Dim TargetPar() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'set load data


ReDim MyLoadType(2)
ReDim MyLoadName(2)
ReDim MyRitzMaxCyc(2)
ReDim MyTargetPar(2)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyRitzMaxCyc(0) = 0
MyTargetPar(0) = 99
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MyRitzMaxCyc(1) = 0
MyTargetPar(1) = 99
MyLoadType(2) = "Link"
MyRitzMaxCyc(2) = 0
MyTargetPar(2) = 99
ret = SapModel.LoadCases.ModalRitz.SetLoads("LCASE1", 3,
MyLoadType, MyLoadName, MyRitzMaxCyc, MyTargetPar)

'get load data


ret = SapModel.LoadCases.ModalRitz.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, RitzMaxCyc, TargetPar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetNumberModes
Syntax
SapObject.SapModel.LoadCases.ModalRitz.GetNumberModes
VB6 Procedure
Function GetNumberModes(ByVal Name As String, ByRef MaxModes As Long,
ByRef MinModes As Long) As Long
Parameters
Name
The name of an existing modal ritz load case.
MaxModes
The maximum number of modes requested.
MinModes
The minimum number of modes requested.
Remarks
This function retrieves the number of modes requested for the specified load
case.
The function returns zero if the number of modes is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseModalRitzNumberModes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MaxModes As Long
Dim MinModes As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'get number of modes requested


ret = SapModel.LoadCases.ModalRitz.GetNumberModes("LCASE1",
MaxModes, MinModes)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNumberModes
SetCase
Syntax
SapObject.SapModel.LoadCases.ModalRitz.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a modal ritz load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalRitz()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModalRitz.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing modal ritz load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalRitzInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'set initial condition


ret = SapModel.LoadCases.ModalRitz.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.ModalRitz.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef RitzMaxCyc() As
Long, ByRef TargetPar() As Double) As Long
Parameters
Name
The name of an existing modal ritz load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load, Accel or Link, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
If the LoadType item is Link, this item is not used.
RitzMaxCyc
This is an array that includes the maximum number of generation cycles to be
performed for the specified ritz starting vector. A value of 0 means there is no
limit on the number of cycles.
TargetPar
This is an array that includes the target dynamic participation ratio.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModalRitzLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyRitzMaxCyc() As Long
Dim MyTargetPar() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'set load data


ReDim MyLoadType(2)
ReDim MyLoadName(2)
ReDim MyRitzMaxCyc(2)
ReDim MyTargetPar(2)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyRitzMaxCyc(0) = 0
MyTargetPar(0) = 99
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MyRitzMaxCyc(1) = 0
MyTargetPar(1) = 99
MyLoadType(2) = "Link"
MyRitzMaxCyc(2) = 0
MyTargetPar(2) = 99
ret = SapModel.LoadCases.ModalRitz.SetLoads("LCASE1", 3,
MyLoadType, MyLoadName, MyRitzMaxCyc, MyTargetPar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetNumberModes
Syntax
SapObject.SapModel.LoadCases.ModalRitz.SetNumberModes
VB6 Procedure
Function SetNumberModes(ByVal Name As String, ByVal MaxModes As Long,
ByVal MinModes As Long) As Long
Parameters
Name
The name of an existing modal ritz load case.
MaxModes
The maximum number of modes requested.
MinModes
The minimum number of modes requested.
Remarks
This function sets the number of modes requested for the specified load case.
The function returns zero if the number of modes is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModalRitzNumberModes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add modal ritz load case


ret = SapModel.LoadCases.ModalRitz.SetCase("LCASE1")

'set number of modes


ret = SapModel.LoadCases.ModalRitz.SetNumberModes("LCASE1",
10, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNumberModes
GetDampConstant
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetDampConstant
VB6 Procedure
Function GetDampConstant(ByVal Name As String, ByRef Damp As Double) As
Long
Parameters
Name
The name of an existing linear modal history analysis case that has constant
damping.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function retrieves the constant modal damping for all modes assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Damp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampConstant("LCASE1", 0.04)

'get constant damping


ret = SapModel.LoadCases.ModHistLinear.GetDampType("LCASE1",
DampType)
If DampType = 4 Then
ret =
SapModel.LoadCases.ModHistLinear.GetDampConstant("LCASE1", Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
GetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef DampType As
Long, ByRef NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case that has interpolated
damping.
DampType
This is 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency, depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function retrieves the interpolated modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double
Dim DampType As Long
Dim NumberItems As Long
Dim Time() As Double
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ModHistLinear.SetDampInterpolated("LCASE1", 5,
3, MyTime, MyDamp)
'get interpolated damping
ret = SapModel.LoadCases.ModHistLinear.GetDampType("LCASE1",
DampType)
If DampType = 5 or DampType = 6 Then
ret =
SapModel.LoadCases.ModHistLinear.GetDampInterpolated("LCASE1",
DampType, NumberItems, Time, Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampInterpolated
GetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function retrieves the modal damping overrides assigned to the specified
load case.
The function returns zero if the overrides are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double
Dim NumberItems As Long
Dim Mode() As Long
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampConstant("LCASE1", 0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ModHistLinear.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)

'get modal damping overrides


ret =
SapModel.LoadCases.ModHistLinear.GetDampOverrides("LCASE1",
NumberItems, Mode, Damp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampOverrides
GetDampProportional
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetDampProportional
VB6 Procedure
Function GetDampProportional(ByVal Name As String, ByRef DampType As
Long, ByRef Dampa As Double, ByRef Dampb As Double, ByRef Dampf1 As
Double, ByRef Dampf2 As Double, ByRef Dampd1 As Double, ByRef Dampd2
As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case that has proportional
damping.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient.
Dampb
The stiffness proportional damping coefficient.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function retrieves the proportional modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Dampa As Double
Dim Dampb As Double
Dim Dampf1 As Double
Dim Dampf2 As Double
Dim Dampd1 As Double
Dim Dampd2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampProportional("LCASE1", 2,
0, 0, 0.1, 1, 0.05, 0.06)

'get proportional damping


ret = SapModel.LoadCases.ModHistLinear.GetDampType("LCASE1",
DampType)
If DampType >= 1 or DampType <= 3 Then
ret =
SapModel.LoadCases.ModHistLinear.GetDampProportional("LCASE1",
DampType, Dampa, Dampb, Dampf1, Dampf2, Dampd1, Dampd2)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
GetDampType
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetDampType
VB6 Procedure
Function GetDampType(ByVal Name As String, ByRef DampType As Long) As
Long
Parameters
Name
The name of an existing linear modal history analysis case.
DampType
This is 1, 2, 3, 4, 5 or 6, indicating the modal damping type for the load case.
1= Mass and stiffness proportional damping by direct specification
2= Mass and stiffness proportional damping by period
3= Mass and stiffness proportional damping by frequency
4= Constant damping for all modes
5= Interpolated damping by period
6= Interpolated damping by frequency
Remarks
This function retrieves the modal damping type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearDampType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'get damping type


ret = SapModel.LoadCases.ModHistLinear.GetDampType("LCASE1",
DampType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
GetDampInterpolated
GetDampProportional
GetDampOverrides
GetLoads
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double,
ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim TF() As Double
Dim AT() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.ModHistLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys, MyAng)

'get load data


ret = SapModel.LoadCases.ModHistLinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, Func, SF, TF, AT, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetModalCase
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetModalCase
VB6 Procedure
Function GetModalCase(ByVal Name As String, ByRef ModalCase As String)
As Long
Parameters
Name
The name of an existing linear modal history analysis case.
ModalCase
This is None or the name of an existing modal analysis case. It specifies the
modal load case on which any mode-type load assignments to the specified load
case are based.
Remarks
This function retrieves the modal case assigned to the specified load case.
The function returns zero if the modal case is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModalCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'get modal case


ret =
SapModel.LoadCases.ModHistLinear.GetModalCase("LCASE1", ModalCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetModalCase
GetMotionType
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetMotionType
VB6 Procedure
Function GetMotionType(ByVal Name As String, ByRef MotionType As Long) As
Long
Parameters
Name
The name of an existing linear modal history analysis case.
MotionType
This is 1 or 2, indicating the time history motion type.
1 = Transient
2 = Periodic
Remarks
This function retrieves the motion type for the specified load case.
The function returns zero if the motion type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearMotionType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MotionType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'get motion type


ret = SapModel.LoadCases.ModHistLinear.GetMotionType
("LCASE1", MotionType )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetMotionType
GetTimeStep
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.GetTimeStep
VB6 Procedure
Function GetTimeStep(ByVal Name As String, ByRef nstep As Long, ByRef DT
As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function retrieves the time step data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistLinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nstep As Long
Dim DT As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'get time step data


ret = SapModel.LoadCases.ModHistLinear.GetTimeStep
("LCASE1", nstep, DT )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTimeStep
SetCase
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise a new case is added.
Remarks
This function initializes a linear modal history analysis case. If this function is
called for an existing load case then all items for the case are reset to their
default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistLinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetDampConstant
VB6 Procedure
Function SetDampConstant(ByVal Name As String, ByVal Damp As Double) As
Long
Parameters
Name
The name of an existing linear modal history analysis case.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function sets constant modal damping for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistLinearDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampConstant("LCASE1", 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
SetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetDampInterpolated
VB6 Procedure
Function SetDampInterpolated(ByVal Name As String, ByVal DampType As
Long, ByVal NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
DampType
This is 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency, depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function sets interpolated modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistLinearDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ModHistLinear.SetDampInterpolated("LCASE1", 5,
3, MyTime, MyDamp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampInterpolated
SetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetDampOverrides
VB6 Procedure
Function SetDampOverrides(ByVal Name As String, ByVal NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function sets the modal damping overrides for the specified load case.
The function returns zero if the overrides are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistLinearDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampConstant("LCASE1", 0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ModHistLinear.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampOverrides
SetDampProportional
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetDampProportional
VB6 Procedure
Function SetDampProportional(ByVal Name As String, ByVal DampType As
Long, ByVal Dampa As Double, ByVal Dampb As Double, ByVal Dampf1 As
Double, ByVal Dampf2 As Double, ByVal Dampd1 As Double, ByVal Dampd2 As
Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient. This item applies only when
DampType = 1.
Dampb
The stiffness proportional damping coefficient. This item applies only when
DampType = 1.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function sets proportional modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistLinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ModHistLinear.SetDampProportional("LCASE1", 2,
0, 0, 0.1, 1, 0.05, 0.06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampProportional
SetLoads
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double, ByRef
CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModHistLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.ModHistLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys, MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetModalCase
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetModalCase
VB6 Procedure
Function SetModalCase(ByVal Name As String, ByVal ModalCase As String) As
Long
Parameters
Name
The name of an existing linear modal history analysis case.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which any mode-type load assignments to the specified load case are based.
Remarks
This function sets the modal case for the specified analysis case.
The function returns zero if the modal case is successfully set; otherwise it
returns a nonzero value.
If the specified modal case is not actually a modal case, the program
automatically replaces it with the first modal case it can find. If no modal load
cases exist, an error is returned.
VBA Example
Sub SetCaseModHistLinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set modal case


ret =
SapModel.LoadCases.ModHistLinear.SetModalCase("LCASE1", "MODAL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetModalCase
SetMotionType
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetMotionType
VB6 Procedure
Function SetMotionType(ByVal Name As String, ByVal MotionType As Long) As
Long
Parameters
Name
The name of an existing linear modal history analysis case.
MotionType
This is 1 or 2, indicating the time history motion type.
1 = Transient
2 = Periodic
Remarks
This function sets the motion type for the specified analysis case.
The function returns zero if the motion type is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistLinearMotionType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set motion type


ret =
SapModel.LoadCases.ModHistLinear.SetMotionType("LCASE1", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetMotionType
SetTimeStep
Syntax
SapObject.SapModel.LoadCases.ModHistLinear.SetTimeStep
VB6 Procedure
Function SetTimeStep(ByVal Name As String, ByVal nstep As Long, ByVal DT
As Double) As Long
Parameters
Name
The name of an existing linear modal history analysis case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function sets the time step data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModHistLinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'set time step data


ret = SapModel.LoadCases.ModHistLinear.SetTimeStep("LCASE1",
120, 0.05)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeStep
GetDampConstant
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetDampConstant
VB6 Procedure
Function GetDampConstant(ByVal Name As String, ByRef Damp As Double) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case that has constant
damping.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function retrieves the constant modal damping for all modes assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Damp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampConstant("LCASE1",
0.04)

'get constant damping


ret =
SapModel.LoadCases.ModHistNonlinear.GetDampType("LCASE1",
DampType)
If DampType = 4 Then
ret =
SapModel.LoadCases.ModHistNonlinear.GetDampConstant("LCASE1",
Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
GetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef DampType As
Long, ByRef NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case that has
interpolated damping.
DampType
This is 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency, depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function retrieves the interpolated modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double
Dim DampType As Long
Dim NumberItems As Long
Dim Time() As Double
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ModHistNonlinear.SetDampInterpolated("LCASE1",
5, 3, MyTime, MyDamp)
'get interpolated damping
ret =
SapModel.LoadCases.ModHistNonlinear.GetDampType("LCASE1",
DampType)
If DampType = 5 or DampType = 6 Then
ret =
SapModel.LoadCases.ModHistNonlinear.GetDampInterpolated("LCASE1",
DampType, NumberItems, Time, Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampInterpolated
GetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function retrieves the modal damping overrides assigned to the specified
load case.
The function returns zero if the overrides are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double
Dim NumberItems As Long
Dim Mode() As Long
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampConstant("LCASE1",
0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ModHistNonlinear.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)

'get modal damping overrides


ret =
SapModel.LoadCases.ModHistNonlinear.GetDampOverrides("LCASE1",
NumberItems, Mode, Damp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampOverrides
GetDampProportional
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetDampProportional
VB6 Procedure
Function GetDampProportional(ByVal Name As String, ByRef DampType As
Long, ByRef Dampa As Double, ByRef Dampb As Double, ByRef Dampf1 As
Double, ByRef Dampf2 As Double, ByRef Dampd1 As Double, ByRef Dampd2
As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case that has
proportional damping.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient.
Dampb
The stiffness proportional damping coefficient.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function retrieves the proportional modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Dampa As Double
Dim Dampb As Double
Dim Dampf1 As Double
Dim Dampf2 As Double
Dim Dampd1 As Double
Dim Dampd2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'get proportional damping


ret =
SapModel.LoadCases.ModHistNonlinear.GetDampType("LCASE1",
DampType)
If DampType >= 1 or DampType <= 3 Then
ret =
SapModel.LoadCases.ModHistNonlinear.GetDampProportional("LCASE1",
DampType, Dampa, Dampb, Dampf1, Dampf2, Dampd1, Dampd2)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
GetDampType
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetDampType
VB6 Procedure
Function GetDampType(ByVal Name As String, ByRef DampType As Long) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
DampType
This is 1, 2, 3, 4, 5 or 6, indicating the modal damping type for the load case.
1= Mass and stiffness proportional damping by direct specification
2= Mass and stiffness proportional damping by period
3= Mass and stiffness proportional damping by frequency
4= Constant damping for all modes
5= Interpolated damping by period
6= Interpolated damping by frequency
Remarks
This function retrieves the modal damping type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearDampType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'get damping type


ret =
SapModel.LoadCases.ModHistNonlinear.GetDampType("LCASE1",
DampType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
GetDampInterpolated
GetDampProportional
GetDampOverrides
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it continues from the end of another nonlinear modal time history load case.
If the specified initial case is not a nonlinear modal time history load case, zero
initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load cases


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")
ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE2")

'set initial condition


ret =
SapModel.LoadCases.ModHistNonlinear.SetInitialCase("LCASE1",
"LCASE2")

'get initial condition


ret =
SapModel.LoadCases.ModHistNonlinear.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double,
ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim TF() As Double
Dim AT() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.ModHistNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys,
MyAng)

'get load data


ret = SapModel.LoadCases.ModHistNonlinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, Func, SF, TF, AT, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetModalCase
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetModalCase
VB6 Procedure
Function GetModalCase(ByVal Name As String, ByRef ModalCase As String)
As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
ModalCase
This is None or the name of an existing modal analysis case. It specifies the
modal load case on which any mode-type load assignments to the specified load
case are based.
Remarks
This function retrieves the modal case assigned to the specified load case.
The function returns zero if the modal case is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModalCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'get modal case


ret =
SapModel.LoadCases.ModHistNonlinear.GetModalCase("LCASE1",
ModalCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetModalCase
GetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetSolControlParameters
VB6 Procedure
Function GetSolControlParameters(ByVal Name As String, ByRef tstat As
Double, ByRef dtmax As Double, ByRef dtmin As Double, ByRef ftol As Double,
ByRef etol As Double, ByRef itmax As Long, ByRef itmin As Long, ByRef Cf As
Double) As Long
Parameters
Name
The name of an existing nonlinear modal time history analysis case.
tstat
The static period.
dtmax
The maximum substep size.
dtmin
The minimum substep size.
ftol
The relative force convergence tolerance.
etol
The relative energy convergence tolerance.
itmax
The maximum iteration limit.
itmin
The minimum iteration limit.
Cf
The convergence factor.
Remarks
This function retrieves the solution control parameters for the specified load
case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim tstat As Double
Dim dtmax As Double
Dim dtmin As Double
Dim ftol As Double
Dim etol As Double
Dim itmax As Long
Dim itmin As Long
Dim Cf As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal time history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'get solution control parameters


ret =
SapModel.LoadCases.ModHistNonlinear.GetSolControlParameters("LCASE1"
tstat, dtmax, dtmin, ftol, etol, itmax, itmin, Cf)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetSolControlParameters
GetTimeStep
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.GetTimeStep
VB6 Procedure
Function GetTimeStep(ByVal Name As String, ByRef nstep As Long, ByRef DT
As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function retrieves the time step data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseModHistNonlinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nstep As Long
Dim DT As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'get time step data


ret = SapModel.LoadCases.ModHistNonlinear.GetTimeStep
("LCASE1", nstep, DT )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTimeStep
SetCase
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a nonlinear modal history analysis case. If this function is
called for an existing load case, all items for the case are reset to their default
values.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistNonlinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetDampConstant
VB6 Procedure
Function SetDampConstant(ByVal Name As String, ByVal Damp As Double) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function sets constant modal damping for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampConstant("LCASE1",
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
SetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetDampInterpolated
VB6 Procedure
Function SetDampInterpolated(ByVal Name As String, ByVal DampType As
Long, ByVal NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
DampType
This is 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency, depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function sets interpolated modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ModHistNonlinear.SetDampInterpolated("LCASE1",
5, 3, MyTime, MyDamp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampInterpolated
SetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetDampOverrides
VB6 Procedure
Function SetDampOverrides(ByVal Name As String, ByVal NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function sets the modal damping overrides for the specified load case.
The function returns zero if the overrides are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampConstant("LCASE1",
0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ModHistNonlinear.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampOverrides
SetDampProportional
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetDampProportional
VB6 Procedure
Function SetDampProportional(ByVal Name As String, ByVal DampType As
Long, ByVal Dampa As Double, ByVal Dampb As Double, ByVal Dampf1 As
Double, ByVal Dampf2 As Double, ByVal Dampd1 As Double, ByVal Dampd2 As
Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient. This item applies only when
DampType = 1.
Dampb
The stiffness proportional damping coefficient. This item applies only when
DampType = 1.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function sets proportional modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ModHistNonlinear.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampProportional
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it continues from the end of another nonlinear modal time history load case.
If the specified initial case is not a nonlinear modal time history load case, zero
initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load cases


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")
ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE2")

'set initial condition


ret =
SapModel.LoadCases.ModHistNonlinear.SetInitialCase("LCASE1",
"LCASE2")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef TF() As Double, ByRef AT() As Double, ByRef
CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes Load or Accel, indicating the type of each load
assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the time history function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
TF
This is an array that includes the time scale factor of each load assigned to the
load case.
AT
This is an array that includes the arrival time of each load assigned to the load
case.
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModHistNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1", 1, 16, 4, 1.25)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyTF(1)
ReDim MyAT(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "RAMPTH"
MySF(0) = 1
MyTF(0) = 1
MyAT(0) = 0
MyCSys(0) = "Global"
MyAng(0) = 0
MyLoadType(1) = "Accel"
MyLoadName(1) = "U2"
MyFunc(1) = "TH-1"
MySF(1) = 2
MyTF(1) = 1.5
MyAT(1) = 10
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.ModHistNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys,
MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetModalCase
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetModalCase
VB6 Procedure
Function SetModalCase(ByVal Name As String, ByVal ModalCase As String) As
Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which any mode-type load assignments to the specified load case are based.
Remarks
This function sets the modal case for the specified analysis case.
The function returns zero if the modal case is successfully set; otherwise it
returns a nonzero value.
If the specified modal case is not actually a modal case, the program
automatically replaces it with the first modal case it can find. If no modal load
cases exist, an error is returned.
VBA Example
Sub SetCaseModHistNonlinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set modal case


ret =
SapModel.LoadCases.ModHistNonlinear.SetModalCase("LCASE1",
"MODAL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetModalCase
SetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetSolControlParameters
VB6 Procedure
Function SetSolControlParameters(ByVal Name As String, ByVal tstat As
Double, ByVal dtmax As Double, ByVal dtmin As Double, ByVal ftol As Double,
ByVal etol As Double, ByVal itmax As Long, ByVal itmin As Long, ByVal Cf As
Double) As Long
Parameters
Name
The name of an existing nonlinear modal time history analysis case.
tstat
The static period.
dtmax
The maximum substep size.
dtmin
The minimum substep size.
ftol
The relative force convergence tolerance.
etol
The relative energy convergence tolerance.
itmax
The maximum iteration limit.
itmin
The minimum iteration limit.
Cf
The convergence factor.
Remarks
This function sets the solution control parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseModHistNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal time history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set solution control parameters


ret =
SapModel.LoadCases.ModHistNonlinear.SetSolControlParameters("LCASE1"
0.1, 0.001, 0.000001, 0.00002, 0.00003, 80, 10, 1.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSolControlParameters
SetTimeStep
Syntax
SapObject.SapModel.LoadCases.ModHistNonlinear.SetTimeStep
VB6 Procedure
Function SetTimeStep(ByVal Name As String, ByVal nstep As Long, ByVal DT
As Double) As Long
Parameters
Name
The name of an existing nonlinear modal history analysis case.
nstep
The number of output time steps.
DT
The output time step size.
Remarks
This function sets the time step data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseModHistNonlinearTimeStep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add nonlinear modal history load case


ret = SapModel.LoadCases.ModHistNonlinear.SetCase("LCASE1")

'set time step data


ret =
SapModel.LoadCases.ModHistNonlinear.SetTimeStep("LCASE1", 120,
0.05)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTimeStep
GetDirectionalFactors
Syntax
SapObject.SapModel.LoadCases.Moving.GetDirectionalFactors
VB6 Procedure
Function GetDirectionalFactors(ByVal Name As String, ByRef Vertical As
Double, ByRef Braking As Double, ByRef Centrifugal As Double) As Integer
Parameters
Name
The name of an existing moving load case.
Vertical
The moving load directional factor for vertical load.
Braking
The moving load directional factor.
Centrifugal
The moving directional factor for centrifugal load.
Remarks
This function retrieves the directional factors for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetDirectionalFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vertical As Double
Dim Braking As Double
Dim Centrifugal As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set directional factors


ret =
SapModel.LoadCases.Moving.SetDirectionalFactors("LCASE1", 1, 0.7,
0.4)

'get directional factors


ret =
SapModel.LoadCases.Moving.GetDirectionalFactors("LCASE1", 1,
Vertical, Braking, Centrifugal)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
SetDirectionalFactors
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.Moving.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing moving load load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseMovingInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'get initial condition


ret = SapModel.LoadCases.Moving.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLanesLoaded
Syntax
SapObject.SapModel.LoadCases.Moving.GetLanesLoaded
VB6 Procedure
Function GetLanesLoaded(ByVal Name As String, ByVal LoadNumber As Long,
ByRef NumberItems As Long, ByRef MyName() As String) As Long
Parameters
Name
The name of an existing moving load case.
LoadNumber
The load assignment number.
NumberItems
The number of lanes loaded for the specified load assignment number.
MyName
This is an array that includes the name of each lane loaded for the specified
load assignment number.
Remarks
This function retrieves the lanes loaded data for a specified load assignment
number in a specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseMovingLanesLoaded()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMyClass() As String
Dim MySF() As Double
Dim MyMin() As Double
Dim MyMax() As Double
Dim MyMyName() As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set load data


ReDim MyMyClass(1)
ReDim MySF(1)
ReDim MyMin(1)
ReDim MyMax(1)
MyMyClass(0) = "VECL1"
MySF(0) = 1.5
MyMin(0) = 1
MyMax(0) = 1
MyMyClass(1) = "VECL1"
MySF(1) = 0.8
MyMin(1) = 0
MyMax(1) = 0
ret = SapModel.LoadCases.Moving.SetLoads("LCASE1", 2,
MyMyClass, MySF, MyMin, MyMax)

'set lanes loaded data for first load assignment


ReDim MyMyName(0)
MyMyName(0) = "LANE1"
ret = SapModel.LoadCases.Moving.SetLanesLoaded("LCASE1", 1,
1, MyMyName)

'get lanes loaded data for first load assignment


ret = SapModel.LoadCases.Moving.GetLanesLoaded("LCASE1", 1,
NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLanesLoaded
GetLoads
Syntax
SapObject.SapModel.LoadCases.Moving.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef MyClass() As String, ByRef SF() As Double, ByRef Min() As Double,
ByRef Max() As Double) As Long
Parameters
Name
The name of an existing moving load case.
NumberLoads
The number of loads assigned to the specified analysis case.
MyClass
This is an array that includes the vehicle class for each load assigned to the
load case.
SF
This is an array that includes the scale factor for each load assigned to the load
case.
Min
This is an array that includes the minimum number of lanes loaded for each load
assigned to the load case.
Max
This is an array that includes the maximum number of lanes loaded for each load
assigned to the load case. This item must be 0, or it must be greater than or
equal to Min. If this item is 0, all available lanes are loaded.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseMovingLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMyClass() As String
Dim MySF() As Double
Dim MyMin() As Double
Dim MyMax() As Double
Dim NumberLoads As Long
Dim MyClass() As String
Dim SF() As Double
Dim Min() As Double
Dim Max() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set load data


ReDim MyMyClass(1)
ReDim MySF(1)
ReDim MyMin(1)
ReDim MyMax(1)
MyMyClass(0) = "VECL1"
MySF(0) = 1.5
MyMin(0) = 1
MyMax(0) = 1
MyMyClass(1) = "VECL1"
MySF(1) = 0.8
MyMin(1) = 0
MyMax(1) = 0
ret = SapModel.LoadCases.Moving.SetLoads("LCASE1", 2,
MyMyClass, MySF, MyMin, MyMax)

'get load data


ret = SapModel.LoadCases.Moving.GetLoads("LCASE1",
NumberLoads, MyClass, SF, Max, Min)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetMultiLaneSF
Syntax
SapObject.SapModel.LoadCases.Moving.GetMultiLaneSF
VB6 Procedure
Function GetMultiLaneSF(ByVal Name As String, ByRef NumberItems As Long,
ByRef SF() As Double) As Long
Parameters
Name
The name of an existing moving load case.
NumberItems
The number of lanes loaded up to which reduction scale factors are provided.
SF
This is an array that includes the reduction scale factor for the number of lanes
loaded from 1 up to NumberItems.
Remarks
This function retrieves the multilane scale factor data for the specified load
case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseMovingMultiLaneSF()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MySF() As Double
Dim NumberItems As Long
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set multilane scale factor data


ReDim MySF(1)
MySF(0) = 1.2
MySF(1) = 0.8
ret = SapModel.LoadCases.Moving.SetMultiLaneSF("LCASE1", 2,
MySF)

'get multilane scale factor data


ret = SapModel.LoadCases.Moving.GetMultiLaneSF("LCASE1",
NumberItems, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetMultiLaneSF
SetCase
Syntax
SapObject.SapModel.LoadCases.Moving.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case then that
case is modified, otherwise, a new case is added.
Remarks
This function initializes a moving load load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseMoving()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDirectionalFactors
Syntax
SapObject.SapModel.LoadCases.Moving.SetDirectionalFactors
VB6 Procedure
Function SetDirectionalFactors(ByVal Name As String, ByVal Vertical As
Double, ByVal Braking As Double, ByVal Centrifugal As Double) As Integer
Parameters
Name
The name of an existing moving load case.
Vertical
The moving load directional factor for vertical load.
Braking
The moving load directional factor.
Centrifugal
The moving directional factor for centrifugal load.
Remarks
This function sets the directional factors for the specified load case. Calling this
function is optional. By default, the directional factors are set to Vertical = 1,
Braking = 0, and Centrifugal = 0 when the moving load case is defied or re-
defined. If this function is called, the three directional factors must be
nonnegative, and at least one must be positive.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub SetDirectionalFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vertical As Double
Dim Braking As Double
Dim Centrifugal As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set directional factors


Vertical = 1.0
Braking - 0.7
Centrifugal = 0.4
ret =
SapModel.LoadCases.Moving.SetDirectionalFactors("LCASE1",
Vertical, Braking, Centrifugal)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
GetDirectionalFactors
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.Moving.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing moving load load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseMovingInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add moving load load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set initial condition


ret = SapModel.LoadCases.Moving.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLanesLoaded
Syntax
SapObject.SapModel.LoadCases.Moving.SetMultiLaneSF
VB6 Procedure
Function SetMultiLaneSF(ByVal Name As String, ByVal LoadNumber As Long,
ByVal NumberItems As Long, ByRef MyName() As String) As Long
Parameters
Name
The name of an existing moving load case.
LoadNumber
The load assignment number.
NumberItems
The number of lanes loaded for the specified load assignment number.
MyName
This is an array that includes the name of each lane loaded for the specified
load assignment number.
Remarks
This function sets the lanes loaded data for a specified load assignment number
in a specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseMovingLanesLoaded()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMyClass() As String
Dim MySF() As Double
Dim MyMin() As Double
Dim MyMax() As Double
Dim MyMyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set load data


ReDim MyMyClass(1)
ReDim MySF(1)
ReDim MyMin(1)
ReDim MyMax(1)
MyMyClass(0) = "VECL1"
MySF(0) = 1.5
MyMin(0) = 1
MyMax(0) = 1
MyMyClass(1) = "VECL1"
MySF(1) = 0.8
MyMin(1) = 0
MyMax(1) = 0
ret = SapModel.LoadCases.Moving.SetLoads("LCASE1", 2,
MyMyClass, MySF, MyMin, MyMax)

'set lanes loaded data for first load assignment


ReDim MyMyName(0)
MyMyName(0) = "LANE1"
ret = SapModel.LoadCases.Moving.SetLanesLoaded("LCASE1", 1,
1, MyMyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLanesLoaded
SetLoads
Syntax
SapObject.SapModel.LoadCases.Moving.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
MyClass() As String, ByRef SF() As Double, ByRef Min() As Double, ByRef
Max() As Double) As Long
Parameters
Name
The name of an existing moving load case.
NumberLoads
The number of loads assigned to the specified analysis case.
MyClass
This is an array that includes the vehicle class for each load assigned to the
load case.
SF
This is an array that includes the scale factor for each load assigned to the load
case.
Min
This is an array that includes the minimum number of lanes loaded for each load
assigned to the load case.
Max
This is an array that includes the maximum number of lanes loaded for each load
assigned to the load case. This item must be 0, or it must be greater than or
equal to Min. If this item is 0, all available lanes are loaded.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseMovingLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMyClass() As String
Dim MySF() As Double
Dim MyMin() As Double
Dim MyMax() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set load data


ReDim MyMyClass(1)
ReDim MySF(1)
ReDim MyMin(1)
ReDim MyMax(1)
MyMyClass(0) = "VECL1"
MySF(0) = 1.5
MyMin(0) = 1
MyMax(0) = 1
MyMyClass(1) = "VECL1"
MySF(1) = 0.8
MyMin(1) = 0
MyMax(1) = 0
ret = SapModel.LoadCases.Moving.SetLoads("LCASE1", 2,
MyMyClass, MySF, MyMin, MyMax)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetMultiLaneSF
Syntax
SapObject.SapModel.LoadCases.Moving.SetMultiLaneSF
VB6 Procedure
Function SetMultiLaneSF(ByVal Name As String, ByVal NumberItems As Long,
ByRef SF() As Double) As Long
Parameters
Name
The name of an existing moving load case.
NumberItems
The number of lanes loaded up to which reduction scale factors are provided
(NumberItems >= 1).
SF
This is an array that includes the reduction scale factor for the number of lanes
loaded from 1 up to NumberItems.
Remarks
This function sets the multilane scale factor data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseMovingMultiLaneSF()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


SapModel.File.OpenFile("C:\SapAPI\Example 1-030.SDB")

'add moving load case


ret = SapModel.LoadCases.Moving.SetCase("LCASE1")

'set multilane scale factor data


ReDim MySF(1)
MySF(0) = 1.2
MySF(1) = 0.8
ret = SapModel.LoadCases.Moving.SetMultiLaneSF("LCASE1", 2,
MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetMultiLaneSF
GetDampConstant
Syntax
SapObject.SapModel.LoadCases.PSD.GetDampConstant
VB6 Procedure
Function GetDampConstant(ByVal Name As String, ByRef HysConMassCoeff
As Double, ByRef HysConStiffCoeff As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case that has constant
damping.
HysConMassCoeff
The mass proportional damping coefficient.
HysConStiffCoeff
The stiffness proportional damping coefficient.
Remarks
This function retrieves the constant hysteretic damping for all frequencies
assigned to the specified load case.
The function returns zero if the damping is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCasePSDDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim HysConMassCoeff As Double
Dim HysConStiffCoeff As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set constant damping


ret = SapModel.LoadCases.PSD.SetDampConstant("LCASE1", 0.8,
0.04)

'get constant damping


ret = SapModel.LoadCases.PSD.GetDampType("LCASE1", DampType)
If DampType = 1 Then
ret = SapModel.LoadCases.PSD.GetDampConstant("LCASE1",
HysConMassCoeff, HysConStiffCoeff)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
GetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.PSD.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef HysIntFreqUnits
As Long, ByRef HysIntNumFreqs As Long, ByRef HysIntFreq() As Double,
ByRef HysIntMassCoeff() As Double, ByRef HysIntStiffCoeff() As Double) As
Long
Parameters
Name
The name of an existing power spectral density analysis case that has
interpolated damping.
HysIntFreqUnits
This is 1 or 2, indicating the units for the frequency.
1 = Hz [cyc/s]
2 = RPM
HysIntNumFreqs
The number of sets of frequency, mass coefficient and stiffness coefficient
data.
HysIntFreq
This is an array of frequencies. The frequency is either in Hz or RPM depending
on the value of HysIntFreqUnits.
HysIntMassCoeff
This is an array that includes the mass proportional damping coefficient.
HysIntStiffCoeff
This is an array that includes the stiffness proportional damping coefficient.
Remarks
This function retrieves the interpolated hysteretic damping by frequency
assigned to the specified load case.
The function returns zero if the damping is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCasePSDDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyHysIntFreq() As Double
Dim MyHysIntMassCoeff() As Double
Dim MyHysIntStiffCoeff() As Double
Dim DampType As Long
Dim HysIntFreqUnits As Long
Dim HysIntNumFreqs As Long
Dim HysIntFreq() As Double
Dim HysIntMassCoeff() As Double
Dim HysIntStiffCoeff() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set interpolated damping


ReDim MyHysIntFreq(2)
ReDim MyHysIntMassCoeff(2)
ReDim MyHysIntStiffCoeff(2)
MyHysIntFreq(0) = 1
MyHysIntMassCoeff(0) = 0.6
MyHysIntStiffCoeff(0) = 0.04
MyHysIntFreq(1) = 10
MyHysIntMassCoeff(1) = 0.7
MyHysIntStiffCoeff(1) = 0.05
MyHysIntFreq(2) = 100
MyHysIntMassCoeff(2) = 0.8
MyHysIntStiffCoeff(2) = 0.08
ret = SapModel.LoadCases.PSD.SetDampInterpolated("LCASE1",
2, 3, MyHysIntFreq, MyHysIntMassCoeff, MyHysIntStiffCoeff)

'get interpolated damping


ret = SapModel.LoadCases.PSD.GetDampType("LCASE1", DampType)
If DampType = 2 Then
ret =
SapModel.LoadCases.PSD.GetDampInterpolated("LCASE1",
HysIntFreqUnits, HysIntNumFreqs, HysIntFreq, HysIntMassCoeff,
HysIntStiffCoeff)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampInterpolated
GetDampType
Syntax
SapObject.SapModel.LoadCases.PSD.GetDampType
VB6 Procedure
Function GetDampType(ByVal Name As String, ByRef DampType As Long) As
Long
Parameters
Name
The name of an existing power spectral density analysis case.
DampType
This is 1 or 2, indicating the hysteretic damping type for the load case.
1 = Constant hysteretic damping for all frequencies
2 = Interpolated hysteretic damping by frequency
Remarks
This function retrieves the hysteretic damping type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCasePSDDampType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'get damping type


ret = SapModel.LoadCases.PSD.GetDampType("LCASE1", DampType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
GetDampInterpolated
GetFreqData
Syntax
SapObject.SapModel.LoadCases.PSD.GetFreqData
VB6 Procedure
Function GetFreqData(ByVal Name As String, ByRef FreqFirst As Double,
ByRef FreqLast As Double, ByRef FreqNumIncs As Long, ByRef
FreqAddModal As Boolean, ByRef FreqAddModalDev As Boolean, ByRef
FreqAddSpecified As Boolean, ByRef FreqNumModalDev As Long, ByRef
FreqModalDev() As Double, ByRef FreqNumSpecified As Long, ByRef
FreqSpecified() As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case.
FreqFirst
The first frequency. [cyc/s]
FreqLast
The last frequency. [cyc/s]
FreqNumIncs
The number of frequency increments.
FreqAddModal
If this item is True, modal frequencies are added.
FreqAddModalDev
If this item is True, signed fractional deviations from modal frequencies are
added.
FreqAddSpecified
If this item is True, specified frequencies are added.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which modal frequencies and modal frequency deviations are based.
FreqNumModalDev
The number of signed fractional deviations from modal frequencies that are
added. This item applies only when FreqAddModalDev = True.
FreqModalDev
This is an array that includes the added signed fractional deviations from modal
frequencies. This item applies only when FreqAddModalDev = True.
FreqNumSpecified
The number of specified frequencies that are added. This item applies only when
FreqAddSpecified = True.
FreqSpecified
This is an array that includes the added specified frequencies. This item applies
only when FreqAddModalDev = True.
Remarks
This function retrieves the frequency data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCasePSDFreqData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyFreqModalDev() As Double
Dim MyFreqSpecified() As Double
Dim FreqFirst As Double
Dim FreqLast As Double
Dim FreqNumIncs As Long
Dim FreqAddModal As Boolean
Dim FreqAddModalDev As Boolean
Dim FreqAddSpecified As Boolean
Dim ModalCase As String
Dim FreqNumModalDev As Long
Dim FreqModalDev() As Double
Dim FreqNumSpecified As Long
Dim FreqSpecified() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set frequency data


ReDim MyFreqModalDev(1)
ReDim MyFreqSpecified(1)
MyFreqModalDev(0) = -0.1
MyFreqModalDev(1) = 0.2
MyFreqSpecified(0) = 1.2
MyFreqSpecified(1) = 11.4
ret = SapModel.LoadCases.PSD.SetFreqData("LCASE1", .6, 20.6,
10, True, True, True, "MODAL", 2, MyFreqModalDev, 2,
MyFreqSpecified)

'get frequency data


ret = SapModel.LoadCases.PSD.GetFreqData("LCASE1",
FreqFirst, FreqLast, FreqNumIncs, FreqAddModal, FreqAddModalDev,
FreqAddSpecified, ModalCase, FreqNumModalDev, FreqModalDev,
FreqNumSpecified, FreqSpecified)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetFreqData
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.PSD.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing power spectral density analysis case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCasePSDInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'get initial condition


ret = SapModel.LoadCases.PSD.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.PSD.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef PhaseAngle() As Double, ByRef CSys()
As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the power spectral density function
associated with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
PhaseAngle
This is an array that includes the phase angle. [deg]
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCasePSDLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyPhaseAngle() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim PhaseAngle() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyPhaseAngle(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "UNIFPSD"
MySF(0) = 1.5
MyPhaseAngle(0) = 90
MyLoadType(1) = "Accel"
MyLoadName(1) = "U3"
MyFunc(1) = "UNIFPSD"
MySF(1) = 1
MyPhaseAngle(1) = 90
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.PSD.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyPhaseAngle, MyCSys, MyAng)

'get load data


ret = SapModel.LoadCases.PSD.GetLoads("LCASE1", NumberLoads,
LoadType, LoadName, Func, SF, PhaseAngle, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
SetCase
Syntax
SapObject.SapModel.LoadCases.PSD.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a power spectral density analysis case. If this function is
called for an existing load case, all items for the case are reset to their default
value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCasePSD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
Syntax
SapObject.SapModel.LoadCases.PSD.SetDampConstant
VB6 Procedure
Function SetDampConstant(ByVal Name As String, ByVal HysConMassCoeff
As Double, ByVal HysConStiffCoeff As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case.
HysConMassCoeff
The mass proportional damping coefficient.
HysConStiffCoeff
The stiffness proportional damping coefficient.
Remarks
This function sets constant hysteretic damping for all frequencies for the
specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCasePSDDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set constant damping


ret = SapModel.LoadCases.PSD.SetDampConstant("LCASE1", 0.8,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
SetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.PSD.SetDampInterpolated
VB6 Procedure
Function SetDampInterpolated(ByVal Name As String, ByVal HysIntFreqUnits As
Long, ByVal HysIntNumFreqs As Long, ByRef HysIntFreq() As Double, ByRef
HysIntMassCoeff() As Double, ByRef HysIntStiffCoeff() As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case.
HysIntFreqUnits
This is either 1 or 2, indicating the units for the frequency.
1 = Hz [cyc/s]
2 = RPM
HysIntNumFreqs
The number of sets of frequency, mass coefficient and stiffness coefficient
data.
HysIntFreq
This is an array of frequencies. The frequency is either in Hz or RPM depending
on the value of HysIntFreqUnits.
HysIntMassCoeff
This is an array that includes the mass proportional damping coefficient.
HysIntStiffCoeff
This is an array that includes the stiffness proportional damping coefficient.
Remarks
This function sets interpolated hysteretic damping by frequency for the specified
load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCasePSDDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyHysIntFreq() As Double
Dim MyHysIntMassCoeff() As Double
Dim MyHysIntStiffCoeff() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set interpolated damping


ReDim MyHysIntFreq(2)
ReDim MyHysIntMassCoeff(2)
ReDim MyHysIntStiffCoeff(2)
MyHysIntFreq(0) = 1
MyHysIntMassCoeff(0) = 0.6
MyHysIntStiffCoeff(0) = 0.04
MyHysIntFreq(1) = 10
MyHysIntMassCoeff(1) = 0.7
MyHysIntStiffCoeff(1) = 0.05
MyHysIntFreq(2) = 100
MyHysIntMassCoeff(2) = 0.8
MyHysIntStiffCoeff(2) = 0.08
ret = SapModel.LoadCases.PSD.SetDampInterpolated("LCASE1",
2, 3, MyHysIntFreq, MyHysIntMassCoeff, MyHysIntStiffCoeff)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampInterpolated
SetFreqData
Syntax
SapObject.SapModel.LoadCases.PSD.SetFreqData
VB6 Procedure
Function SetFreqData(ByVal Name As String, ByVal FreqFirst As Double, ByVal
FreqLast As Double, ByVal FreqNumIncs As Long, ByVal FreqAddModal As
Boolean, ByVal FreqAddModalDev As Boolean, ByVal FreqAddSpecified As
Boolean, ByVal FreqNumModalDev As Long, ByRef FreqModalDev() As
Double, ByVal FreqNumSpecified As Long, ByRef FreqSpecified() As Double)
As Long
Parameters
Name
The name of an existing power spectral density analysis case.
FreqFirst
The first frequency. [cyc/s]
FreqLast
The last frequency. [cyc/s]
FreqNumIncs
The number of frequency increments.
FreqAddModal
If this item is True, modal frequencies are added.
FreqAddModalDev
If this item is True, signed fractional deviations from modal frequencies are
added.
FreqAddSpecified
If this item is True, specified frequencies are added.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which modal frequencies and modal frequency deviations are based.
FreqNumModalDev
The number of signed fractional deviations from modal frequencies that are
added. This item applies only when FreqAddModalDev = True.
FreqModalDev
This is an array that includes the added signed fractional deviations from modal
frequencies. This item applies only when FreqAddModalDev = True.
FreqNumSpecified
The number of specified frequencies that are added. This item applies only when
FreqAddSpecified = True.
FreqSpecified
This is an array that includes the added specified frequencies. This item applies
only when FreqAddModalDev = True.
Remarks
This function sets the frequency data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCasePSDFreqData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyFreqModalDev() As Double
Dim MyFreqSpecified() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set frequency data


ReDim MyFreqModalDev(1)
ReDim MyFreqSpecified(1)
MyFreqModalDev(0) = -0.1
MyFreqModalDev(1) = 0.2
MyFreqSpecified(0) = 1.2
MyFreqSpecified(1) = 11.4
ret = SapModel.LoadCases.PSD.SetFreqData("LCASE1", .6, 20.6,
10, True, True, True, "MODAL", 2, MyFreqModalDev, 2,
MyFreqSpecified)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetFreqData
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.PSD.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing power spectral density analysis case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCasePSDInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set initial condition


ret = SapModel.LoadCases.PSD.SetInitialCase("LCASE1", "SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.PSD.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef PhaseAngle() As Double, ByRef CSys() As
String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing power spectral density analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the power spectral density function
associated with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
PhaseAngle
This is an array that includes the phase angle. [deg]
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies pnly when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCasePSDLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyPhaseAngle() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add power spectral density load case


ret = SapModel.LoadCases.PSD.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyPhaseAngle(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "UNIFPSD"
MySF(0) = 1.5
MyPhaseAngle(0) = 90
MyLoadType(1) = "Accel"
MyLoadName(1) = "U3"
MyFunc(1) = "UNIFPSD"
MySF(1) = 1
MyPhaseAngle(1) = 90
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.PSD.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyPhaseAngle, MyCSys, MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
GetDampConstant
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDampConstant
VB6 Procedure
Function GetDampConstant(ByVal Name As String, ByRef Damp As Double) As
Long
Parameters
Name
The name of an existing response spectrum load case that has constant
damping.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function retrieves the constant modal damping for all modes assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Damp As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampConstant("LCASE1",
0.04)

'get constant damping


ret =
SapModel.LoadCases.ResponseSpectrum.GetDampType("LCASE1",
DampType)
If DampType = 4 Then
ret =
SapModel.LoadCases.ResponseSpectrum.GetDampConstant("LCASE1",
Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
GetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef DampType As
Long, ByRef NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing response spectrum load case that has interpolated
damping.
DampType
This is either 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function retrieves the interpolated modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double
Dim DampType As Long
Dim NumberItems As Long
Dim Time() As Double
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ResponseSpectrum.SetDampInterpolated("LCASE1",
5, 3, MyTime, MyDamp)
'get interpolated damping
ret =
SapModel.LoadCases.ResponseSpectrum.GetDampType("LCASE1",
DampType)
If DampType = 5 or DampType = 6 Then
ret =
SapModel.LoadCases.ResponseSpectrum.GetDampInterpolated("LCASE1",
DampType, NumberItems, Time, Damp)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampInterpolated
GetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function retrieves the modal damping overrides assigned to the specified
load case.
The function returns zero if the overrides are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double
Dim NumberItems As Long
Dim Mode() As Long
Dim Damp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampConstant("LCASE1",
0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ResponseSpectrum.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)

'get modal damping overrides


ret =
SapModel.LoadCases.ResponseSpectrum.GetDampOverrides("LCASE1",
NumberItems, Mode, Damp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampOverrides
GetDampProportional
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDampProportional
VB6 Procedure
Function GetDampProportional(ByVal Name As String, ByRef DampType As
Long, ByRef Dampa As Double, ByRef Dampb As Double, ByRef Dampf1 As
Double, ByRef Dampf2 As Double, ByRef Dampd1 As Double, ByRef Dampd2
As Double) As Long
Parameters
Name
The name of an existing response spectrum load case that has proportional
damping.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient.
Dampb
The stiffness proportional damping coefficient.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function retrieves the proportional modal damping data assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim Dampa As Double
Dim Dampb As Double
Dim Dampf1 As Double
Dim Dampf2 As Double
Dim Dampd1 As Double
Dim Dampd2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'get proportional damping


ret =
SapModel.LoadCases.ResponseSpectrum.GetDampType("LCASE1",
DampType)
If DampType >= 1 or DampType <= 3 Then
ret =
SapModel.LoadCases.ResponseSpectrum.GetDampProportional("LCASE1",
DampType, Dampa, Dampb, Dampf1, Dampf2, Dampd1, Dampd2)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampProportional
GetDampType
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDampType
VB6 Procedure
Function GetDampType(ByVal Name As String, ByRef DampType As Long) As
Long
Parameters
Name
The name of an existing response spectrum load case.
DampType
This is 1, 2, 3, 4, 5 or 6, indicating the modal damping type for the load case.
1= Mass and stiffness proportional damping by direct specification
2= Mass and stiffness proportional damping by period
3= Mass and stiffness proportional damping by frequency
4= Constant damping for all modes
5= Interpolated damping by period
6= Interpolated damping by frequency
Remarks
This function retrieves the modal damping type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDampType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get damping type


ret =
SapModel.LoadCases.ResponseSpectrum.GetDampType("LCASE1",
DampType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
GetDampInterpolated
GetDampProportional
GetDampOverrides
GetDiaphragmEccentricityOverride
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDiaphragmEccentricity
VB6 Procedure
Function GetDiaphragmEccentricityOverride(ByVal Name As String, ByRef Num
As Long, ByRef Diaph() As String, ByRef Eccen() As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
Num
The number of diaphragm eccentricity overrides for the specified load case.
Diaph
This is an array that includes the names of the diaphragms that have eccentricity
overrides.
Eccen
This is an array that includes the eccentricity applied to each diaphragm. [L]
Remarks
This function retrieves the diaphragm eccentricity overrides for a response
spectrum load case.
The function returns zero if the overrides are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetResponseSpectrumDiaphragmEccentricityOverride()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String
Dim Eccen() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")
'assign diaphragm eccentricity override
ret =
SapModel.LoadCases.ResponseSpectrum.SetDiaphragmEccentricityOverride
"Diaph1", 50)

'get diaphragm eccentricity override


ret =
SapModel.LoadCases.ResponseSpectrum.GetDiaphragmEccentricityOverride
Num, Diaph, Eccen)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDiaphragmEccentricityOverride
GetSpecialRigidDiaphragmList
GetDirComb
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetDirComb
VB6 Procedure
Function GetDirComb(ByVal Name As String, ByRef MyType As Long, ByRef
SF As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, or 3, indicating the directional combination option.
1 = SRSS
2 = ABS 3 = CQC3
SF
This item applies only when MyType = 2. It is the ABS scale factor.
Remarks
This function retrieves the directional combination option assigned to the
specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumDirComb()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim SF As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get directional combination option


ret =
SapModel.LoadCases.ResponseSpectrum.GetDirComb("LCASE1", MyType,
SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Removed Modified SRSS (Chinese) directional combination option in version
14.00.
Added CQC3 directional combination option in version 14.20.
See Also
SetDirComb
GetEccentricity
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetEccentricity
VB6 Procedure
Function GetEccentricity(ByVal Name As String, ByRef Eccen As Double) As
Long
Parameters
Name
The name of an existing response spectrum load case.
Eccen
The eccentricity ratio that applies to all diaphragms.
Remarks
This function retrieves the eccentricity ratio that applies to all diaphragms for the
specified load case.
The function returns zero if the ratio is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumEccentricity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Eccen As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get eccentricity ratio


ret =
SapModel.LoadCases.ResponseSpectrum.GetEccentricity("LCASE1",
Eccen)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetEccentricity
GetLoads
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadName() As String, ByRef Func() As String, ByRef SF() As Double,
ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadName
This is an array that includes U1, U2, U3, R1, R2 or R3, indicating the direction
of the load.
Func
This is an array that includes the name of the response spectrum function
associated with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC97 RS function


ret = SapModel.Func.FuncRS.SetUBC97("RS-1", 0.36, 0.54,
0.04)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set load data


ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadName(0) = "U1"
MyFunc(0) = "RS-1"
MySF(0) = 386
MyCSys(0) = "Global"
MyAng(0) = 10
MyLoadName(1) = "U2"
MyFunc(1) = "RS-1"
MySF(1) = 386
ret = SapModel.LoadCases.ResponseSpectrum.SetLoads("LCASE1",
2, MyLoadName, MyFunc, MySF, MyCSys, MyAng)

'get load data


ret = SapModel.LoadCases.ResponseSpectrum.GetLoads("LCASE1",
NumberLoads, LoadName, Func, SF, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetModalCase
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetModalCase
VB6 Procedure
Function GetModalCase(ByVal Name As String, ByRef ModalCase As String)
As Long
Parameters
Name
The name of an existing response spectrum load case.
ModalCase
This is None or the name of an existing modal analysis case. It specifies the
modal load case on which any mode-type load assignments to the specified load
case are based.
Remarks
This function retrieves the modal case assigned to the specified load case.
The function returns zero if the modal case is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModalCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get modal case


ret =
SapModel.LoadCases.ResponseSpectrum.GetModalCase("LCASE1",
ModalCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetModalCase
GetModalComb_1
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetModalComb_1
VB6 Procedure
Function GetModalComb_1(ByVal Name As String, ByRef MyType As Long,
ByRef F1 As Double, ByRef F2 As Double, ByRef PeriodicRigidCombType As
Long, ByRef td As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, 3, 4, 5 or 6, indicating the modal combination option.
1= CQC
2= SRSS
3= Absolute
4= GMC
5= NRC 10 percent
6= Double sum
F1
The GMC f1 factor. This item does not apply when MyType = 3. [cyc/s]
F2
The GMC f2 factor. This item does not apply when MyType = 3. [cyc/s]
PeriodicRigidCombType
This is 1 or 2, indicating the periodic plus rigid modal combination option.
1 = SRSS
2 = Absolute
td
This item applies only when MyType = 6. It is the factor td. [s]
Remarks
This function retrieves the modal combination option assigned to the specified
load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumModalComb_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim F1 As Double
Dim F2 As Double
Dim PeriodicRigidCombType As Long
Dim td As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get modal combination option


ret =
SapModel.LoadCases.ResponseSpectrum.GetModalComb_1("LCASE1",
MyType,F1, F2, PeriodicRigidCombType, td)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
This function supersedes GetModalComb.
See Also
SetModalComb_1
SetCase
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a response spectrum analysis case. If this function is
called for an existing load case, all items for the case are reset to their default
value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseResponseSpectrum()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDampConstant
VB6 Procedure
Function SetDampConstant(ByVal Name As String, ByVal Damp As Double) As
Long
Parameters
Name
The name of an existing response spectrum load case.
Damp
The constant damping for all modes (0 <= Damp < 1).
Remarks
This function sets constant modal damping for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseResponseSpectrumDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampConstant("LCASE1",
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
SetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDampInterpolated
VB6 Procedure
Function SetDampInterpolated(ByVal Name As String, ByVal DampType As
Long, ByVal NumberItems As Long, ByRef Time() As Double, ByRef Damp() As
Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
DampType
This is either 5 or 6, indicating the interpolated modal damping type.
5 = Interpolated damping by period
6 = Interpolated damping by frequency
NumberItems
The number of Time and Damp pairs.
Time
This is an array that includes the period or the frequency depending on the value
of the DampType item. [s] for DampType = 5 and [cyc/s] for DampType = 6
Damp
This is an array that includes the damping for the specified period of frequency
(0 <= Damp < 1).
Remarks
This function sets interpolated modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseResponseSpectrumDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTime() As Double
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set interpolated damping


ReDim MyTime(2)
ReDim MyDamp(2)
MyTime(0) = 0.001
MyDamp(0) = 0.1
MyTime(1) = 0.3
MyDamp(1) = 0.03
MyTime(2) = 1
MyDamp(2) = 0.05
ret =
SapModel.LoadCases.ResponseSpectrum.SetDampInterpolated("LCASE1",
5, 3, MyTime, MyDamp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampInterpolated
SetDampOverrides
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDampOverrides
VB6 Procedure
Function SetDampOverrides(ByVal Name As String, ByVal NumberItems As
Long, ByRef Mode() As Long, ByRef Damp() As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
NumberItems
The number of Mode and Damp pairs.
Mode
This is an array that includes a mode number.
Damp
This is an array that includes the damping for the specified mode (0 <= Damp <
1).
Remarks
This function sets the modal damping overrides for the specified load case.
The function returns zero if the overrides are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseResponseSpectrumDampOverrides()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyDamp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampConstant("LCASE1",
0.04)

'set modal damping overrides


ReDim MyMode(1)
ReDim MyDamp(1)
MyMode(0) = 1
MyDamp(0) = 0.02
MyMode(1) = 2
MyDamp(1) = 0.03
ret =
SapModel.LoadCases.ResponseSpectrum.SetDampOverrides("LCASE1", 2,
MyMode, MyDamp)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampOverrides
SetDampProportional
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDampProportional
VB6 Procedure
Function SetDampProportional(ByVal Name As String, ByVal DampType As
Long, ByVal Dampa As Double, ByVal Dampb As Double, ByVal Dampf1 As
Double, ByVal Dampf2 As Double, ByVal Dampd1 As Double, ByVal Dampd2 As
Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
DampType
This is 1, 2 or 3, indicating the proportional modal damping type.
1 = Mass and stiffness proportional damping by direct specification
2 = Mass and stiffness proportional damping by period
3 = Mass and stiffness proportional damping by frequency
Dampa
The mass proportional damping coefficient. This item applies only when
DampType = 1.
Dampb
The stiffness proportional damping coefficient. This item applies only when
DampType = 1.
Dampf1
This is the period or the frequency (depending on the value of the DampType
item) for point 1. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampf2
This is the period or the frequency (depending on the value of the DampType
item) for point 2. [s] for DampType = 2 and [cyc/s] for DampType = 3
This item applies only when DampType = 2 or 3.
Dampd1
This is the damping at point 1 (0 <= Dampd1 < 1).
This item applies only when DampType = 2 or 3.
Dampd2
This is the damping at point 2 (0 <= Dampd2 < 1).
This item applies only when DampType = 2 or 3.
Remarks
This function sets proportional modal damping data for the specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseResponseSpectrumDampProportional()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set proportional damping


ret =
SapModel.LoadCases.ResponseSpectrum.SetDampProportional("LCASE1",
2, 0, 0, 0.1, 1, 0.05, 0.06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampProportional
SetDiaphragmEccentricityOverride
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDiaphragmEccentricityO
VB6 Procedure
Function SetDiaphragmEccentricityOverride(ByVal Name As String, ByVal Diaph
As String, ByVal Eccen As Double, Optional ByVal Delete As Boolean = False)
As Long
Parameters
Name
The name of an existing response spectrum load case.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
Eccen
The eccentricity applied to the specified diaphragm. [L]
Delete
If this item is True, the eccentricity override for the specified diaphragm is
deleted.
Remarks
This function assigns diaphragm eccentricity overrides for response spectrum
load cases.
The function returns zero if the overrides are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignResponseSpectrumDiaphragmEccentricityOverride()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'assign diaphragm eccentricity override


ret =
SapModel.LoadCases.ResponseSpectrum.SetDiaphragmEccentricityOverride
"Diaph1", 50)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Modified optional argument Delete to be ByVal in version 12.0.1.
See Also
GetDiaphragmEccentricityOverride
GetSpecialRigidDiaphragmList
SetDirComb
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetDirComb
VB6 Procedure
Function SetDirComb(ByVal Name As String, ByVal MyType As Long, ByVal SF
As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, or 3, indicating the directional combination option.
1 = SRSS
2 = ABS
3 = CQC3
SF
This item applies only when MyType = 2. It is the ABS scale factor.
Remarks
This function sets the directional combination option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseResponseSpectrumDirComb()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set directional combination option


ret =
SapModel.LoadCases.ResponseSpectrum.SetDirComb("LCASE1", 2, 1.2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Removed Modified SRSS (Chinese) directional combination option in version
14.00.
Added CQC3 directional combination option in version 14.20.
See Also
GetDirComb
SetEccentricity
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetEccentricity
VB6 Procedure
Function SetEccentricity(ByVal Name As String, ByVal Eccen As Double) As
Long
Parameters
Name
The name of an existing response spectrum load case.
Eccen
The eccentricity ratio that applies to all diaphragms.
Remarks
This function sets the eccentricity ratio that applies to all diaphragms for the
specified load case.
The function returns zero if the ratio is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseResponseSpectrumEccentricity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set eccentricity ratio


ret =
SapModel.LoadCases.ResponseSpectrum.SetEccentricity("LCASE1",
0.05)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetEccentricity
SetLoads
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadName() As String, ByRef Func() As String, ByRef SF() As Double, ByRef
CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadName
This is an array that includes U1, U2, U3, R1, R2 or R3, indicating the direction
of the load.
Func
This is an array that includes the name of the response spectrum function
associated with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseResponseSpectrumLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add UBC97 RS function


ret = SapModel.Func.FuncRS.SetUBC97("RS-1", 0.36, 0.54,
0.04)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set load data


ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadName(0) = "U1"
MyFunc(0) = "RS-1"
MySF(0) = 386
MyCSys(0) = "Global"
MyAng(0) = 10
MyLoadName(1) = "U2"
MyFunc(1) = "RS-1"
MySF(1) = 386
ret = SapModel.LoadCases.ResponseSpectrum.SetLoads("LCASE1",
2, MyLoadName, MyFunc, MySF, MyCSys, MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetModalCase
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetModalCase
VB6 Procedure
Function SetModalCase(ByVal Name As String, ByVal ModalCase As String) As
Long
Parameters
Name
The name of an existing response spectrum load case.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which any mode-type load assignments to the specified load case are based.
Remarks
This function sets the modal case for the specified analysis case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
If the specified modal case is not actually a modal case, the program
automatically replaces it with the first modal case it can find. If no modal load
cases exist, an error is returned.
VBA Example
Sub SetCaseResponseSpectrumModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set modal case


ret =
SapModel.LoadCases.ResponseSpectrum.SetModalCase("LCASE1",
"MODAL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetModalCase
SetModalComb_1
Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetModalComb_1
VB6 Procedure
Function SetModalComb_1(ByVal Name As String, ByVal MyType As Long,
Optional ByVal F1 As Double = 1, Optional ByVal F2 As Double = 0, Optional
ByVal PeriodicRigidCombType As Long = 1, Optional ByVal td As Double = 60)
As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, 3, 4, 5 or 6, indicating the modal combination option.
1= CQC
2= SRSS
3= Absolute
4= GMC
5= NRC 10 percent
6= Double sum
F1
The GMC f1 factor. This item does not apply when MyType = 3. [cyc/s]
F2
The GMC f2 factor. This item does not apply when MyType = 3. [cyc/s]
PeriodicRigidCombType
This is 1 or 2, indicating the periodic plus rigid modal combination option.
1 = SRSS
2 = Absolute
td
This item applies only when MyType = 6. It is the factor td. [s]
Remarks
This function sets the modal combination option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseResponseSpectrumModalComb_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set modal combination option


ret =
SapModel.LoadCases.ResponseSpectrum.SetModalComb_1("LCASE1", 4,
0.5, 1.2, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
This function supersedes SetModalComb.
See Also
GetModalComb_1
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticLinear.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing static linear load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseStaticLinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get initial condition


ret = SapModel.LoadCases.StaticLinear.GetInitialCase("DEAD",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.StaticLinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef SF() As
Double) As Long
Parameters
Name
The name of an existing static linear load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear load case


ret = SapModel.LoadCases.StaticLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.StaticLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)

'get load data


ret = SapModel.LoadCases.StaticLinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
SetCase
Syntax
SapObject.SapModel.LoadCases.StaticLinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a static linear load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticLinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear load case


ret = SapModel.LoadCases.StaticLinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticLinear.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing static linear load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts using the stiffness that occurs at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else then zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticLinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear load case


ret = SapModel.LoadCases.StaticLinear.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.StaticLinear.SetInitialCase("LCASE1", "None")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.StaticLinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static linear load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticLinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear load case


ret = SapModel.LoadCases.StaticLinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.StaticLinear.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticLinearMultistep.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing static linear multistep analysis case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise, it returns a nonzero value.
VBA Example
Sub GetCaseStaticLinearMultistepInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear multistep load case


ret =
SapModel.LoadCases.StaticLinearMultistep.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.StaticLinearMultistep.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.StaticLinearMultistep.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef SF() As
Double) As Long
Parameters
Name
The name of an existing static linear multistep analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetCaseStaticLinearMultistepLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear multistep load case


ret =
SapModel.LoadCases.StaticLinearMultistep.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret =
SapModel.LoadCases.StaticLinearMultistep.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)

'get load data


ret =
SapModel.LoadCases.StaticLinearMultistep.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
SetCase
Syntax
SapObject.SapModel.LoadCases.StaticLinearMultistep.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a static linear multistep analysis case. If this function is
called for an existing load case, all items for the case are reset to their default
value.
The function returns zero if the load case is successfully initialized; otherwise, it
returns a nonzero value.
VBA Example
Sub SetCaseStaticLinearMultistep()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear multistep load case


ret =
SapModel.LoadCases.StaticLinearMultistep.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticLinearMultistep.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing static linear multistep analysis case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticLinearMultistepInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add static linear multistep load case


ret =
SapModel.LoadCases.StaticLinearMultistep.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.StaticLinearMultistep.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.StaticLinearMultistep.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static linear multistep analysis case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticLinearMultistepLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static linear multistep load case


ret =
SapModel.LoadCases.StaticLinearMultistep.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret =
SapModel.LoadCases.StaticLinearMultistep.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MySF)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
GetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetGeometricNonlinearity
VB6 Procedure
Function GetGeometricNonlinearity(ByVal Name As String, ByRef
NLGeomType As Long) As Long
Parameters
Name
The name of an existing static nonlinear load case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function retrieves the geometric nonlinearity option for the specified load
case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NLGeomType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get geometric nonlinearity option


ret =
SapModel.LoadCases.StaticNonlinear.GetGeometricNonlinearity("LCASE1"
NLGeomType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetGeometricNonlinearity
GetHingeUnloading
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetHingeUnloading
VB6 Procedure
Function GetHingeUnloading(ByVal Name As String, ByRef UnloadType As
Long) As Long
Parameters
Name
The name of an existing static nonlinear load case.
UnloadType
This is 1, 2 or 3, indicating the hinge unloading option selected for the load case.
1 = Unload entire structure
2 = Apply local redistribution
3 = Restart using secant stiffness
Remarks
This function retrieves the hinge unloading option for the specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearHingeUnloading()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim UnloadType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get hinge unloading option


ret =
SapModel.LoadCases.StaticNonlinear.GetHingeUnloading("LCASE1",
UnloadType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetHingeUnloading
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts from the state at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.StaticNonlinear.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoadApplication
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetLoadApplication
VB6 Procedure
Function GetLoadApplication(ByVal Name As String, ByRef LoadControl As
Long, ByRef DispType As Long, ByRef Displ As Double, ByRef Monitor As
Long, ByRef DOF As Long, ByRef PointName As String, ByRef GDispl As
String) As Long
Parameters
Name
The name of an existing static nonlinear load case.
LoadControl
This is either 1 or 2, indicating the load application control method.
1 = Full load
2 = Displacement control
DispType
This is either 1 or 2, indicating the control displacement type.
1 = Conjugate displacement
2 = Monitored displacement

This item applies only when displacement control is used, that is, LoadControl =
2.
Displ
This item applies only when displacement control is used, that is, LoadControl =
2. The structure is loaded to a monitored displacement of this magnitude. [L]
when DOF = 1, 2 or 3 and [rad] when DOF = 4, 5 or 6
Monitor
This is either 1 or 2, indicating the monitored displacement.
1 = Displacement at a specified point object
2 = Generalized displacement
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom for which the
displacement at a point object is monitored.
1= U1
2= U2
3= U3
4= R1
5= R2
6= R3

This item applies only when Monitor = 1.


PointName
The name of the point object at which the displacement is monitored. This item
applies only when Monitor = 1.
GDispl
The name of the generalized displacement for which the displacement is
monitored. This item applies only when Monitor = 2.
Remarks
This function retrieves the load application control parameters for the specified
load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearLoadApplication()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SF() As Double
Dim LoadControl As Long
Dim DispType As Long
Dim Displ As Double
Dim Monitor As Long
Dim DOF As Long
Dim PointName As String
Dim GDispl As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add point to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "2", SF)
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set load application parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetLoadApplication("LCASE1", 2,
1, 12, 2, 0, "", "GD1")

'get load application parameters


ret =
SapModel.LoadCases.StaticNonlinear.GetLoadApplication("LCASE1",
LoadControl, DispType, Displ, Monitor, DOF, PointName, GDispl)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadApplication
GetLoads
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef SF() As
Double) As Long
Parameters
Name
The name of an existing static nonlinear load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ, indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.StaticNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MySF)

'get load data


ret = SapModel.LoadCases.StaticNonlinear.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
GetMassSource
Syntax
SapObject.SapModel.LoadCases.Static Nonlinear.GetMassSource
VB6 Procedure
Function GetMassSource(ByVal Name As String, ByRef Source As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Source as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get a mass source from the static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinear.GetMassSource("LCASE1",
"Source")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
SetMassSource
GetModalCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetModalCase
VB6 Procedure
Function GetModalCase(ByVal Name As String, ByRef ModalCase As String)
As Long
Parameters
Name
The name of an existing static nonlinear load case.
ModalCase
This is either None or the name of an existing modal analysis case. It specifies
the modal load case on which any mode-type load assignments to the specified
load case are based.
Remarks
This function retrieves the modal case assigned to the specified load case.
The function returns zero if the modal case is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModalCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get modal case


ret =
SapModel.LoadCases.StaticNonlinear.GetModalCase("LCASE1",
ModalCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetModalCase
GetResultsSaved
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetResultsSaved
VB6 Procedure
Function GetResultsSaved(ByVal Name As String, ByRef SaveMultipleSteps As
Boolean, ByRef MinSavedStates As Long, ByRef MaxSavedStates As Long,
ByRef PositiveOnly As Boolean) As Long
Parameters
Name
The name of an existing static nonlinear load case.
SaveMultipleSteps
This item is True if multiple states are saved for the nonlinear analysis. It is
False only if the final state is saved.
MinSavedStates
This item applies only when SaveMultipleSteps = True. It is the minimum number
of saved steps.
MaxSavedStates
This item applies only when SaveMultipleSteps = True. It is the maximum number
of saved steps.
PositiveOnly
If this item is True, only positive displacement increments are saved. If it is
False, all displacement increments are saved.
Remarks
This function retrieves the results saved parameters for the specified load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearResultsSaved()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SaveMultipleSteps As Boolean
Dim MinSavedStates As Long
Dim MaxSavedStates As Long
Dim PositiveOnly As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set results saved parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetResultsSaved("LCASE1", True,
12, 84, False)

'get results saved parameters


ret =
SapModel.LoadCases.StaticNonlinear.GetResultsSaved("LCASE1",
SaveMultipleSteps, MinSavedStates, MaxSavedStates, PositiveOnly)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetResultsSaved
GetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetSolControlParameters
VB6 Procedure
Function GetSolControlParameters(ByVal Name As String, ByRef
MaxTotalSteps As Long, ByRef MaxFailedSubSteps As Long, ByRef MaxIterCS
As Long, ByRef MaxIterNR As Long, ByRef TolConvD As Double, ByRef
UseEventStepping As Boolean, ByRef TolEventD As Double, ByRef
MaxLineSearchPerIter As Long, ByRef TolLineSearch As Double, ByRef
LineSearchStepFact As Double) As Long
Parameters
Name
The name of an existing static nonlinear load case.
MaxTotalSteps
The maximum total steps per stage.
MaxFailedSubSteps
The maximum null (zero) steps per stage.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function retrieves the solution control parameters for the specified load
case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MaxTotalSteps As Long
Dim MaxFailedSubSteps As Long
Dim MaxIterCS As Long
Dim MaxIterNR As Long
Dim TolConvD As Double
Dim UseEventStepping As Boolean
Dim TolEventD As Double
Dim MaxLineSearchPerIter As Long
Dim TolLineSearch As Double
Dim LineSearchStepFact As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get solution control parameters


ret =
SapModel.LoadCases.StaticNonlinear.GetSolControlParameters("LCASE1",
MaxTotalSteps, MaxFailedSubSteps, MaxIterCS, MaxIterNR, TolConvD,
UseEventStepping, TolEventD, MaxLineSearchPerIter, TolLineSearch,
LineSearchStepFact)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetSolControlParameters
GetTargetForceParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetTargetForceParameters
VB6 Procedure
Function GetTargetForceParameters(ByVal Name As String, ByRef TolConvF
As Double, ByRef MaxIter As Long, ByRef AccelFact As Double, ByRef NoStop
As Boolean) As Long
Parameters
Name
The name of an existing static nonlinear load case.
TolConvF
The relative convergence tolerance for target force iteration.
MaxIter
The maximum iterations per stage for target force iteration.
AccelFact
The acceleration factor.
NoStop
If this item is True, the analysis is continued when there is no convergence in the
target force iteration.
Remarks
This function retrieves the target force iteration parameters for the specified
load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearTargetForceParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim TolConvF As Double
Dim MaxIter As Long
Dim AccelFact As Double
Dim NoStop As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'get target force iteration parameters


ret =
SapModel.LoadCases.StaticNonlinear.GetTargetForceParameters("LCASE1"
TolConvF, MaxIter, AccelFact, NoStop)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTargetForceParameters
SetCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified; otherwise, a new case is added.
Remarks
This function initializes a static nonlinear analysis case. If this function is called
for an existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetGeometricNonlinearity
VB6 Procedure
Function SetGeometricNonlinearity(ByVal Name As String, ByVal NLGeomType
As Long) As Long
Parameters
Name
The name of an existing static nonlinear load case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function sets the geometric nonlinearity option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set geometric nonlinearity option


ret =
SapModel.LoadCases.StaticNonlinear.SetGeometricNonlinearity("LCASE1"
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetGeometricNonlinearity
SetHingeUnloading
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetHingeUnloading
VB6 Procedure
Function SetHingeUnloading(ByVal Name As String, ByVal UnloadType As
Long) As Long
Parameters
Name
The name of an existing static nonlinear load case.
UnloadType
This is 1, 2 or 3, indicating the hinge unloading option selected for the load case.
1 = Unload entire structure
2 = Apply local redistribution
3 = Restart using secant stiffness
Remarks
This function sets the hinge unloading option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearHingeUnloading()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set hinge unloading option


ret =
SapModel.LoadCases.StaticNonlinear.SetHingeUnloading("LCASE1", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetHingeUnloading
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts from the state at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.StaticNonlinear.SetInitialCase("LCASE1",
"None")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoadApplication
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetLoadApplication
VB6 Procedure
Function SetLoadApplication(ByVal Name As String, ByVal LoadControl As
Long, ByVal DispType As Long, ByVal Displ As Double, ByVal Monitor As Long,
ByVal DOF As Long, ByVal PointName As String, ByVal GDispl As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
LoadControl
This is either 1 or 2, indicating the load application control method.
1 = Full load
2 = Displacement control
DispType
This is either 1 or 2 indicating the control displacement type.
1 = Conjugate displacement
2 = Monitored displacement

This item applies only when displacement control is used, that is, LoadControl =
2.
Displ
This item applies only when displacement control is used, that is, LoadControl =
2. The structure is loaded to a monitored displacement of this magnitude. [L]
when DOF = 1, 2 or 3 and [rad] when DOF = 4, 5 or 6
Monitor
This is either 1 or 2, indicating the monitored displacement.
1 = Displacement at a specified point object
2 = Generalized displacement
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom for which the
displacement at a point object is monitored.
1= U1
2= U2
3= U3
4= R1
5= R2
6= R3

This item applies only when Monitor = 1.


PointName
The name of the point object at which the displacement is monitored. This item
applies only when Monitor = 1.
GDispl
The name of the generalized displacement for which the displacement is
monitored. This item applies only when Monitor = 2.
Remarks
This function sets the load application control parameters for the specified load
case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearLoadApplication()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add point to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "2", SF)
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set load application parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetLoadApplication("LCASE1", 2,
1, 12, 2, 0, "", "GD1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadApplication
SetLoads
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is UX, UY, UZ, RX, RY or RZ indicating
the direction of the load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for Accel UX UY and UZ; otherwise unitless
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MySF(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MySF(0) = 0.7
MyLoadType(1) = "Accel"
MyLoadName(1) = "UZ"
MySF(1) = 1.2
ret = SapModel.LoadCases.StaticNonlinear.SetLoads("LCASE1",
2, MyLoadType, MyLoadName, MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
SetMassSource
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetMassSource
VB6 Procedure
Function SetMassSource(ByVal Name As String, ByVal Source As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'assign a mass source to the static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinear.SetMassSource("LCASE1",
"MyMassSource")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
GetMassSource
SetModalCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetModalCase
VB6 Procedure
Function SetModalCase(ByVal Name As String, ByVal ModalCase As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which any mode-type load assignments to the specified load case are based.
Remarks
This function sets the modal case for the specified analysis case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
If the specified modal case is not actually a modal case, the program
automatically replaces it with the first modal case it can find. If no modal load
cases exist, an error is returned.
VBA Example
Sub SetCaseStaticNonlinearModalCase()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set modal case


ret =
SapModel.LoadCases.StaticNonlinear.SetModalCase("LCASE1", "MODAL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetModalCase
SetResultsSaved
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetResultsSaved
VB6 Procedure
Function SetResultsSaved(ByVal Name As String, ByVal SaveMultipleSteps As
Boolean, Optional ByVal MinSavedStates As Long = 10, Optional ByVal
MaxSavedStates As Long = 100, Optional ByVal PositiveOnly As Boolean =
True) As Long
Parameters
Name
The name of an existing static nonlinear load case.
SaveMultipleSteps
This item is True if multiple states are saved for the nonlinear analysis. It is
False only if the final state is saved.
MinSavedStates
This item only applies when SaveMultipleSteps = True. It is the minimum number
of saved steps.
MaxSavedStates
This item only applies when SaveMultipleSteps = True. It is the maximum number
of saved steps.
PositiveOnly
If this item is True, only positive displacement increments are saved. If it is
False, all displacement increments are saved.
Remarks
This function sets the results saved parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearResultsSaved()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set results saved parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetResultsSaved("LCASE1", True,
12, 84, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetResultsSaved
SetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetSolControlParameters
VB6 Procedure
Function SetSolControlParameters(ByVal Name As String, ByVal MaxTotalSteps
As Long, ByVal MaxFailedSubSteps As Long, ByVal MaxIterCS As Long, ByVal
MaxIterNR As Long, ByVal TolConvD As Double, ByVal UseEventStepping As
Boolean, ByVal TolEventD As Double, ByVal MaxLineSearchPerIter As Long,
ByVal TolLineSearch As Double, ByVal LineSearchStepFact As Double) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
MaxTotalSteps
The maximum total steps per stage.
MaxFailedSubSteps
The maximum null (zero) steps per stage.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function sets the solution control parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set solution control parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetSolControlParameters("LCASE1",
240, 40, 15, 50, 0.00005, False, 0.02, 10, 0.2, 1.7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSolControlParameters
SetTargetForceParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetTargetForceParameters
VB6 Procedure
Function SetTargetForceParameters(ByVal Name As String, ByVal TolConvF As
Double, ByVal MaxIter As Long, ByVal AccelFact As Double, ByVal NoStop As
Boolean) As Long
Parameters
Name
The name of an existing static nonlinear load case.
TolConvF
The relative convergence tolerance for target force iteration.
MaxIter
The maximum iterations per stage for target force iteration.
AccelFact
The acceleration factor.
NoStop
If this item is True, the analysis is continued when there is no convergence in the
target force iteration.
Remarks
This function sets the target force iteration parameters for the specified load
case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearTargetForceParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("LCASE1")

'set target force iteration parameters


ret =
SapModel.LoadCases.StaticNonlinear.SetTargetForceParameters("LCASE1"
0.008, 6, 5, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTargetForceParameters
GetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetGeometricNonlinear
VB6 Procedure
Function GetGeometricNonlinearity(ByVal Name As String, ByRef
NLGeomType As Long) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function retrieves the geometric nonlinearity option for the specified load
case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NLGeomType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get geometric nonlinearity option


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetGeometricNonlinearity("L
NLGeomType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetGeometricNonlinearity
GetHingeUnloading
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetHingeUnloading
VB6 Procedure
Function GetHingeUnloading(ByVal Name As String, ByRef UnloadType As
Long) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
UnloadType
This is 1, 2 or 3, indicating the hinge unloading option selected for the load case.
1 = Unload entire structure
2 = Apply local redistribution
3 = Restart using secant stiffness
Remarks
This function retrieves the hinge unloading option for the specified load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedHingeUnloading()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim UnloadType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get hinge unloading option


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetHingeUnloading("LCASE1",
UnloadType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetHingeUnloading
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts from the state at the end of a nonlinear static or nonlinear direct
integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetMassSource
Syntax
SapObject.SapModel.LoadCases.Static NonlinearStaged.GetMassSource
VB6 Procedure
Function GetMassSource(ByVal Name As String, ByRef Source As String) As
Long
Parameters
Name
The name of an existing static nonlinear staged load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Source as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get a mass source from the static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetMassSource("LCASE1",
"Source")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
SetMassSource
GetMaterialNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetMaterialNonlinearity
VB6 Procedure
Function GetMaterialNonlinearity(ByVal Name As String, ByRef
TimeDepMatProp As Boolean) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
TimeDepMatProp
When this is True, any specified time dependent material properties are
considered in the analysis.
Remarks
This function retrieves the material nonlinearity options for the specified load
case.
The function returns zero if the options are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedMaterialNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim TimeDepMatProp As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get material nonlinearity options


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetMaterialNonlinearity("LC
TimeDepMatProp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetMaterialNonlinearity
GetResultsSaved
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetResultsSaved
VB6 Procedure
Function GetResultsSaved(ByVal Name As String, ByRef StagedSaveOption As
Long, ByRef StagedMinSteps As Long, ByRef StagedMinStepsTD As Long) As
Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
StagedSaveOption
This is 0, 1, 2 or 3, indicating the results saved option for the load case.
0= End of final stage
1= End of each stage
2= Start and end of each stage
3= Two or more times in each stage
StagedMinSteps
The minimum number of steps for application of instantaneous load. This item
applies only when StagedSaveOption = 3.
StagedMinStepsTD
The minimum number of steps for analysis of time dependent items. This item
applies only when StagedSaveOption = 3.
Remarks
This function retrieves the results saved parameters for the specified load case.
The function returns zero if the parameters are retrieved successfully; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedResultsSaved()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim StagedSaveOption As Long
Dim StagedMinSteps As Long
Dim StagedMinStepsTD As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set results saved parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetResultsSaved("LCASE1",
3, 4, 10)

'get results saved parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetResultsSaved("LCASE1",
StagedSaveOption , StagedMinSteps, StagedMinStepsTD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetResultsSaved
GetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetSolControlParamete
VB6 Procedure
Function GetSolControlParameters(ByVal Name As String, ByRef
MaxTotalSteps As Long, ByRef MaxFailedSubSteps As Long, ByRef MaxIterCS
As Long, ByRef MaxIterNR As Long, ByRef TolConvD As Double, ByRef
UseEventStepping As Boolean, ByRef TolEventD As Double, ByRef
MaxLineSearchPerIter As Long, ByRef TolLineSearch As Double, ByRef
LineSearchStepFact As Double) As Long
Parameters
Name
The name of an existing static nonlinear load case.
MaxTotalSteps
The maximum total steps per stage.
MaxFailedSubSteps
The maximum null (zero) steps per stage.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function retrieves the solution control parameters for the specified load
case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MaxTotalSteps As Long
Dim MaxFailedSubSteps As Long
Dim MaxIterCS As Long
Dim MaxIterNR As Long
Dim TolConvD As Double
Dim UseEventStepping As Boolean
Dim TolEventD As Double
Dim MaxLineSearchPerIter As Long
Dim TolLineSearch As Double
Dim LineSearchStepFact As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get solution control parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetSolControlParameters("LC
MaxTotalSteps, MaxFailedSubSteps, MaxIterCS, MaxIterNR, TolConvD,
UseEventStepping, TolEventD, MaxLineSearchPerIter, TolLineSearch,
LineSearchStepFact)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetSolControlParameters
GetStageData_2
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetStageData_2
VB6 Procedure
Function GetStageData_2(ByVal Name As String, ByVal Stage As Long, ByRef
NumberOperations As Long, ByRef Operation() As Long, ByRef ObjectType()
As String, ByRef ObjectName() As String, ByRef Age() As Double, ByRef
MyType() As String, ByRef MyName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static nonlinear staged load case.
Stage
The stage in the specified load case for which data is requested. Stages are
numbered sequentially starting from 1.
NumberOperations
The number of operations in the specified stage.
Operation
This is an array that includes 1, 2, 3, 4, 5, 6, 7, or 11, indicating an operation
type.
1 = Add structure
2 = Remove structure
3 = Load objects if new
4 = Load objects
5 = Change section properties
6 = Change section property modifiers
7 = Change releases
11 = Change section properties and age
ObjectType
This is an array that includes the object type associated with the specified
operation. The object type may be one of the following:
Group
Frame
Cable
Tendon
Area
Solid
Link
Point

The following list shows which object types are applicable to each operation type:
Operation = 1 (Add structure): All object types
Operation = 2 (Remove structure): All object types
Operation = 3 (Load objects if new): All object types
Operation = 4 (Load objects): All object types
Operation = 5 (Change section properties): All object types except Point
Operation = 6 (Change section property modifiers): Group, Frame, Cable, Area
Operation = 7 (Change releases): Group, Frame
Operation = 11 (Change section properties and age): All object types except
Point
ObjectName
This is an array that includes the name of the object associated with the
specified operation. This is the name of a Group, Frame object, Cable object,
Tendon object, Area object, Solid object, Link object or Point object, depending
on the ObjectType item.
Age
This is an array that includes the age of the added structure, at the time it is
added, in days. This item applies only to operations with Operation = 1.
MyType
This is an array that includes a load type or an object type, depending on what is
specified for the Operation item. This item applies only to operations with
Operation = 3, 4, 5, 6, 7, or 11.
When Operation = 3 or 4, this is an array that includes Load or Accel, indicating
the load type of an added load.
When Operation = 5 or 11, and the ObjectType item is Group, this is an array
that includes Frame, Cable, Tendon, Area, Solid or Link, indicating the object
type for which the section property is changed.
When Operation = 6 and the ObjectType item is Group, this is an array that
includes Frame, Cable or Area, indicating the object type for which the section
property modifiers are changed.
When Operation = 7 and the ObjectType item is Group, this is an array that
includes Frame, indicating the object type for which the releases are changed.
When Operation = 5, 6, 7, or 11, and the ObjectType item is not Group and not
Point, this item is ignored and the type is picked up from the ObjectType item.
MyName
This is an array that includes a load assignment or an object name, depending
on what is specified for the Operation item. This item applies only to operations
with Operation = 3, 4, 5, 6, 7, or 11.
When Operation = 3 or 4, this is an array that includes the name of the load
assigned to the operation. If the associated LoadType item is Load, this item is
the name of a defined load pattern. If the associated LoadType item is Accel ,
this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
When Operation = 5 or 11, this is the name of a Frame, Cable, Tendon, Area,
Solid or Link object, depending on the object type specified.
When Operation = 6, this is the name of a Frame, Cable or Area object,
depending on the object type specified.
When Operation = 7, this is the name of a Frame object.
SF
This is an array that includes the scale factor for the load assigned to the
operation, if any. [L/s2] for Accel UX UY and UZ; otherwise unitless
This item applies only to operations with Operation = 3 or 4.
Remarks
This function retrieves stage data for the specified stage in the specified load
case.
The function returns zero if the data is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedStageData_2()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Double
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim MyOperation() As Long
Dim MyObjectType() As String
Dim MyObjectName() As String
Dim MyAge() As Double
Dim MyMyType() As String
Dim MyMyName() As String
Dim MySF() As Double
Dim NumberOperations As Long
Dim Operation() As Long
Dim ObjectType() As String
Dim ObjectName() As String
Dim Age() As Double
Dim MyType() As String
Dim MyName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_2("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'set stage data


ReDim MyOperation(1)
ReDim MyObjectType(1)
ReDim MyObjectName(1)
ReDim MyAge(1)
ReDim MyMyType(1)
ReDim MyMyName(1)
ReDim MySF(1)
MyOperation(0) = 1
MyObjectType(0) = "Group"
MyObjectName(0) = "ALL"
MyAge(0) = 3
MyOperation(1) = 4
MyObjectType(1) = "Frame"
MyObjectName(1) = "8"
MyMyType(1) = "Load"
MyMyName(1) = "DEAD"
MySF(1) = 0.85
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageData_2("ACASE1",
1, 2, MyOperation, MyObjectType, MyObjectName, MyAge, MyMyType,
MyMyName, MySF)

'get stage data


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetStageData_2("ACASE1",
1, NumberOperations, Operation, ObjectType, ObjectName, Age,
MyType, MyName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supersedes GetStageData_1.
See Also
SetStageData_2
GetStageDefinitions_2
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetStageDefinitions_2
VB6 Procedure
Function GetStageDefinitions_2(ByVal Name As String, ByRef NumberStages
As Long, ByRef Duration() As Double, ByRef Output() As Boolean, ByRef
OutputName() As String, ByRef Comment() As String) As Long
Parameters
Name
The name of an existing static nonlinear staged load case.
NumberStages
The number of stages defined for the specified load case.
Duration
This is an array that includes the duration in days for each stage.
Output
This is an array that includes True or False, indicating if analysis output is to be
saved for each stage.
OutputName
This is an array that includes a user-specified output name for each stage.
Comment
This is an array that includes a comment for each stage. The comment may be a
blank string.
Remarks
This function retrieves the stage definition data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedStageDefinitions_2()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Double
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim NumberStages As Long
Dim Duration() As Double
Dim Output() As Boolean
Dim OutputName() As String
Dim Comment() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_2("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'get stage definitions


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetStageDefinitions_2("ACAS
NumberStages, Duration, Output, OutputName, Comment)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supersedes GetStageDefinitions_1
See Also
SetStageDefinitions_2
GetTargetForceParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.GetTargetForceParame
VB6 Procedure
Function GetTargetForceParameters(ByVal Name As String, ByRef TolConvF
As Double, ByRef MaxIter As Long, ByRef AccelFact As Double, ByRef NoStop
As Boolean) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
TolConvF
The relative convergence tolerance for target force iteration.
MaxIter
The maximum iterations per stage for target force iteration.
AccelFact
The acceleration factor.
NoStop
If this item is True, the analysis is continued when there is no convergence in the
target force iteration.
Remarks
This function retrieves the target force iteration parameters for the specified
load case.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedTargetForceParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim TolConvF As Double
Dim MaxIter As Long
Dim AccelFact As Double
Dim NoStop As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'get target force iteration parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetTargetForceParameters("L
TolConvF, MaxIter, AccelFact, NoStop)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTargetForceParameters
SetCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case, that case is
modified, otherwise, a new case is added.
Remarks
This function initializes a static nonlinear staged analysis case. If this function is
called for an existing load case, all items for the case are reset to their default
value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStaged()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetGeometricNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetGeometricNonlinear
VB6 Procedure
Function SetGeometricNonlinearity(ByVal Name As String, ByVal NLGeomType
As Long) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
NLGeomType
This is 0, 1 or 2, indicating the geometric nonlinearity option selected for the load
case.
0 = None
1 = P-delta
2 = P-delta plus large displacements
Remarks
This function sets the geometric nonlinearity option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedGeometricNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set geometric nonlinearity option


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetGeometricNonlinearity("L
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetGeometricNonlinearity
SetHingeUnloading
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetHingeUnloading
VB6 Procedure
Function SetHingeUnloading(ByVal Name As String, ByVal UnloadType As
Long) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
UnloadType
This is 1, 2 or 3, indicating the hinge unloading option selected for the load case.
1 = Unload entire structure
2 = Apply local redistribution
3 = Restart using secant stiffness
Remarks
This function sets the hinge unloading option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedHingeUnloading()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set hinge unloading option


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetHingeUnloading("LCASE1",
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetHingeUnloading
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts from the state at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the state at the end of that case is used. If the initial case
is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetInitialCase("LCASE1",
"SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetMassSource
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetMassSource
VB6 Procedure
Function SetMassSource(ByVal Name As String, ByVal Source As String) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
Source
This is the name of an existing mass source or a blank string. Blank indicates to
use the mass source from the previous load case or the default mass source if
the load case starts from zero initial conditions.
Remarks
This function sets the mass source to be used for the specified load case.
The function returns zero if the mass source is data is successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'assign a mass source to the static nonlinear load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetMassSource("LCASE1",
"MyMassSource")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.20.
See Also
GetMassSource
SetMaterialNonlinearity
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetMaterialNonlinearity
VB6 Procedure
Function SetMaterialNonlinearity(ByVal Name As String, ByVal
TimeDepMatProp As Boolean) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
TimeDepMatProp
When this is True, any specified time dependent material properties are
considered in the analysis.
Remarks
This function sets the material nonlinearity options for the specified load case.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedMaterialNonlinearity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set geometric nonlinearity options


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetMaterialNonlinearity("LC
True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetMaterialNonlinearity
SetResultsSaved
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetResultsSaved
VB6 Procedure
Function SetResultsSaved(ByVal Name As String, ByVal StagedSaveOption As
Long, Optional ByVal StagedMinSteps As Long = 1, Optional ByVal
StagedMinStepsTD As Long = 1) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
StagedSaveOption
This is 0, 1, 2 or 3, indicating the results saved option for the load case.
0= End of final stage
1= End of each stage
2= Start and end of each stage
3= Two or more times in each stage
StagedMinSteps
The minimum number of steps for application of instantaneous load. This item
applies only when StagedSaveOption = 3.
StagedMinStepsTD
The minimum number of steps for analysis of time dependent items. This item
applies only when StagedSaveOption = 3.
Remarks
This function sets the results saved parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedResultsSaved()
'dimension variables|
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set results saved parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetResultsSaved("LCASE1",
3, 4, 10)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetResultsSaved
SetStageData_2
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetStageData_2
VB6 Procedure
Function SetStageData_2(ByVal Name As String, ByVal Stage As Long, ByVal
NumberOperations As Long, ByRef Operation() As Long, ByRef ObjectType()
As String, ByRef ObjectName() As String, ByRef Age() As Double, ByRef
MyType() As String, ByRef MyName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static nonlinear staged load case.
Stage
The stage in the specified load case to which the data applies. Stages are
numbered sequentially starting from 1.
NumberOperations
The number of operations in the specified stage.
Operation
This is an array that includes 1, 2, 3, 4, 5, 6, 7, or 11, indicating an operation
type.
1 = Add structure
2 = Remove structure
3 = Load objects if new
4 = Load objects
5 = Change section properties
6 = Change section property modifiers
7 = Change releases
11 = Change section properties and age
ObjectType
This is an array that includes the object type associated with the specified
operation. The object type may be one of the following:
Group
Frame
Cable
Tendon
Area
Solid
Link
Point

The following list shows which object types are applicable to each operation type:
Operation = 1 (Add structure): All object types
Operation = 2 (Remove structure): All object types
Operation = 3 (Load objects if new): All object types
Operation = 4 (Load objects): All object types
Operation = 5 (Change section properties): All object types except Point
Operation = 6 (Change section property modifiers): Group, Frame, Cable, Area
Operation = 7 (Change releases): Group, Frame
Operation = 11 (Change section properties and age): All object types except
Point
ObjectName
This is an array that includes the name of the object associated with the
specified operation. This is the name of a Group, Frame object, Cable object,
Tendon object, Area object, Solid object, Link object or Point object, depending
on the ObjectType item.
Age
This is an array that includes the age of the added structure, at the time it is
added, in days. This item applies only to operations with Operation = 1.
MyType
This is an array that includes a load type or an object type, depending on what is
specified for the Operation item. This item applies only to operations with
Operation = 3, 4, 5, 6, 7, or 11.
When Operation = 3 or 4, this is an array that includes Load or Accel, indicating
the load type of an added load.
When Operation = 5 or 11, and the ObjectType item is Group, this is an array
that includes Frame, Cable, Tendon, Area, Solid or Link, indicating the object
type for which the section property is changed.
When Operation = 6 and the ObjectType item is Group, this is an array that
includes Frame, Cable or Area, indicating the object type for which the section
property modifiers are changed.
When Operation = 7 and the ObjectType item is Group, this is an array that
includes Frame, indicating the object type for which the releases are changed.
When Operation = 5, 6, 7, or 11, and the ObjectType item is not Group and not
Point, this item is ignored and the type is picked up from the ObjectType item.
MyName
This is an array that includes a load assignment or an object name, depending
on what is specified for the Operation item. This item applies only to operations
with Operation = 3, 4, 5, 6, 7 or 11.
When Operation = 3 or 4, this is an array that includes the name of the load
assigned to the operation. If the associated LoadType item is Load, this item is
the name of a defined load pattern. If the associated LoadType item is Accel,
this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
When Operation = 5 or 11, this is the name of a Frame, Cable, Tendon, Area,
Solid or Link object, depending on the object type specified.
When Operation = 6, this is the name of a Frame, Cable or Area object,
depending on the object type specified.
When Operation = 7, this is the name of a Frame object.
SF
This is an array that includes the scale factor for the load assigned to the
operation, if any. [L/s2] for Accel UX UY and UZ; otherwise unitless
This item applies only to operations with Operation = 3 or 4.
Remarks
This function sets the stage data for the specified stage in the specified load
case. All previous stage data for the specified stage is cleared when this
function is called.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedStageData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Double
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim MyOperation() As Long
Dim MyObjectType() As String
Dim MyObjectName() As String
Dim MyAge() As Double
Dim MyMyType() As String
Dim MyMyName() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_2("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'set stage data


ReDim MyOperation(1)
ReDim MyObjectType(1)
ReDim MyObjectName(1)
ReDim MyAge(1)
ReDim MyMyType(1)
ReDim MyMyName(1)
ReDim MySF(1)
MyOperation(0) = 1
MyObjectType(0) = "Group"
MyObjectName(0) = "ALL"
MyAge(0) = 3
MyOperation(1) = 4
MyObjectType(1) = "Frame"
MyObjectName(1) = "8"
MyMyType(1) = "Load"
MyMyName(1) = "DEAD"
MySF(1) = 0.85
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageData_2("ACASE1",
1, 2, MyOperation, MyObjectType, MyObjectName, MyAge, MyMyType,
MyMyName, MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supersedes SetStageData_1.
See Also
GetStageData_2
SetStageDefinitions_2
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.SetStageDefinitions_2
VB6 Procedure
Function SetStageDefinitions_2(ByVal Name As String, ByVal NumberStages
As Long, ByRef Duration() As Double, ByRef Output() As Boolean, ByRef
OutputName() As String, ByRef Comment() As String) As Long
Parameters
Name
The name of an existing static nonlinear staged load case.
NumberStages
The number of stages defined for the specified load case.
Duration
This is an array that includes the duration in days for each stage.
Output
This is an array that includes True or False, indicating if analysis output is to be
saved for each stage.
OutputName
This is an array that includes a user-specified output name for each stage.
Comment
This is an array that includes a comment for each stage. The comment may be a
blank string.
Remarks
This function initializes the stage definition data for the specified load case. All
previous stage definition data for the case is cleared when this function is called.
The function returns zero if the data is successfully initialized; otherwise, it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedStageDefinitions_2()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Double
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_2("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supersedes GetStageDefinitions_1.
See Also
GetStageDefinitions_2
SetSolControlParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetSolControlParamete
VB6 Procedure
Function SetSolControlParameters(ByVal Name As String, ByVal MaxTotalSteps
As Long, ByVal MaxFailedSubSteps As Long, ByVal MaxIterCS As Long, ByVal
MaxIterNR As Long, ByVal TolConvD As Double, ByVal UseEventStepping As
Boolean, ByVal TolEventD As Double, ByVal MaxLineSearchPerIter As Long,
ByVal TolLineSearch As Double, ByVal LineSearchStepFact As Double) As
Long
Parameters
Name
The name of an existing static nonlinear load case.
MaxTotalSteps
The maximum total steps per stage.
MaxFailedSubSteps
The maximum null (zero) steps per stage.
MaxIterCS
The maximum constant-stiffness iterations per step.
MaxIterNR
The maximum Newton_Raphson iterations per step.
TolConvD
The relative iteration convergence tolerance.
UseEventStepping
This item is True if event-to-event stepping is used.
TolEventD
The relative event lumping tolerance.
MaxLineSearchPerIter
The maximum number of line searches per iteration.
TolLineSearch
The relative line-search acceptance tolerance.
LineSearchStepFact
The line-search step factor.
Remarks
This function sets the solution control parameters for the specified load case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedSolutionControlParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set solution control parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetSolControlParameters("LC
240, 40, 15, 50, 0.00005, False, 0.02, 10, 0.2, 1.7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSolControlParameters
SetTargetForceParameters
Syntax
SapObject.SapModel.LoadCases.StaticNonlinearStaged.SetTargetForceParame
VB6 Procedure
Function SetTargetForceParameters(ByVal Name As String, ByVal TolConvF As
Double, ByVal MaxIter As Long, ByVal AccelFact As Double, ByVal NoStop As
Boolean) As Long
Parameters
Name
The name of an existing static nonlinear staged analysis case.
TolConvF
The relative convergence tolerance for target force iteration.
MaxIter
The maximum iterations per stage for target force iteration.
AccelFact
The acceleration factor.
NoStop
If this item is True, the analysis is continued when there is no convergence in the
target force iteration.
Remarks
This function sets the target force iteration parameters for the specified load
case.
The function returns zero if the parameters are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseStaticNonlinearStagedTargetForceParameters()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("LCASE1")

'set target force iteration parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetTargetForceParameters("L
0.008, 6, 5, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTargetForceParameters
GetDampConstant
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetDampConstant
VB6 Procedure
Function GetDampConstant(ByVal Name As String, ByRef HysConMassCoeff
As Double, ByRef HysConStiffCoeff As Double) As Long
Parameters
Name
The name of an existing steady state load case that has constant damping.
HysConMassCoeff
The mass proportional damping coefficient.
HysConStiffCoeff
The stiffness proportional damping coefficient.
Remarks
This function retrieves the constant hysteretic damping for all frequencies
assigned to the specified load case.
The function returns zero if the damping is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long
Dim HysConMassCoeff As Double
Dim HysConStiffCoeff As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.SteadyState.SetDampConstant("LCASE1", 0.8,
0.04)

'get constant damping


ret = SapModel.LoadCases.SteadyState.GetDampType("LCASE1",
DampType)
If DampType = 1 Then
ret =
SapModel.LoadCases.SteadyState.GetDampConstant("LCASE1",HysConMassCo
HysConStiffCoeff)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
GetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetDampInterpolated
VB6 Procedure
Function GetDampInterpolated(ByVal Name As String, ByRef HysIntFreqUnits
As Long, ByRef HysIntNumFreqs As Long, ByRef HysIntFreq() As Double,
ByRef HysIntMassCoeff() As Double, ByRef HysIntStiffCoeff() As Double) As
Long
Parameters
Name
The name of an existing steady state load case that has interpolated damping.
HysIntFreqUnits
This is 1 or 2, indicating the units for the frequency.
1 = Hz [cyc/s]
2 = RPM
HysIntNumFreqs
The number of sets of frequency, mass coefficient and stiffness coefficient
data.
HysIntFreq
This is an array of frequencies. The frequency is in Hz or RPM, depending on
the value of HysIntFreqUnits.
HysIntMassCoeff
This is an array that includes the mass proportional damping coefficient.
HysIntStiffCoeff
This is an array that includes the stiffness proportional damping coefficient.
Remarks
This function retrieves the interpolated hysteretic damping by frequency
assigned to the specified load case.
The function returns zero if the damping is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyHysIntFreq() As Double
Dim MyHysIntMassCoeff() As Double
Dim MyHysIntStiffCoeff() As Double
Dim DampType As Long
Dim HysIntFreqUnits As Long
Dim HysIntNumFreqs As Long
Dim HysIntFreq() As Double
Dim HysIntMassCoeff() As Double
Dim HysIntStiffCoeff() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set interpolated damping


ReDim MyHysIntFreq(2)
ReDim MyHysIntMassCoeff(2)
ReDim MyHysIntStiffCoeff(2)
MyHysIntFreq(0) = 1
MyHysIntMassCoeff(0) = 0.6
MyHysIntStiffCoeff(0) = 0.04
MyHysIntFreq(1) = 10
MyHysIntMassCoeff(1) = 0.7
MyHysIntStiffCoeff(1) = 0.05
MyHysIntFreq(2) = 100
MyHysIntMassCoeff(2) = 0.8
MyHysIntStiffCoeff(2) = 0.08
ret =
SapModel.LoadCases.SteadyState.SetDampInterpolated("LCASE1", 2, 3,
MyHysIntFreq, MyHysIntMassCoeff, MyHysIntStiffCoeff)

'get interpolated damping


ret = SapModel.LoadCases.SteadyState.GetDampType("LCASE1",
DampType)
If DampType = 2 Then
ret =
SapModel.LoadCases.SteadyState.GetDampInterpolated("LCASE1",
HysIntFreqUnits, HysIntNumFreqs, HysIntFreq, HysIntMassCoeff,
HysIntStiffCoeff)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampInterpolated
GetDampType
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetDampType
VB6 Procedure
Function GetDampType(ByVal Name As String, ByRef DampType As Long) As
Long
Parameters
Name
The name of an existing steady state load case.
DampType
This is 1 or 2, indicating the hysteretic damping type for the load case.
1 = Constant hysteretic damping for all frequencies
2 = Interpolated hysteretic damping by frequency
Remarks
This function retrieves the hysteretic damping type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateDampType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DampType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'get damping type


ret = SapModel.LoadCases.SteadyState.GetDampType("LCASE1",
DampType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
GetDampInterpolated
GetFreqData
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetFreqData
VB6 Procedure
Function GetFreqData(ByVal Name As String, ByRef FreqFirst As Double,
ByRef FreqLast As Double, ByRef FreqNumIncs As Long, ByRef
FreqAddModal As Boolean, ByRef FreqAddModalDev As Boolean, ByRef
FreqAddSpecified As Boolean, ByRef FreqNumModalDev As Long, ByRef
FreqModalDev() As Double, ByRef FreqNumSpecified As Long, ByRef
FreqSpecified() As Double) As Long
Parameters
Name
The name of an existing steady state load case.
FreqFirst
The first frequency. [cyc/s]
FreqLast
The last frequency. [cyc/s]
FreqNumIncs
The number of frequency increments.
FreqAddModal
If this item is True then modal frequencies are added.
FreqAddModalDev
If this item is True then signed fractional deviations from modal frequencies are
added.
FreqAddSpecified
If this item is True, specified frequencies are added.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which modal frequencies and modal frequency deviations are based.
FreqNumModalDev
The number of signed fractional deviations from modal frequencies that are
added. This item applies only when FreqAddModalDev = True.
FreqModalDev
This is an array that includes the added signed fractional deviations from modal
frequencies. This item applies only when FreqAddModalDev = True.
FreqNumSpecified
The number of specified frequencies that are added. This item applies only when
FreqAddSpecified = True.
FreqSpecified
This is an array that includes the added specified frequencies. This item applies
only when FreqAddModalDev = True.
Remarks
This function retrieves the frequency data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateFreqData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyFreqModalDev() As Double
Dim MyFreqSpecified() As Double
Dim FreqFirst As Double
Dim FreqLast As Double
Dim FreqNumIncs As Long
Dim FreqAddModal As Boolean
Dim FreqAddModalDev As Boolean
Dim FreqAddSpecified As Boolean
Dim ModalCase As String
Dim FreqNumModalDev As Long
Dim FreqModalDev() As Double
Dim FreqNumSpecified As Long
Dim FreqSpecified() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set frequency data


ReDim MyFreqModalDev(1)
ReDim MyFreqSpecified(1)
MyFreqModalDev(0) = -0.1
MyFreqModalDev(1) = 0.2
MyFreqSpecified(0) = 1.2
MyFreqSpecified(1) = 11.4
ret = SapModel.LoadCases.SteadyState.SetFreqData("LCASE1",
.6, 20.6, 10, True, True, True, "MODAL", 2, MyFreqModalDev, 2,
MyFreqSpecified)

'get frequency data


ret = SapModel.LoadCases.SteadyState.GetFreqData("LCASE1",
FreqFirst, FreqLast, FreqNumIncs, FreqAddModal, FreqAddModalDev,
FreqAddSpecified, ModalCase, FreqNumModalDev, FreqModalDev,
FreqNumSpecified, FreqSpecified)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetFreqData
GetInitialCase
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetInitialCase
VB6 Procedure
Function GetInitialCase(ByVal Name As String, ByRef InitialCase As String) As
Long
Parameters
Name
The name of an existing steady state load case.
InitialCase
This is blank, None, or the name of an existing analysis case. This item
specifies if the load case starts from zero initial conditions, that is, an
unstressed state, or if it starts using the stiffness that occurs at the end of a
nonlinear static or nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function retrieves the initial condition assumed for the specified load case.
The function returns zero if the initial condition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InitialCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'get initial condition


ret =
SapModel.LoadCases.SteadyState.GetInitialCase("LCASE1",
InitialCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetInitialCase
GetLoads
Syntax
SapObject.SapModel.LoadCases.SteadyState.GetLoads
VB6 Procedure
Function GetLoads(ByVal Name As String, ByRef NumberLoads As Long,
ByRef LoadType() As String, ByRef LoadName() As String, ByRef Func() As
String, ByRef SF() As Double, ByRef PhaseAngle() As Double, ByRef CSys()
As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing steady state load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the steady state function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
PhaseAngle
This is an array that includes the phase angle. [deg]
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function retrieves the load data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseSteadyStateLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyPhaseAngle() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim NumberLoads As Long
Dim LoadType() As String
Dim LoadName() As String
Dim Func() As String
Dim SF() As Double
Dim PhaseAngle() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyPhaseAngle(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "UNIFSS"
MySF(0) = 1.5
MyPhaseAngle(0) = 90
MyLoadType(1) = "Accel"
MyLoadName(1) = "U3"
MyFunc(1) = "UNIFSS"
MySF(1) = 1
MyPhaseAngle(1) = 90
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.SteadyState.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyPhaseAngle, MyCSys, MyAng)

'get load data


ret = SapModel.LoadCases.SteadyState.GetLoads("LCASE1",
NumberLoads, LoadType, LoadName, Func, SF, PhaseAngle, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoads
SetCase
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetCase
VB6 Procedure
Function SetCase(ByVal Name As String) As Long
Parameters
Name
The name of an existing or new load case. If this is an existing case then that
case is modified, otherwise, a new case is added.
Remarks
This function initializes a steady state load case. If this function is called for an
existing load case, all items for the case are reset to their default value.
The function returns zero if the load case is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseSteadyState()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDampConstant
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetDampConstant
VB6 Procedure
Function SetDampConstant(ByVal Name As String, ByVal HysConMassCoeff
As Double, ByVal HysConStiffCoeff As Double) As Long
Parameters
Name
The name of an existing steady state load case.
HysConMassCoeff
The mass proportional damping coefficient.
HysConStiffCoeff
The stiffness proportional damping coefficient.
Remarks
This function sets constant hysteretic damping for all frequencies for the
specified load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseSteadyStateDampConstant()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set constant damping


ret =
SapModel.LoadCases.SteadyState.SetDampConstant("LCASE1", 0.8,
0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampConstant
SetDampInterpolated
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetDampInterpolated
VB6 Procedure
Function SetDampInterpolated(ByVal Name As String, ByVal HysIntFreqUnits As
Long, ByVal HysIntNumFreqs As Long, ByRef HysIntFreq() As Double, ByRef
HysIntMassCoeff() As Double, ByRef HysIntStiffCoeff() As Double) As Long
Parameters
Name
The name of an existing steady state load case.
HysIntFreqUnits
This is either 1 or 2, indicating the units for the frequency.
1 = Hz [cyc/s]
2 = RPM
HysIntNumFreqs
The number of sets of frequency, mass coefficient and stiffness coefficient
data.
HysIntFreq
This is an array of frequencies. The frequency is either in Hz or RPM depending
on the value of HysIntFreqUnits.
HysIntMassCoeff
This is an array that includes the mass proportional damping coefficient.
HysIntStiffCoeff
This is an array that includes the stiffness proportional damping coefficient.
Remarks
This function sets interpolated hysteretic damping by frequency for the specified
load case.
The function returns zero if the damping is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetCaseSteadyStateDampInterpolated()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyHysIntFreq() As Double
Dim MyHysIntMassCoeff() As Double
Dim MyHysIntStiffCoeff() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set interpolated damping


ReDim MyHysIntFreq(2)
ReDim MyHysIntMassCoeff(2)
ReDim MyHysIntStiffCoeff(2)
MyHysIntFreq(0) = 1
MyHysIntMassCoeff(0) = 0.6
MyHysIntStiffCoeff(0) = 0.04
MyHysIntFreq(1) = 10
MyHysIntMassCoeff(1) = 0.7
MyHysIntStiffCoeff(1) = 0.05
MyHysIntFreq(2) = 100
MyHysIntMassCoeff(2) = 0.8
MyHysIntStiffCoeff(2) = 0.08
ret =
SapModel.LoadCases.SteadyState.SetDampInterpolated("LCASE1", 2, 3,
MyHysIntFreq, MyHysIntMassCoeff, MyHysIntStiffCoeff)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetDampInterpolated
SetFreqData
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetFreqData
VB6 Procedure
Function SetFreqData(ByVal Name As String, ByVal FreqFirst As Double, ByVal
FreqLast As Double, ByVal FreqNumIncs As Long, ByVal FreqAddModal As
Boolean, ByVal FreqAddModalDev As Boolean, ByVal FreqAddSpecified As
Boolean, ByVal FreqNumModalDev As Long, ByRef FreqModalDev() As
Double, ByVal FreqNumSpecified As Long, ByRef FreqSpecified() As Double)
As Long
Parameters
Name
The name of an existing steady state load case.
FreqFirst
The first frequency. [cyc/s]
FreqLast
The last frequency. [cyc/s]
FreqNumIncs
The number of frequency increments.
FreqAddModal
If this item is True, modal frequencies are added.
FreqAddModalDev
If this item is True, signed fractional deviations from modal frequencies are
added.
FreqAddSpecified
If this item is True, specified frequencies are added.
ModalCase
This is the name of an existing modal load case. It specifies the modal load case
on which modal frequencies and modal frequency deviations are based.
FreqNumModalDev
The number of signed fractional deviations from modal frequencies that are
added. This item applies only when FreqAddModalDev = True.
FreqModalDev
This is an array that includes the added signed fractional deviations from modal
frequencies. This item applies only when FreqAddModalDev = True.
FreqNumSpecified
The number of specified frequencies that are added. This item applies only when
FreqAddSpecified = True.
FreqSpecified
This is an array that includes the added specified frequencies. This item applies
only when FreqAddModalDev = True.
Remarks
This function sets the frequency data for the specified load case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseSteadyStateFreqData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyFreqModalDev() As Double
Dim MyFreqSpecified() As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set frequency data


ReDim MyFreqModalDev(1)
ReDim MyFreqSpecified(1)
MyFreqModalDev(0) = -0.1
MyFreqModalDev(1) = 0.2
MyFreqSpecified(0) = 1.2
MyFreqSpecified(1) = 11.4
ret = SapModel.LoadCases.SteadyState.SetFreqData("LCASE1",
.6, 20.6, 10, True, True, True, "MODAL", 2, MyFreqModalDev, 2,
MyFreqSpecified)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetFreqData
SetInitialCase
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetInitialCase
VB6 Procedure
Function SetInitialCase(ByVal Name As String, ByVal InitialCase As String) As
Long
Parameters
Name
The name of an existing steady state load case.
InitialCase
This is blank, None or the name of an existing analysis case. This item specifies
if the load case starts from zero initial conditions, that is, an unstressed state, or
if it starts using the stiffness that occurs at the end of a nonlinear static or
nonlinear direct integration time history load case.
If the specified initial case is a nonlinear static or nonlinear direct integration
time history load case, the stiffness at the end of that case is used. If the initial
case is anything else, zero initial conditions are assumed.
Remarks
This function sets the initial condition for the specified load case.
The function returns zero if the initial condition is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetCaseSteadyStateInitialCondition()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear load case


ret = SapModel.LoadCases.StaticNonlinear.SetCase("SN1")

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set initial condition


ret =
SapModel.LoadCases.SteadyState.SetInitialCase("LCASE1", "SN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetInitialCase
SetLoads
Syntax
SapObject.SapModel.LoadCases.SteadyState.SetLoads
VB6 Procedure
Function SetLoads(ByVal Name As String, ByVal NumberLoads As Long, ByRef
LoadType() As String, ByRef LoadName() As String, ByRef Func() As String,
ByRef SF() As Double, ByRef PhaseAngle() As Double, ByRef CSys() As
String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing steady state load case.
NumberLoads
The number of loads assigned to the specified analysis case.
LoadType
This is an array that includes either Load or Accel, indicating the type of each
load assigned to the load case.
LoadName
This is an array that includes the name of each load assigned to the load case.
If the LoadType item is Load, this item is the name of a defined load pattern.
If the LoadType item is Accel, this item is U1, U2, U3, R1, R2 or R3, indicating
the direction of the load.
Func
This is an array that includes the name of the steady state function associated
with each load.
SF
This is an array that includes the scale factor of each load assigned to the load
case. [L/s2] for U1 U2 and U3; otherwise unitless
PhaseAngle
This is an array that includes the phase angle. [deg]
CSys
This is an array that includes the name of the coordinate system associated with
each load. If this item is a blank string, the Global coordinate system is
assumed.
This item applies only when the LoadType item is Accel.
Ang
This is an array that includes the angle between the acceleration local 1 axis and
the +X-axis of the coordinate system specified by the CSys item. The rotation is
about the Z-axis of the specified coordinate system. [deg]
This item applies only when the LoadType item is Accel.
Remarks
This function sets the load data for the specified analysis case.
The function returns zero if the data is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseSteadyStateLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyPhaseAngle() As Double
Dim MyCSys() As String
Dim MyAng() As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add steady state load case


ret = SapModel.LoadCases.SteadyState.SetCase("LCASE1")

'set load data


ReDim MyLoadType(1)
ReDim MyLoadName(1)
ReDim MyFunc(1)
ReDim MySF(1)
ReDim MyPhaseAngle(1)
ReDim MyCSys(1)
ReDim MyAng(1)
MyLoadType(0) = "Load"
MyLoadName(0) = "DEAD"
MyFunc(0) = "UNIFSS"
MySF(0) = 1.5
MyPhaseAngle(0) = 90
MyLoadType(1) = "Accel"
MyLoadName(1) = "U3"
MyFunc(1) = "UNIFSS"
MySF(1) = 1
MyPhaseAngle(1) = 90
MyCSys(1) = "Global"
MyAng(1) = 10
ret = SapModel.LoadCases.SteadyState.SetLoads("LCASE1", 2,
MyLoadType, MyLoadName, MyFunc, MySF, MyPhaseAngle, MyCSys, MyAng)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoads
GetAS11702007
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetAS11702007
VB6 Procedure
Function GetAS11702007(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double,
ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef AS2007SiteClass As Long, ByRef AS2007kp
As Double, ByRef AS2007Z As Double, ByRef AS2007Sp As Double, ByRef
AS2007Mu As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a AS 1170 2007 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified kt factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
AS2007SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5=E
AS2007kp
The probability factor, kp.
AS2007Z
The hazard factor, Z.
AS2007Sp
The structural performance factor, Sp.
AS2007Mu
The structural ductility factor, u.
Remarks
This function retrieves auto seismic loading parameters for the AS 1170 2007
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersAS11702007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim AS2007SiteClass As Long
Dim AS2007kp As Double
Dim AS2007Z As Double
Dim AS2007Sp As Double
Dim AS2007Mu As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign AS 1170 2007 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetAS11702007("EQX",
2, 0.1, 2, 0.075, 0, False, 0, 0, 3, 1.3, 0.09, 0.77, 2)
'get AS 1170 2007 parameters
ret = SapModel.LoadPatterns.AutoSeismic.GetAS11702007("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
AS2007SiteClass, AS2007kp, AS2007Z, AS2007Sp, AS2007Mu)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetAS11702007
GetBOCA96
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetBOCA96
VB6 Procedure
Function GetBOCA96(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef BOCA96Aa As Double, ByRef BOCA96Av As
Double, ByRef BOCA96S As Double, ByRef BOCA96R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a BOCA96 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
BOCA96Aa
The effective peak acceleration coefficient.
BOCA96Av
The effective peak velocity-related coefficient.
BOCA96S
This is 1, 1.2, 1.5 or 2, indicating the site coefficient.
BOCA96R
The response modification factor.
Remarks
This function retrieves auto seismic loading parameters for the 1996 BOCA
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim BOCA96Aa As Double
Dim BOCA96Av As Double
Dim BOCA96S As Double
Dim BOCA96R As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'get BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetBOCA96("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
BOCA96Aa, BOCA96Av, BOCA96S, BOCA96R)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetBOCA96
GetChinese2010
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetChinese2010
VB6 Procedure
Function GetChinese2010(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef UserT As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef JGJ32010AlphaMax As Double, ByRef JGJ32010SI As Long, ByRef
JGJ32010DampRatio As Double, ByRef JGJ32010Tg As Double, ByRef
JGJ32010PTDF As Double, ByRef EnhancementFactor As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a Chinese 2010 auto
seismic load assignment.
DirFlag
This is 1, 2 or 3, indicating the seismic load direction.
1 = Global X
2 = Global Y
3 = Global Z
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is either 2 or 3, indicating the time period option.
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
JGJ32010AlphaMax
The maximum influence factor.
JGJ32010SI
This is 1, 2, 3, 4, 5 or 6, indicating the seismic intensity.
1= 6 (0.05g)
2= 7 (0.10g)
3= 7 (0.15g)
4= 8 (0.20g)
5 = 8 (0.30g)
6 = 9 (0.40g)
JGJ32010DampRatio
The damping ratio.
JGJ32010Tg
The characteristic ground period. [s]
JGJ32010PTDF
The period time discount factor.
EnhancementFactor
The enhancement factor.
Remarks
This function retrieves auto seismic loading parameters for the Chinese 2010
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim JGJ32010AlphaMax As Double
Dim JGJ32010SI As Long
Dim JGJ32010DampRatio As Double
Dim JGJ32010Tg As Double
Dim JGJ32010PTDF As Double
Dim EnhancementFactor As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Chinese 2010 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetChinese2010("EQX", 1, 0.05,
2, 0, False, 0, 0, 0.16, 4, 0.06, 0.4, 1, 1)
'get Chinese 2010 parameters
ret =
SapModel.LoadPatterns.AutoSeismic.GetChinese2010("EQX", DirFlag,
Eccen, PeriodFlag, UserT, UserZ, TopZ, BottomZ, JGJ32010AlphaMax,
JGJ32010SI, JGJ32010DampRatio, JGJ32010Tg, JGJ32010PTDF,
EnhancementFactor)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetChinese2010
GetDiaphragmEccentricityOverride
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetDiaphragmEccentricityOverr
VB6 Procedure
Function GetDiaphragmEccentricityOverride(ByVal Name As String, ByRef Num
As Long, ByRef Diaph() As String, ByRef Eccen() As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern that has an auto seismic load
assigned.
Num
The number of diaphragm eccentricity overrides for the specified load pattern.
Diaph
This is an array that includes the names of the diaphragms which have
eccentricity overrides.
Eccen
This is an array that includes the eccentricity applied to each diaphragm. [L]
Remarks
This function retrieves diaphragm eccentricity overrides for auto seismic loads.
This function does not apply for User Load type auto seismic loads.
The function returns zero if the overrides are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSeismicDiaphragmEccentricityOverride()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String
Dim Eccen() As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)
'assign BOCA96 parameters
ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'assign diaphragm eccentricity override


ret =
SapModel.LoadPatterns.AutoSeismic.SetDiaphragmEccentricityOverride("
"Diaph1", 50)

'get diaphragm eccentricity override


ret =
SapModel.LoadPatterns.AutoSeismic.GetDiaphragmEccentricityOverride("
Num, Diaph, Eccen)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetDiaphragmEccentricityOverride
GetSpecialRigidDiaphragmList
GetEurocode82004_1
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetEurocode82004_1
VB6 Procedure
Function GetEurocode82004_1(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double,
ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef EURO2004Country As Long, ByRef
EURO2004SpectrumType As Long, ByRef EURO2004GroundType As Long,
ByRef EURO2004ag As Double, ByRef EURO2004S As Double, ByRef
EURO2004Tb As Double, ByRef EURO2004Tc As Double, ByRef
EURO2004Td As Double, ByRef EURO2004Beta As Double, ByRef
EURO2004q As Double, ByRef EURO2004Lambda As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a Eurocode 8 2004 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified Ct factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
EURO2004Country
This is 0, 1, 5, or 10 indicating the country for which the Nationally Determined
Parameters (NDPs) are specified.
0 = Other (NDPs are user specified)
1 = CEN Default
5 = Norway 10 = Portugal
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1=A
2=B
3=C
4=D
5=E
EURO2004ag
The design ground acceleration in g, ag.
EURO2004S
The soil factor, S.
EURO2004Tb
The lower limit of period of the constant spectral acceleration branch, Tb.
EURO2004Tc
The upper limit of period of the constant spectral acceleration branch, Tc.
EURO2004Td
The period defining the start of the constant displacement range, Td.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
EURO2004Lambda
The correction factor, Lambda.
Remarks
This function retrieves auto seismic loading parameters for the Eurocode 8
2004 code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersEurocode82004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim EURO2004Country As Long
Dim EURO2004SpectrumType As Long
Dim EURO2004GroundType As Long
Dim EURO2004ag As Double
Dim EURO2004S As Double
Dim EURO2004Tb As Double
Dim EURO2004Tc As Double
Dim EURO2004Td As Double
Dim EURO2004Beta As Double
Dim EURO2004q As Double
Dim EURO2004Lambda As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetEurocode82004_1("EQX", 2,
0.1, 2, 0.075, 0, False, 0, 0, 1, 1, 2, 0.4, 1, 1, 1, 1, 0.2, 2,
1)

'get Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.GetEurocode82004_1("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
EURO2004Country, EURO2004SpectrumType, EURO2004GroundType,
EURO2004ag, EURO2004S, EURO2004Tb, EURO2004Tc, EURO2004Td,
EURO2004Beta, EURO2004q, EURO2004Lambda)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes GetEurocode82004.
Added Portugal as a Country parameter in SAP2000 Version 15.0.0 and
CSiBridge Version 15.1.0.
See Also
SetEurocode82004_1
GetIBC2003
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetIBC2003
VB6 Procedure
Function GetIBC2003(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef IBC2003SG As Long, ByRef
IBC2003SeismicCoeffFlag As Long, ByRef IBC2003Site As Long, ByRef
IBC2003SS As Double, ByRef IBC2003S1 As Double, ByRef IBC2003Fa As
Double, ByRef IBC2003Fv As Double, ByRef IBC2003R As Double, ByRef
IBC2003Omega As Double, ByRef IBC2003Cd As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a IBC2003 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor (ft). This item applies when the PeriodFlag item is
1 or 2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
IBC2003SG
This is 1, 2 or 3, indicating the seismic group.
1=I
2 = II
3 = III
IBC2003SeismicCoeffFlag
This is either 1 or 2, indicating the seismic coefficient option.
1 = Coefficients are per code
2 = Coefficients are user defined
IBC2003Site
This is either 1, 2, 3, 4 or 5, indicating the site class. This item is filled only when
the IBC2003SeismicCoeffFlag = 1.
1= A
2= B
3= C
4= D
5= E
IBC2003SS
The response acceleration for short periods, (g).
IBC2003S1
The response acceleration for a one second period, (g).
IBC2003Fa
The site coefficient Fa.
IBC2003Fv
The site coefficient Fv.
IBC2003R
The response modification factor.
IBC2003Omega
The system overstrength factor.
IBC2003Cd
The deflection amplification factor.
Remarks
This function retrieves auto seismic loading parameters for the 2003 IBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersIBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim IBC2003SG As Long
Dim IBC2003SeismicCoeffFlag As Long
Dim IBC2003Site As Long
Dim IBC2003SS As Double
Dim IBC2003S1 As Double
Dim IBC2003Fa As Double
Dim IBC2003Fv As Double
Dim IBC2003R As Double
Dim IBC2003Omega As Double
Dim IBC2003Cd As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)
'assign IBC2003 parameters
ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2003("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 1, 3, 1, 0.4, 0, 0, 8, 3, 5.5)

'get IBC2003parameters
ret = SapModel.LoadPatterns.AutoSeismic.GetIBC2003("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
IBC2003SG, IBC2003SeismicCoeffFlag, IBC2003Site, IBC2003SS,
IBC2003S1, IBC2003Fa, IBC2003Fv, IBC2003R, IBC2003Omega,
IBC2003Cd)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetIBC2003
GetIBC2006
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetIBC2006
VB6 Procedure
Function GetIBC2006(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef IBC2006CtType As Long,
ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef IBC2006R As Double, ByRef
IBC2006Omega As Double, ByRef IBC2006Cd As Double, ByRef IBC2006I As
Double, ByRef IBC2006Option As Long, ByRef IBC2006Latitude As Double,
ByRef IBC2006Longitude As Double, ByRef IBC2006ZipCode As String, ByRef
IBC2006SS As Double, ByRef IBC2006S1 As Double, ByRef IBC2006TL As
Double, ByRef IBC2006SiteClass As Long, ByRef IBC2006Fa As Double,
ByRef IBC2006Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a IBC2006 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
IBC2006CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item is meaningful
when the PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item is meaningful when the PeriodFlag item
is 3. [s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
IBC2006R
The response modification factor.
IBC2006Omega
The system overstrength factor.
IBC2006Cd
The deflection amplification factor.
IBC2006I
The occupancy importance factor.
IBC2006Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
IBC2006Latitude, IBC2006Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when IBC2006Option = 0 or 1.
IBC2006ZipCode
The zip code for which the seismic coefficients are obtained. This item is
meaningful only when IBC2006Option = 1.
IBC2006SS, IBC2006S1
The seismic coefficients Ss and S1.
IBC2006TL
The long-period transition period. [s]
IBC2006SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
IBC2006Fa, IBC2006Fv
The site coefficients Fa and Fv.
Remarks
This function retrieves auto seismic loading parameters for the 2006 IBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersIBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim IBC2006CtType As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim IBC2006R As Double
Dim IBC2006Omega As Double
Dim IBC2006Cd As Double
Dim IBC2006I As Double
Dim IBC2006Option As Long
Dim IBC2006Latitude As Double
Dim IBC2006Longitude As Double
Dim IBC2006ZipCode As String
Dim IBC2006SS As Double
Dim IBC2006S1 As Double
Dim IBC2006TL As Double
Dim IBC2006SiteClass As Long
Dim IBC2006Fa As Double
Dim IBC2006Fv As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2006 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2006("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'get IBC2006 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetIBC2006("EQX",
DirFlag, Eccen, PeriodFlag, IBC2006CtType, UserT, UserZ, TopZ,
BottomZ, IBC2006R, IBC2006Omega, IBC2006Cd, IBC2006I,
IBC2006Option, IBC2006Latitude, IBC2006Longitude, IBC2006ZipCode,
IBC2006SS, IBC2006S1, IBC2006TL, IBC2006SiteClass, IBC2006Fa,
IBC2006Fv)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetIBC2006
GetIBC2009
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetIBC2009
VB6 Procedure
Function GetIBC2009(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CtType As Long, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef R As Double, ByRef Omega As Double, ByRef Cd
As Double, ByRef I As Double, ByRef IBC2009Option As Long, ByRef Latitude
As Double, ByRef Longitude As Double, ByRef ZipCode As String, ByRef SS As
Double, ByRef S1 As Double, ByRef TL As Double, ByRef SiteClass As Long,
ByRef Fa As Double, ByRef Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a IBC2009 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item is meaningful
when the PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item is meaningful when the PeriodFlag item
is 3. [s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
R
The response modification factor.
Omega
The system overstrength factor.
Cd
The deflection amplification factor.
I
The occupancy importance factor.
IBC2009Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when IBC2009Option = 0 or 1.
ZipCode
The zip code for which the seismic coefficients are obtained. This item is
meaningful only when IBC2009Option = 1.
SS, S1
The seismic coefficients Ss and S1.
TL
The long-period transition period. [s]
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa, Fv
The site coefficients Fa and Fv.
Remarks
This function retrieves auto seismic loading parameters for the 2009 IBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersIBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CtType As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim R As Double
Dim Omega As Double
Dim Cd As Double
Dim I As Double
Dim IBC2009Option As Long
Dim Latitude As Double
Dim Longitude As Double
Dim ZipCode As String
Dim SS As Double
Dim S1 As Double
Dim TL As Double
Dim SiteClass As Long
Dim Fa As Double
Dim Fv As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2009 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2009("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'get IBC2009 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetIBC2009("EQX",
DirFlag, Eccen, PeriodFlag, CtType, UserT, UserZ, TopZ, BottomZ,
R, Omega, Cd, I, IBC2009Option, Latitude, Longitude, ZipCode, SS,
S1, TL, SiteClass, Fa, Fv)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetIBC2009
GetIBC2012
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetIBC2012
VB6 Procedure
Function GetIBC2012(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CtType As Long, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef R As Double, ByRef Omega As Double, ByRef Cd
As Double, ByRef I As Double, ByRef IBC2012Option As Long, ByRef Latitude
As Double, ByRef Longitude As Double, ByRef ZipCode As String, ByRef SS As
Double, ByRef S1 As Double, ByRef TL As Double, ByRef SiteClass As Long,
ByRef Fa As Double, ByRef Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a IBC2012 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item is meaningful
when the PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item is meaningful when the PeriodFlag item
is 3. [s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
R
The response modification factor.
Omega
The system overstrength factor.
Cd
The deflection amplification factor.
I
The occupancy importance factor.
IBC2012Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when IBC2012Option = 0 or 1.
ZipCode
The zip code for which the seismic coefficients are obtained. This item is
meaningful only when IBC2012Option = 1.
SS, S1
The seismic coefficients Ss and S1.
TL
The long-period transition period. [s]
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa, Fv
The site coefficients Fa and Fv.
Remarks
This function retrieves auto seismic loading parameters for the 2012 IBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersIBC2012()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CtType As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim R As Double
Dim Omega As Double
Dim Cd As Double
Dim I As Double
Dim IBC2012Option As Long
Dim Latitude As Double
Dim Longitude As Double
Dim ZipCode As String
Dim SS As Double
Dim S1 As Double
Dim TL As Double
Dim SiteClass As Long
Dim Fa As Double
Dim Fv As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2012 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2012("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'get IBC2012 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetIBC2012("EQX",
DirFlag, Eccen, PeriodFlag, CtType, UserT, UserZ, TopZ, BottomZ,
R, Omega, Cd, I, IBC2012Option, Latitude, Longitude, ZipCode, SS,
S1, TL, SiteClass, Fa, Fv)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetIBC2012
GetIS1893_2002
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetIS1893_2002
VB6 Procedure
Function GetIS1893_2002(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double,
ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef INZFlag As Long, ByRef INZ As Double,
ByRef INS As Long, ByRef INI As Double, ByRef INR As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with an IS1893_2002 auto
seismic load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor (m). This item applies when the PeriodFlag item is
1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
INZFlag
This is either 1 or 2, indicating if the seismic zone factor is per code or user
defined.
1 = Per code
2 = User defined
INZ
The seismic zone factor, Z.
If the seismic zone factor is per code (INZFlag = 1), this item should be one of
the following: 0.10, 0.16, 0.24, 0.36.
INS
This is 1, 2 or 3, indicating the soil type.
1=I
2 = II
3 = III
BOCA96R
The response modification factor.
INR
The importance factor.
INR
The response modification factor.
Remarks
This function retrieves auto seismic loading parameters for the 2002 IS1893
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersIS18932002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim INZFlag As Long
Dim INZ As Double
Dim INS As Long
Dim INI As Double
Dim INR As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IS1893_2002 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetIS1893_2002("EQX", 1, 0.05,
1, 0.075, 0, False, 0, 0, 1, 0.36, 3, 1, 5)
'get IS1893_2002 parameters
ret =
SapModel.LoadPatterns.AutoSeismic.GetIS1893_2002("EQX", DirFlag,
Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ, INZFlag, INZ,
INS, INI, INR)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetIS1893_2002
GetNBCC2015
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNBCC2015
VB6 Procedure
Function GetNBCC2015(ByVal Name As String, ByRef DirFlag As Long, ByRef
eccen As Double, ByRef CtType As Long, ByRef PeriodFlag As Long, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef PGA As Double, ByRef S02 As Double, ByRef S05
As Double, ByRef S1 As Double, ByRef S2 As Double, ByRef S5 As Double,
ByRef S10 As Double, ByRef SiteClass As Long, ByRef F02 As Double, ByRef
F05 As Double, ByRef F1 As Double, ByRef F2 As Double, ByRef F5 As
Double, ByRef F10 As Double, ByRef I As Double, ByRef Mv As Double, ByRef
Rd As Double, ByRef Ro As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NBCC2015 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S5
The spectral acceleration at a 5 second period.
S10
The spectral acceleration at a 10 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
F02
The site coefficient at a 0.2 second period. This item is read when the site class
is F only.
F05
The site coefficient at a 0.5 second period. This item is read when the site class
is F only.
F1
The site coefficient at a 1 second period. This item is read when the site class is
F only.
F2
The site coefficient at a 2 second period. This item is read when the site class is
F only.
F5
The site coefficient at a 5 second period. This item is read when the site class is
F only.
F10
The site coefficient at a 10 second period. This item is read when the site class
is F only.
I
The importance factor.
Mv
The higher mode factor.
Rd
The ductility modifier.
Ro
The overstrength modifier.
Remarks
This function retrieves auto seismic loading parameters for the 2015 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim CtType As Long
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim PGA As Double
Dim S02 As Double
Dim S05 As Double
Dim S1 As Double
Dim S2 As Double
Dim S5 As Double
Dim S10 As Double
Dim SiteClass As Long
Dim F02 As Double
Dim F05 As Double
Dim F1 As Double
Dim F5 As Double
Dim F10 As Double
Dim I As Double
Dim Mv As Double
Dim Rd As Double
Dim Ro As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2015 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2015("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 0.03,
0.01, 6, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.5, 1.2, 6, 1.6)

'get NBCC2015 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetNBCC2015("EQX",
DirFlag, Eccen, CtType, PeriodFlag, UserT, UserZ, TopZ, BottomZ,
PGA, S02, S05, S1, S2, S5, S10, SiteClass, F02, F05, F1, F2, F5,
F10, I, Mv, Rd, Ro)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetNBCC2015
GetNBCC2010
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNBCC2010
VB6 Procedure
Function GetNBCC2010(ByVal Name As String, ByRef DirFlag As Long, ByRef
eccen As Double, ByRef CtType As Long, ByRef PeriodFlag As Long, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef PGA As Double, ByRef S02 As Double, ByRef S05
As Double, ByRef S1 As Double, ByRef S2 As Double, ByRef S4 As Double,
ByRef SiteClass As Long, ByRef Fa As Double, ByRef Fv As Double, ByRef I
As Double, ByRef Mv As Double, ByRef Rd As Double, ByRef Ro As Double)
As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NBCC2010 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S4
The spectral acceleration at a 4 second period.

SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa
The site coefficient, Fa.
Fv
The site coefficient, Fv.
I
The importance factor.
Mv
The higher mode factor.
Rd
The ductility modifier.
Ro
The overstrength modifier.
Remarks
This function retrieves auto seismic loading parameters for the 2010 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim CtType As Long
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim PGA As Double
Dim S02 As Double
Dim S05 As Double
Dim S1 As Double
Dim S2 As Double
Dim S4 As Double
Dim SiteClass As Long
Dim Fa As Double
Dim Fv As Double
Dim I As Double
Dim Mv As Double
Dim Rd As Double
Dim Ro As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)
'add new load pattern
ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2010("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 0.1, 6,
1.8, 2, 1.5, 1.2, 6, 1.6)

'get NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetNBCC2005("EQX",
DirFlag, Eccen, NBCC2005CtType, CtType, PeriodFlag, UserT, UserZ,
TopZ, BottomZ, PGA, S02, S05, S1, S2, S4, SiteClass, Fa, Fv, I,
Mv, Rd, Ro)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetNBCC2010
GetNBCC2005
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNBCC2005
VB6 Procedure
Function GetNBCC2005(ByVal Name As String, ByRef DirFlag As Long, ByRef
eccen As Double, ByRef NBCC2005CtType As Long, ByRef PeriodFlag As
Long, ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As
Double, ByRef BottomZ As Double, ByRef NBCC2005PGA As Double, ByRef
NBCC2005S02 As Double, ByRef NBCC2005S05 As Double, ByRef
NBCC2005S1 As Double, ByRef NBCC2005S2 As Double, ByRef
NBCC2005SiteClass As Long, ByRef NBCC2005Fa As Double, ByRef
NBCC2005Fv As Double, ByRef NBCC2005I As Double, ByRef NBCC2005Mv
As Double, ByRef NBCC2005Rd As Double, ByRef NBCC2005Ro As Double)
As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NBCC2005 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
NBCC2005CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
NBCC95DS
This item applies only when the NBCCPFlag = 2. It is the dimension of the lateral
load resisting system in the direction of the applied forces. [L]
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NBCC2005PGA
The peak ground acceleration.
NBCC2005S02
The spectral acceleration at a 0.2 second period.
NBCC2005S05
The spectral acceleration at a 0.52 second period.
NBCC2005S1
The spectral acceleration at a 1 second period.
NBCC2005S2
The spectral acceleration at a 2 second period.
NBCC2005SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NBCC2005Fa
The site coefficient, Fa.
NBCC2005Fv
The site coefficient, Fv.
NBCC2005I
The importance factor.
NBCC2005Mv
The higher mode factor.
NBCC2005Rd
The ductility modifier.
NBCC2005Ro
The overstrength modifier.
Remarks
This function retrieves auto seismic loading parameters for the 2005 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim NBCC2005CtType As Long
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim NBCC2005PGA As Double
Dim NBCC2005S02 As Double
Dim NBCC2005S05 As Double
Dim NBCC2005S1 As Double
Dim NBCC2005S2 As Double
Dim NBCC2005SiteClass As Long
Dim NBCC2005Fa As Double
Dim NBCC2005Fv As Double
Dim NBCC2005I As Double
Dim NBCC2005Mv As Double
Dim NBCC2005Rd As Double
Dim NBCC2005Ro As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)
'add new load pattern
ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2005("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 6, 1.8, 2,
1.5, 1.2, 6, 1.6)

'get NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetNBCC2005("EQX",
DirFlag, Eccen, NBCC2005CtType, PeriodFlag, UserT, UserZ, TopZ,
BottomZ, NBCC2005PGA, NBCC2005S02, NBCC2005S05, NBCC2005S1,
NBCC2005S2, NBCC2005SiteClass, NBCC2005Fa, NBCC2005Fv, NBCC2005I,
NBCC2005Mv, NBCC2005Rd, NBCC2005Ro)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetNBCC2005
GetNBCC95
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNBCC95
VB6 Procedure
Function GetNBCC95(ByVal Name As String, ByRef DirFlag As Long, ByRef
eccen As Double, ByRef NBCCPFlag As Long, ByRef NBCC95DS As Double,
ByRef PeriodFlag As Long, ByRef UserT As Double, ByRef UserZ As Boolean,
ByRef TopZ As Double, ByRef BottomZ As Double, ByRef NBCC95ZA As Long,
ByRef NBCC95ZV As Long, ByRef NBCC95ZVFlag As Long, ByRef
NBCC95ZVR As Double, ByRef NBCC95I As Double, ByRef NBCC95F As
Double, ByRef NBCC95R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NBCC95 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
NBCCPFlag
This is either 1 or 2, indicating the structure type.
1 = Moment frame
2 = Other
NBCC95DS
This item applies only when the NBCCPFlag = 2. It is the dimension of the lateral
load resisting system in the direction of the applied forces. [L]
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NBCC95ZA
This is 0, 1, 2, 3, 4, 5 or 6, indicating the acceleration related zone, Za.
NBCC95ZV
This is 0, 1, 2, 3, 4, 5 or 6, indicating the velocity related zone, Zv.
NBCC95ZVFlag
This is either 1 or 2, indicating how the zonal velocity ratio, V, is specified.
1 = From code based on Zv
2 = User specified
NBCC95ZVR
The zonal velocity ratio, V.
NBCC95I
The importance factor.
NBCC95F
The foundation factor.
NBCC95R
The force modification factor.
Remarks
This function retrieves auto seismic loading parameters for the 1995 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim NBCCPFlag As Long
Dim NBCC95DS As Double
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim NBCC95ZA As Long
Dim NBCC95ZV As Long
Dim NBCC95ZVFlag As Long
Dim NBCC95ZVR As Double
Dim NBCC95I As Double
Dim NBCC95F As Double
Dim NBCC95R As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC95 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC95("EQX", 1,
0.05, 1, 0, 1, 0, False, 0, 0, 4, 5, 1, 0, 1, 1.3, 4)

'get NBCC95 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetNBCC95("EQX",
DirFlag, Eccen, NBCCPFlag, NBCC95DS, PeriodFlag, UserT, UserZ,
TopZ, BottomZ, NBCC95ZA, NBCC95ZV, NBCC95ZVFlag, NBCC95ZVR,
NBCC95I, NBCC95F, NBCC95R)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNBCC95
GetNEHRP97
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNEHRP97
VB6 Procedure
Function GetNEHRP97(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef NEHRP97SG As Long, ByRef
NEHRP97SeismicCoeffFlag As Long, ByRef NEHRP97Site As Long, ByRef
NEHRP97SS As Double, ByRef NEHRP97S1 As Double, ByRef NEHRP97Fa
As Double, ByRef NEHRP97Fv As Double, ByRef NEHRP97R As Double) As
Long
Parameters
Name
The name of an existing Quake-type load pattern with a NEHRP97 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NEHRP97SG
This is 1, 2 or 3, indicating the seismic group.
1=I
2 = II
3 = III
NEHRP97SeismicCoeffFlag
This is 1 or 2, indicating the seismic coefficient option.
1 = Coefficients are per code
2 = Coefficients are user defined
NEHRP97Site
This is 1, 2, 3, 4 or 5, indicating the site class. This item is only filled when the
NEHRP97SeismicCoeffFlag = 1.
1= A
2= B
3= C
4= D
5= E
NEHRP97SS
The response acceleration for short periods, (g).
NEHRP97S1
The response acceleration for a one second period, (g).
NEHRP97Fa
The site coefficient Fa.
NEHRP97Fv
The site coefficient Fv.
NEHRP97R
The response modification factor.
Remarks
This function retrieves auto seismic loading parameters for the 1997 NEHRP
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNEHRP97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim NEHRP97SG As Long
Dim NEHRP97SeismicCoeffFlag As Long
Dim NEHRP97Site As Long
Dim NEHRP97SS As Double
Dim NEHRP97S1 As Double
Dim NEHRP97Fa As Double
Dim NEHRP97Fv As Double
Dim NEHRP97R As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NEHRP97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNEHRP97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 1, 3, 1, 0.4, 0, 0, 8)

'get NEHRP97parameters
ret = SapModel.LoadPatterns.AutoSeismic.GetNEHRP97("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
NEHRP97SG, NEHRP97SeismicCoeffFlag, NEHRP97Site, NEHRP97SS,
NEHRP97S1, NEHRP97Fa, NEHRP97Fv, NEHRP97R)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNEHRP97
GetNTC2008
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNTC2008
VB6 Procedure
Function GetNTC2008(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef C1Type As Long, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef ParamsOption As Long, ByRef Latitude As Double,
ByRef Longitude As Double, ByRef Island As Long, ByRef LimitState As Long,
ByRef UsageClass As Long, ByRef NomLife As Double, ByRef PeakAccel As
Double, ByRef F0 As Double, ByRef Tcs As Double, ByRef SpecType As Long,
ByRef SoilType As Long, ByRef Topography As Long, ByRef hRatio As Double,
ByRef Damping As Double, ByRef q As Double, ByRef lambda As Double) As
Long
Parameters
Name
The name of an existing Quake-type load pattern with a NTC 2008 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CIType
This is 0, 1, 2 or 3, indicating the values of C1. This item applies when the
PeriodFlag item is 1 or 2.
1 = C1 = 0.085 (m)
2 = C1 = 0.075 (m)
3 = C1 = 0.05 (m)
UserT
The user specified time period. This item is meaningful when the PeriodFlag item
is 3. [s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
ParamsOption
This is 1, 2, or 3, indicating the option for defining the parameters.
1 = by latitude and longitude
2 = by island
3 = user specified
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when ParamsOption = 1.
Island
This is one of the following values. This item is used only when ParamsOption =
2.
1 = Alicudi
2 = Arcipelago Toscano
3 = Filcudi
4 = Isole Egadi
5 = Lampedusa
6 = Linosa
7 = Lipari
8 = Palmarola
9 = Panarea
10 = Pantelleria
11 = Ponza
12 = Salina
13 = Santo Stefano
14 = Sardegna
15 = Stromboli
16 = Tremiti
17 = Ustica
18 = Ventotene
19 = Vulcano
20 = Zannone
LimitState
This is 1, 2, 3, or 4, indicating the limit state.
1= SLO
2= SLD
3= SLV
4= SLC
UsageClass
This is 1, 2, 3, or 4, indicating the usage class.
1=I
2 = II
3 = III
4 = IV
NomLife
The nominal life to be considered.
PeakAccel
The peak ground acceleration, ag/g.
F0
The magnitude factor, F0.
Tcs
The reference period, Tc* [s].
SpecType
This is 1, 2, 3, or 4, indicating the type of spectrum to consider.
1= Elastic horizontal
2= Elastic vertical
3= Design horizontal
4= Design vertical
SoilType
This is 1, 2, 3, 4, or 5, indicating the subsoil type.
1= A
2= B
3= C
4= D
5= E

Topography
This is 1, 2, 3, or 4, indicating the topography type.
1= T1
2= T2
3= T3
4= T4
hRatio
The ratio for the site altitude at the base of the hill to the height of the hill.
Damping
The damping, in percent. This is only applicable for SpecType 1 and 2.
q
The behavior correction factor. This is only applicable for SpecType 3 and 4.
lambda
A correction factor.
Remarks
This function retrieves auto seismic loading parameters for the NTC 2008 code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim C1Type As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim ParamsOption As Long
Dim Latitude As Double
Dim Longitude As Double
Dim Island As Long
Dim LimitState As Long
Dim UsageClass As Long
Dim NomLife As Double
Dim PeakAccel As Double
Dim F0 As Double
Dim Tcs As Double
Dim SpecType As Long
Dim SoilType As Long
Dim Topography As Long
Dim hRatio As Double
Dim Damping As Double
Dim q As Double
Dim lambda As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX",
eLoadPatternType_QUAKE)

'assign NTC2008 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNTC2008("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 3, 0, 0, 1, 1, 1, 50, 0.2, 2.4, 0.3,
3, 2, 1, 1, 5, 1, 0.85)

'get NTC2008 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetNTC2008("EQX",
DirFlag, Eccen, PeriodFlag, C1Type, UserT, UserZ, TopZ, BottomZ,
ParamsOption, Latitude, Longitude, Island, LimitState, UsageClass,
NomLife, PeakAccel, F0, Tcs, SpecType, SoilType, Topography,
hRatio, Damping, q, lambda)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetNTC2008
GetNZS11702004
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetNZS11702004
VB6 Procedure
Function GetNZS11702004(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef UserT As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef NZS2004SiteClass As Long, ByRef NZS2004Z As Double, ByRef
NZS2004R As Double, ByRef NZS2004DIST As Double, ByRef NZS2004Sp
As Double, ByRef NZS2004Mu As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NZS 1170 2004 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NZS2004SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
NZS2004Z
The hazard factor, Z.
NZS2004R
The return period factor, R.
NZS2004DIST
Distance to the fault in km, used to calculate the near fault factor..
NZS2004Sp
The structural performance factor, Sp.
NZS2004Mu
The structural ductility factor, u.
Remarks
This function retrieves auto seismic loading parameters for the NZS 1170 2004
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersNZS11702004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim NZS2004SiteClass As Long
Dim NZS2004Z As Double
Dim NZS2004R As Double
Dim NZS2004DIST As Double
Dim NZS2004Sp As Double
Dim NZS2004Mu As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NZS 1170 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetNZS11702004("EQX", 2, 0.1, 2,
0, False, 0, 0, 3, 0.4, 1.3, 20, 0.7, 3)
'get NZS 1170 2004 parameters
ret =
SapModel.LoadPatterns.AutoSeismic.GetNZS11702004("EQX", DirFlag,
Eccen, PeriodFlag, UserT, UserZ, TopZ, BottomZ, NZS2004SiteClass,
NZS2004Z, NZS2004R, NZS2004DIST, NZS2004Sp, NZS2004Mu)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
Modified NZS2004N TO NZS2004DIST in version 14.1.0.
See Also
SetNZS11702004
GetUBC94
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetUBC94
VB6 Procedure
Function GetUBC94(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef UBC94ZFlag As Long, ByRef UBC94Z As Double,
ByRef UBC94S As Double, ByRef UBC94I As Double, ByRef UBC94RW As
Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a UBC94 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC94ZFlag
This is 1 or 2, indicating if the seismic zone factor is per code or user defined.
1 = Per code
2 = User defined
UBC94Z
The seismic zone factor, Z.
If the seismic zone factor is per code (UBC94ZFlag = 1), this item should be
one of the following: 0.075, 0.15, 0.20, 0.30, 0.40.
UBC94S
This is 1, 1.2, 1.5 or 2, indicating the site coefficient.
UBC94I
The importance factor.
UBC94RW
The numerical coefficient, Rw.
Remarks
This function retrieves auto seismic loading parameters for the 1994 UBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim UBC94ZFlag As Long
Dim UBC94Z As Double
Dim UBC94S As Double
Dim UBC94I As Double
Dim UBC94RW As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC94 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC94("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 0.4, 1.2, 1.15, 8)
'get UBC94 parameters
ret = SapModel.LoadPatterns.AutoSeismic.GetUBC94("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
UBC94ZFlag, UBC94Z, UBC94S, UBC94I, UBC94RW)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC94
GetUBC97
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetUBC97
VB6 Procedure
Function GetUBC97(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double, ByRef
UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef UBC97SeismicCoeffFlag As Long, ByRef
UBC97SoilProfileType As Long, ByRef UBC97Z As Double, ByRef UBC97Ca
As Double, ByRef UBC97Cv As Double, ByRef UBC97NearSourceFlag As
Long, ByRef UBC97SourceType As Long, ByRef UBC97Dist As Double, ByRef
UBC97Na As Double, ByRef UBC97Nv As Double, ByRef UBC97I As Double,
ByRef UBC97R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a UBC97 auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC97SeismicCoeffFlag
This is either 1 or 2, indicating if the seismic coefficients Ca and Cv are per
code or user defined.
1 = Per code
2 = User defined
UBC97SoilProfileType
This is 1, 2, 3, 4 or 5, indicating the soil profile type.
1= SA
2= SB
3= SC
4= SD
5= SE

This item is applicable only when the seismic coefficients Ca and Cv are
calculated per code (UBC97SeismicCoeffFlag = 1).
UBC97Z
This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with code (UBC97SeismicCoeffFlag = 1).
UBC97Ca
The seismic coefficient, Ca.
UBC97Cv
The seismic coefficient, Cv.
UBC97NearSourceFlag
This is 1 or 2, indicating if the near source factor coefficients Na and Nv are per
code or user defined.
1 = Per code
2 = User defined

This item is applicable only when the seismic coefficients Ca and Cv are
calculated per code (UBC97SeismicCoeffFlag = 1) and UBC97Z = 0.4.
UBC97SourceType
This is 1, 2 or 3, indicating the seismic source type.
1=A
2=B
3=C

This item is applicable only when the seismic coefficients Ca and Cv are
calculated per code (UBC97SeismicCoeffFlag = 1), UBC97Z = 0.4, and the
near source factor coefficients Na and Nv are calculated per code
(UBC97NearSourceFlag = 1).
UBC97Dist
This is the distance to the seismic source in kilometers.
This item is only applicable when the seismic coefficients Ca and Cv are
calculated per code (UBC97SeismicCoeffFlag = 1), UBC97Z = 0.4, and the
near source factor coefficients Na and Nv are calculated per code
(UBC97NearSourceFlag = 1).
UBC97Na
The near source factor coefficient, Na.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2).
UBC97Nv
The near source factor coefficient, Nv.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2).
UBC97I
The importance factor.
UBC97R
The overstrength factor.
Remarks
This function retrieves auto seismic loading parameters for the 1997 UBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim UBC97SeismicCoeffFlag As Long
Dim UBC97SoilProfileType As Long
Dim UBC97Z As Double
Dim UBC97Ca As Double
Dim UBC97Cv As Double
Dim UBC97NearSourceFlag As Long
Dim UBC97SourceType As Long
Dim UBC97Dist As Double
Dim UBC97Na As Double
Dim UBC97Nv As Double
Dim UBC97I As Double
Dim UBC97R As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)
'add new load pattern
ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 3, 0.4, 0, 0, 1, 3, 5, 0, 0,
1.15, 6)

'get UBC97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetUBC97("EQX",
DirFlag, Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
UBC97SeismicCoeffFlag, UBC97SoilProfileType, UBC97Z, UBC97Ca,
UBC97Cv, UBC97NearSourceFlag, UBC97SourceType, UBC97Dist, UBC97Na,
UBC97Nv, UBC97I, UBC97R)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC97
GetUBC97Iso
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetUBC97Iso
VB6 Procedure
Function GetUBC97Iso(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef UBC97IsoSeismicCoeffFlag As Long, ByRef
UBC97IsoSoilProfileType As Long, ByRef UBC97IsoZ As Double, ByRef
UBC97IsoCv As Double, ByRef UBC97IsoNearSourceFlag As Long, ByRef
UBC97IsoSourceType As Long, ByRef UBC97IsoDist As Double, ByRef
UBC97IsoNv As Double, ByRef UBC97IsoRI As Double, ByRef UBC97IsoBD
As Double, ByRef UBC97IsoKDmax As Double, ByRef UBC97IsoKDmin As
Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a UBC97Iso auto seismic
load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC97IsoSeismicCoeffFlag
This is either 1 or 2, indicating if the seismic coefficient Cv is per code or user
defined.
1 = Per code
2 = User defined
UBC97IsoSoilProfileType
This is 1, 2, 3, 4 or 5, indicating the soil profile type.
1= SA
2= SB
3= SC
4= SD
5= SE

This item is applicable only when the seismic coefficients Ca and Cv are
calculated per code (UBC97SeismicCoeffFlag = 1).
UBC97IsoZ
This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
This item is applicable only when the seismic coefficient Cv is calculated per
code (UBC97IsoSeismicCoeffFlag = 1).
UBC97IsoCv
The seismic coefficient, Cv.
UBC97IsoNearSourceFlag
This is either 1 or 2, indicating if the near source factor coefficient Nv is per
code or user defined.
1 = Per code
2 = User defined

This item is applicable only when the seismic coefficient Cv is calculated per
code (UBC97IsoSeismicCoeffFlag = 1) and UBC97IsoZ = 0.4.
UBC97IsoSourceType
This is 1, 2 or 3, indicating the seismic source type.
1=A
2=B
3=C

This item is applicable only when the seismic coefficient Cv is calculated per
code (UBC97IsoSeismicCoeffFlag = 1), UBC97IsoZ = 0.4, and the near source
factor coefficient Nv is calculated per code (UBC97IsoNearSourceFlag = 1).
UBC97IsoDist
This is the distance to the seismic source in kilometers.
This item is applicable only when the seismic coefficient Cv is calculated per
code (UBC97IsoSeismicCoeffFlag = 1), UBC97IsoZ = 0.4, and the near source
factor coefficient Nv is calculated per code (UBC97IsoNearSourceFlag = 1).
UBC97IsoNv
The near source factor coefficient, Nv.
This item is applicable only when the seismic coefficient Cv is user defined
(UBC97IsoSeismicCoeffFlag = 2).
UBC97IsoRI
The overstrength factor, Ri.
UBC97IsoBD
The coefficient for damping.
UBC97IsoKDmax
The maximum effective stiffness of the isolation system. [F/L]
UBC97IsoKDmin
The minimum effective stiffness of the isolation system. [F/L]
Remarks
This function retrieves auto seismic loading parameters for seismically isolated
buildings using the 1997 UBC code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersUBC97Iso()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim UBC97IsoSeismicCoeffFlag As Long
Dim UBC97IsoSoilProfileType As Long
Dim UBC97IsoZ As Double
Dim UBC97IsoCv As Double
Dim UBC97IsoNearSourceFlag As Long
Dim UBC97IsoSourceType As Long
Dim UBC97IsoDist As Double
Dim UBC97IsoNv As Double
Dim UBC97IsoRI As Double
Dim UBC97IsoBD As Double
Dim UBC97IsoKDmax As Double
Dim UBC97IsoKDmin As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)
'add new load pattern
ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97Iso parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97Iso("EQX",
1, 0.05, False, 0, 0, 1, 3, 0.4, 0, 1, 3, 5, 0, 2, 1.25, 200, 150)

'get UBC97Iso parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetUBC97Iso("EQX",
DirFlag, Eccen, UserZ, TopZ, BottomZ, UBC97IsoSeismicCoeffFlag,
UBC97IsoSoilProfileType, UBC97IsoZ, UBC97IsoCv,
UBC97IsoNearSourceFlag, UBC97IsoSourceType, UBC97IsoDist,
UBC97IsoNv, UBC97IsoRI, UBC97IsoBD, UBC97IsoKDmax, UBC97IsoKDmin)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC97Iso
GetUserCoefficient
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetBOCA96
VB6 Procedure
Function GetBOCA96(ByVal Name As String, ByRef DirFlag As Long, ByRef
Eccen As Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef
BottomZ As Double, ByRef c As Double, ByRef k As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a User Coefficient auto
seismic load assignment.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
c
The base shear coefficient.
k
The building height exponent.
Remarks
This function retrieves auto seismic loading parameters for User Coefficient
type loading.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersUserCoefficient()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim c As Double
Dim k As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign user coefficient parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetUserCoefficient("EQX", 1,
0.06, False, 0, 0, 0.15, 1.3)

'get user coefficient parameters


ret =
SapModel.LoadPatterns.AutoSeismic.GetUserCoefficient("EQX",
DirFlag, Eccen, UserZ, TopZ, BottomZ, c, k)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUserCoefficient
GetUserLoad
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetUserLoad
VB6 Procedure
Function GetUserLoad(ByVal Name As String, ByRef MyType As Long, ByRef
Eccen As Double, ByRef Num As Long, ByRef Diaph() As String, ByRef Fx() As
Double, ByRef Fy() As Double, ByRef Mz() As Double, ByRef x() As Double,
ByRef y() As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern which has been assigned a
User Load auto seismic type.
MyType
This is either 1 or 2, indicating the application point type for the user load.
1 = User specified application point
2 = At center of mass with optional additional eccentricity
Eccen
The eccentricity ratio that applies to all diaphragms. This item is only applicable
when MyType = 2.
Num
The number of diaphragms that can be loaded by the auto seismic load.
Diaph
This is an array that includes the names of the diaphragms that can be loaded by
the auto seismic load.
Fx
This is an array that includes the global X direction force assigned to each
diaphragm. [F]
Fy
This is an array that includes the global Y direction force assigned to each
diaphragm. [F]
Mz
This is an array that includes the moment about the global Z axis for each
diaphragm. [FL]
x
This is an array that includes the global X-coordinate of the point where the
seismic force is applied to each diaphragm. [L]
This item is applicable only when MyType = 1.
y
This is an array that includes the global Y-coordinate of the point where the
seismic force is applied to each diaphragm. [L]
This item is applicable only when MyType = 1.
Remarks
This function retrieves auto seismic loading parameters for User Load type auto
seismic loads.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicUserLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim Eccen As Double
Dim Num As Long
Dim Diaph() As String
Dim Fx() As Double
Dim Fy() As Double
Dim Mz() As Double
Dim x() As Double
Dim y() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'set to auto seismic user load


ret = SapModel.LoadPatterns.AutoSeismic.SetUserLoad("EQX",
1)

'set to auto seismic user load values


ret =
SapModel.LoadPatterns.AutoSeismic.SetUserLoadValue("EQX",
"Diaph1", 20, 4, 1000, 0, 0)
ret =
SapModel.LoadPatterns.AutoSeismic.SetUserLoadValue("EQX",
"Diaph2", 40, 8, 2000, 0, 0)

'get auto seismic user load parameters


ret = SapModel.LoadPatterns.AutoSeismic.GetUserLoad("EQX",
MyType, Eccen, Num, Diaph, Fx, Fy, Mz, x, y)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUserLoad
SetUserLoadValue
SetAS11702007
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetAS11702007
VB6 Procedure
Function SetAS11702007(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT
As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal AS2007SiteClass As Long, ByVal AS2007kp As Double, ByVal
AS2007Z As Double, ByVal AS2007Sp As Double, ByVal AS2007Mu As
Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified kt factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
AS2007SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
AS2007kp
The probability factor, kp.
AS2007Z
The hazard factor, Z.
AS2007Sp
The structural performance factor, Sp.
AS2007Mu
The structural ductility factor, u.
Remarks
This function assigns auto seismic loading parameters for the AS 1170.4 2007
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicAS11702007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign AS 1170 2007 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetAS11702007("EQX",
2, 0.1, 2, 0.075, 0, False, 0, 0, 3, 1.3, 0.09, 0.77, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetAS11702007
SetBOCA96
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetBOCA96
VB6 Procedure
Function SetBOCA96(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT
As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal BOCA96Aa As Double, ByVal BOCA96Av As Double, ByVal
BOCA96S As Double, ByVal BOCA96R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
BOCA96Aa
The effective peak acceleration coefficient.
BOCA96Av
The effective peak velocity-related coefficient.
BOCA96S
This is 1, 1.2, 1.5 or 2, indicating the site coefficient.
BOCA96R
The response modification factor.
Remarks
This function assigns auto seismic loading parameters for the 1996 BOCA
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetBOCA96
SetChinese2010
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetChinese2010
VB6 Procedure
Function SetChinese2010(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal UserT As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
JGJ32010AlphaMax As Double, ByVal JGJ32010SI As Long, ByVal
JGJ32010DampRatio As Double, ByVal JGJ32010Tg As Double, ByVal
JGJ32010PTDF As Double, ByVal EnhancementFactor As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1, 2 or 3, indicating the seismic load direction.
1 = Global X
2 = Global Y
3 = Global Z
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is either 2 or 3, indicating the time period option.
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
JGJ32010AlphaMax
The maximum influence factor.
JGJ32010SI
This is 1, 2, 3, 4, 5 or 6, indicating the seismic intensity.
1= 6 (0.05g)
2= 7 (0.10g)
3= 7 (0.15g)
4= 8 (0.20g)
5= 8 (0.30g)
6 = 9 (0.40g)
JGJ32010DampRatio
The damping ratio.
JGJ32010Tg
The characteristic ground period. [s]
JGJ32010PTDF
The period time discount factor.
EnhancementFactor
The enhancement factor.
Remarks
This function assigns auto seismic loading parameters for the Chinese 2010
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Chinese 2010 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetChinese2010("EQX", 1, 0.05,
2, 0, False, 0, 0, 0.16, 4, 0.06, 0.4, 1, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetChinese2010
SetDiaphragmEccentricityOverride
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetDiaphragmEccentricityOverr
VB6 Procedure
Function SetDiaphragmEccentricityOverride(ByVal Name As String, ByVal Diaph
As String, ByVal Eccen As Double, Optional ByVal Delete As Boolean = False)
As Long
Parameters
Name
The name of an existing Quake-type load pattern that has an auto seismic load
assigned.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
Eccen
The eccentricity applied to the specified diaphragm. [L]
Delete
If this item is True, the eccentricity override for the specified diaphragm is
deleted.
Remarks
This function assigns diaphragm eccentricity overrides for auto seismic loads.
This function does not apply for User Load type auto seismic loads.
The function returns zero if the overrides are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSeismicDiaphragmEccentricityOverride()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'assign diaphragm eccentricity override


ret =
SapModel.LoadPatterns.AutoSeismic.SetDiaphragmEccentricityOverride("
"Diaph1", 50)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Modified optional argument Delete to be ByVal in version 12.0.1.
See Also
GetDiaphragmEccentricityOverride
GetSpecialRigidDiaphragmList
SetEurocode82004_1
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetEurocode82004_1
VB6 Procedure
Function SetEurocode82004_1(ByVal Name As String, ByVal DirFlag As Long,
ByVal Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal EURO2004Country As Long, ByVal
EURO2004SpectrumType As Long, ByVal EURO2004GroundType As Long,
ByVal EURO2004ag As Double, ByVal EURO2004S As Double, ByVal
EURO2004Tb As Double, ByVal EURO2004Tc As Double, ByVal EURO2004Td
As Double, ByVal EURO2004Beta As Double, ByVal EURO2004q As Double,
ByVal EURO2004Lambda As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified Ct factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
EURO2004Country
This is 0, 1, 5, or 10 indicating the country for which the Nationally Determined
Parameters (NDPs) are specified.
0 = Other (NDPs are user specified)
1 = CEN Default
5 = Norway 10 = Portugal
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1=A
2=B
3=C
4=D
5=E
EURO2004ag
The design ground acceleration in g, ag.
EURO2004S
The soil factor, S. If the EURO2004Country item is not 0, the input value for this
item is ignored.
EURO2004Tb
The lower limit of period of the constant spectral acceleration branch, Tb. If the
EURO2004Country item is not 0, the input value for this item is ignored.
EURO2004Tc
The upper limit of period of the constant spectral acceleration branch, Tc. If the
EURO2004Country item is not 0, the input value for this item is ignored.
EURO2004Td
The period defining the start of the constant displacement range, Td. If the
EURO2004Country item is not 0, the input value for this item is ignored.
EURO2004Beta
The lower bound factor, Beta. If the EURO2004Country item is not 0, the input
value for this item is ignored.
EURO2004q
The behavior factor, q.
EURO2004Lambda
The correction factor, Lambda.
Remarks
This function assigns auto seismic loading parameters for the Eurocode 8 2004
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicEurocode82004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)add new load pattern
ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetEurocode82004_1("EQX", 2,
0.1, 2, 0.075, 0, False, 0, 0, 1, 1, 2, 0.4, 1, 1, 1, 1, 0.2, 2,
1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes SetEurocode82004.
Added Portugal as a Country parameter in SAP2000 Version 15.0.0 and
CSiBridge Version 15.1.0.
See Also
GetEurocode82004_1
SetIBC2003
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetIBC2003
VB6 Procedure
Function SetIBC2003(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT
As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal IBC2003SG As Long, ByVal IBC2003SeismicCoeffFlag As Long,
ByVal IBC2003Site As Long, ByVal IBC2003SS As Double, ByVal IBC2003S1
As Double, ByVal IBC2003Fa As Double, ByVal IBC2003Fv As Double, ByVal
IBC2003R As Double, ByVal IBC2003Omega As Double, ByVal IBC2003Cd As
Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor (ft). This item applies when the PeriodFlag item is
1 or 2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
IBC2003SG
This is 1, 2 or 3, indicating the seismic group.
1=I
2 = II
3 = III
IBC2003SeismicCoeffFlag
This is either 1 or 2, indicating the seismic coefficient option.
1 = Coefficients are per code
2 = Coefficients are user defined
IBC2003Site
This is 1, 2, 3, 4 or 5, indicating the site class. This item is only used when the
IBC2003SeismicCoeffFlag = 1.
1= A
2= B
3= C
4= D
5= E
IBC2003SS
The response acceleration for short periods, (g).
IBC2003S1
The response acceleration for a one second period, (g).
IBC2003Fa
The site coefficient Fa. This item is used only when the
IBC2003SeismicCoeffFlag = 2.
IBC2003Fv
The site coefficient Fv. This item is used only when the
IBC2003SeismicCoeffFlag = 2
IBC2003R
The response modification factor.
IBC2003Omega
The system overstrength factor.
IBC2003Cd
The deflection amplification factor.
Remarks
This function assigns auto seismic loading parameters for the 2003 IBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicIBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2003 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2003("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 1, 3, 1, 0.4, 0, 0, 8, 3, 5.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetIBC2003
SetIBC2006
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetIBC2006
VB6 Procedure
Function SetIBC2006(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal IBC2006CtType As Long,
ByVal UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal IBC2006R As Double, ByVal IBC2006Omega As
Double, ByVal IBC2006Cd As Double, ByVal IBC2006I As Double, ByVal
IBC2006Option As Long, ByVal IBC2006Latitude As Double, ByVal
IBC2006Longitude As Double, ByVal IBC2006ZipCode As String, ByVal
IBC2006SS As Double, ByVal IBC2006S1 As Double, ByVal IBC2006TL As
Double, ByVal IBC2006SiteClass As Long, ByVal IBC2006Fa As Double, ByVal
IBC2006Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
IBC2006CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item applies when the
PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
IBC2006R
The response modification factor.
IBC2006Omega
The system overstrength factor.
IBC2006Cd
The deflection amplification factor.
IBC2006I
The occupancy importance factor.
IBC2006Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
IBC2006Latitude, IBC2006Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when IBC2006Option = 0.
IBC2006ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when IBC2006Option = 1.
IBC2006SS, IBC2006S1
The seismic coefficients Ss and S1. This item is used only when IBC2006Option
= 2.
IBC2006TL
The long-period transition period. [s]
IBC2006SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
IBC2006Fa, IBC2006Fv
The site coefficients Fa and Fv. These items are used only when
IBC2006SiteClass= 6.
Remarks
This function assigns auto seismic loading parameters for the 2006 IBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicIBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2006 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2006("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetIBC2006
SetIBC2009
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetIBC2009
VB6 Procedure
Function SetIBC2009(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CtType As Long, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal R As Double, ByVal Omega As Double, ByVal Cd As
Double, ByVal I As Double, ByVal IBC2009Option As Long, ByVal Latitude As
Double, ByVal Longitude As Double, ByVal ZipCode As String, ByVal SS As
Double, ByVal S1 As Double, ByVal TL As Double, ByVal SiteClass As Long,
ByVal Fa As Double, ByVal Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item applies when the
PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
R
The response modification factor.
Omega
The system overstrength factor.
Cd
The deflection amplification factor.
I
The occupancy importance factor.
IBC2009Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when IBC2009Option = 0.
ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when IBC2009Option = 1.
SS, S1
The seismic coefficients Ss and S1. This item is used only when IBC2009Option
= 2.
TL
The long-period transition period. [s]
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa, Fv
The site coefficients Fa and Fv. These items are used only when
IBC2009SiteClass= 6.
Remarks
This function assigns auto seismic loading parameters for the 2009 IBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicIBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2009 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2009("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetIBC2009
SetIBC2012
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetIBC2012
VB6 Procedure
Function SetIBC2012(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CtType As Long, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal R As Double, ByVal Omega As Double, ByVal Cd As
Double, ByVal I As Double, ByVal IBC2012Option As Long, ByVal Latitude As
Double, ByVal Longitude As Double, ByVal ZipCode As String, ByVal SS As
Double, ByVal S1 As Double, ByVal TL As Double, ByVal SiteClass As Long,
ByVal Fa As Double, ByVal Fv As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CtType
This is 0, 1, 2 or 3, indicating the values of Ct and x. This item applies when the
PeriodFlag item is 1 or 2.
0= Ct = 0.028 (ft), x = 0.8
1= Ct = 0.016 (ft), x = 0.9
2= Ct = 0.03 (ft), x = 0.75
3= Ct = 0.02 (ft), x = 0.75
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
R
The response modification factor.
Omega
The system overstrength factor.
Cd
The deflection amplification factor.
I
The occupancy importance factor.
IBC2012Option
This is 0, 1 or 2, indicating the seismic coefficient option.
0 = Ss and S1 from USGS by latitude and longitude
1 = Ss and S1 from USGS by zip code
2 = Ss and S1 are user defined
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are used only when IBC2012Option = 0.
ZipCode
The zip code for which the seismic coefficients are obtained. This item is used
only when IBC2012Option = 1.
SS, S1
The seismic coefficients Ss and S1. This item is used only when IBC2012Option
= 2.
TL
The long-period transition period. [s]
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa, Fv
The site coefficients Fa and Fv. These items are used only when
IBC2012SiteClass= 6.
Remarks
This function assigns auto seismic loading parameters for the 2012 IBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicIBC2012()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2012 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2012("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 8, 3, 5.5, 1, 1, 0, 0, "94704", 0, 0,
8, 3, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetIBC2012
SetIS1893_2002
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetIS1893_2002
VB6 Procedure
Function SetIS1893_2002(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT
As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal INZFlag As Long, ByVal INZ As Double, ByVal INS As Long,
ByVal INI As Double, ByVal INR As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor (m). This item applies when the PeriodFlag item is
1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
INZFlag
This is either 1 or 2, indicating if the seismic zone factor is per code or user
defined.
1 = Per code
2 = User defined
INZ
The seismic zone factor, Z.
If the seismic zone factor is per code (INZFlag = 1), this item should be one of
the following: 0.10, 0.16, 0.24, 0.36.
INS
This is 1, 2 or 3, indicating the soil type.
1=I
2 = II
3 = III
BOCA96R
The response modification factor.
INR
The importance factor.
INR
The response modification factor.
Remarks
This function assigns auto seismic loading parameters for the 2002 IS1893
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicIS18932002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IS1893_2002 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetIS1893_2002("EQX", 1, 0.05,
1, 0.075, 0, False, 0, 0, 1, 0.36, 3, 1, 5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetIS1893_2002
SetNBCC2015
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNBCC2015
VB6 Procedure
Function SetNBCC2015(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal CtType As Long, ByVal PeriodFlag As Long, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal PGA As Double, ByVal S02 As Double, ByVal S05 As
Double, ByVal S1 As Double, ByVal S2 As Double, ByVal S5 As Double, ByVal
S10 As Double, ByVal SiteClass As Long, ByVal F02 As Double, ByVal F05 As
Double, ByVal F1 As Double, ByVal F2 As Double, ByVal F5 As Double, ByVal
F10 As Double, ByVal I As Double, ByVal Mv As Double, ByVal Rd As Double,
ByVal Ro As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S5
The spectral acceleration at a 5 second period.
S10
The spectral acceleration at a 10 second period.
SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
F02
The site coefficient at a 0.2 second period. This item is read when the site class
is F only.
F05
The site coefficient at a 0.5 second period. This item is read when the site class
is F only.
F1
The site coefficient at a 1 second period. This item is read when the site class is
F only.
F2
The site coefficient at a 2 second period. This item is read when the site class is
F only.
F5
The site coefficient at a 5 second period. This item is read when the site class is
F only.
F10
The site coefficient at a 10 second period. This item is read when the site class
is F only.
I
The importance factor.
Mv
The higher mode factor.
Rd
The ductility modifier.
Ro
The overstrength modifier.
Remarks
This function retrieves auto seismic loading parameters for the 2015 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub AssignSeismicNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2015 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2015("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 0.03,
0.01, 6, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.5, 1.2, 6, 1.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetNBCC2015
SetNBCC2010
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNBCC2010
VB6 Procedure
Function SetNBCC2010(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal CtType As Long, ByVal PeriodFlag As Long, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal PGA As Double, ByVal S02 As Double, ByVal S05 As
Double, ByVal S1 As Double, ByVal S2 As Double, ByVal S4 As Double, ByVal
SiteClass As Long, ByVal Fa As Double, ByVal Fv As Double, ByVal I As Double,
ByVal Mv As Double, ByVal Rd As Double, ByVal Ro As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a NBCC2010 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
PGA
The peak ground acceleration.
S02
The spectral acceleration at a 0.2 second period.
S05
The spectral acceleration at a 0.5 second period.
S1
The spectral acceleration at a 1 second period.
S2
The spectral acceleration at a 2 second period.
S4
The spectral acceleration at a 4 second period.

SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
Fa
The site coefficient, Fa. This item is read when the site class is F only.
Fv
The site coefficient, Fv. This item is read when the site class is F only.
I
The importance factor.
Mv
The higher mode factor.
Rd
The ductility modifier.
Ro
The overstrength modifier.
Remarks
This function retrieves auto seismic loading parameters for the 2010 NBCC
code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub AssignSeismicNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2010("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 0.1, 6,
1.8, 2, 1.5, 1.2, 6, 1.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetNBCC2010
SetNBCC2005
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNBCC2005
VB6 Procedure
Function SetNBCC2005(ByVal Name As String, ByVal DirFlag As Long, ByVal
eccen As Double, ByVal NBCC2005CtType As Long, ByVal PeriodFlag As Long,
ByVal UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal NBCC2005PGA As Double, ByVal NBCC2005S02
As Double, ByVal NBCC2005S05 As Double, ByVal NBCC2005S1 As Double,
ByVal NBCC2005S2 As Double, ByVal NBCC2005SiteClass As Long, ByVal
NBCC2005Fa As Double, ByVal NBCC2005Fv As Double, ByVal NBCC2005I
As Double, ByVal NBCC2005Mv As Double, ByVal NBCC2005Rd As Double,
ByVal NBCC2005Ro As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
NBCC2005CtType
This is 0, 1, 2, 3 or 4, indicating the structure type.
0= Steel moment frame
1= Concrete moment frame
2= Other moment frame
3= Braced frame
4= Shear wall
NBCC95DS
This item applies only when the NBCCPFlag = 2. It is the dimension of the lateral
load resisting system in the direction of the applied forces. [L]
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NBCC2005PGA
The peak ground acceleration.
NBCC2005S02
The spectral acceleration at a 0.2 second period.
NBCC2005S05
The spectral acceleration at a 0.52 second period.
NBCC2005S1
The spectral acceleration at a 1 second period.
NBCC2005S2
The spectral acceleration at a 2 second period.
NBCC2005SiteClass
This is 1, 2, 3, 4, 5 or 6, indicating the site class.
1= A
2= B
3= C
4= D
5= E
6= F
NBCC2005Fa
The site coefficient, Fa. This item is read when the site class is F only.
NBCC2005Fv
The site coefficient, Fv. This item is read when the site class is F only.
NBCC2005I
The importance factor.
NBCC2005Mv
The higher mode factor.
NBCC2005Rd
The ductility modifier.
NBCC2005Ro
The overstrength modifier.
Remarks
This function assigns auto seismic loading parameters for the 2005 NBCC
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC2005("EQX",
2, 0.1, 2, 1, 0, False, 0, 0, 0.6, 1.1, 0.7, 0.35, 0.2, 6, 1.8, 2,
1.5, 1.2, 6, 1.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetNBCC2005
SetNBCC95
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNBCC95
VB6 Procedure
Function SetNBCC95(ByVal Name As String, ByVal DirFlag As Long, ByVal
eccen As Double, ByVal NBCCPFlag As Long, ByVal NBCC95DS As Double,
ByVal PeriodFlag As Long, ByVal UserT As Double, ByVal UserZ As Boolean,
ByVal TopZ As Double, ByVal BottomZ As Double, ByVal NBCC95ZA As Long,
ByVal NBCC95ZV As Long, ByVal NBCC95ZVFlag As Long, ByVal
NBCC95ZVR As Double, ByVal NBCC95I As Double, ByVal NBCC95F As
Double, ByVal NBCC95R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
NBCCPFlag
This is either 1 or 2, indicating the structure type.
1 = Moment frame
2 = Other
NBCC95DS
This item applies only when the NBCCPFlag = 2. It is the dimension of the lateral
load resisting system in the direction of the applied forces. [L]
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Code
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NBCC95ZA
This is 0, 1, 2, 3, 4, 5 or 6, indicating the acceleration related zone, Za.
NBCC95ZV
This is 0, 1, 2, 3, 4, 5 or 6, indicating the velocity related zone, Zv.
NBCC95ZVFlag
This is either 1 or 2, indicating how the zonal velocity ratio, V, is specified.
1 = From code based on Zv
2 = User specified
NBCC95ZVR
The zonal velocity ratio, V. This item is used only when NBCC95ZVFlag = 2.
NBCC95I
The importance factor.
NBCC95F
The foundation factor.
NBCC95R
The force modification factor.
Remarks
This function assigns auto seismic loading parameters for the 1995 NBCC
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NBCC95 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNBCC95("EQX", 1,
0.05, 1, 0, 1, 0, False, 0, 0, 4, 5, 1, 0, 1, 1.3, 4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNBCC95
SetNEHRP97
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNEHRP97
VB6 Procedure
Function SetNEHRP97(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT
As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal NEHRP97SG As Long, ByVal NEHRP97SeismicCoeffFlag As
Long, ByVal NEHRP97Site As Long, ByVal NEHRP97SS As Double, ByVal
NEHRP97S1 As Double, ByVal NEHRP97Fa As Double, ByVal NEHRP97Fv As
Double, ByVal NEHRP97R As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NEHRP97SG
This is 1, 2 or 3, indicating the seismic group.
1=I
2 = II
3 = III
NEHRP97SeismicCoeffFlag
This is either 1 or 2, indicating the seismic coefficient option.
1 = Coefficients are per code
2 = Coefficients are user defined
NEHRP97Site
This is 1, 2, 3, 4 or 5, indicating the site class. This item is used only when the
NEHRP97SeismicCoeffFlag = 1.
1= A
2= B
3= C
4= D
5= E
NEHRP97SS
The response acceleration for short periods, (g).
NEHRP97S1
The response acceleration for a one second period, (g).
NEHRP97Fa
The site coefficient Fa. This item is used only when the
NEHRP97SeismicCoeffFlag = 2.
NEHRP97Fv
The site coefficient Fv. This item is used only when the
NEHRP97SeismicCoeffFlag = 2
NEHRP97R
The response modification factor.
Remarks
This function assigns auto seismic loading parameters for the 1997 NEHRP
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicNEHRP97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NEHRP97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNEHRP97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 1, 3, 1, 0.4, 0, 0, 8)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNEHRP97
SetNone
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNone
VB6 Procedure
Function SetNone(ByVal Name As String) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
Remarks
This function sets the auto seismic loading type for the specified load pattern to
None.
The function returns zero if the loading type is successfully assigned; otherwise
it returns a nonzero value.
VBA Example
Sub AssignSeismicNone()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'set auto seismic loading type to None


ret = SapModel.LoadPatterns.AutoSeismic.SetNone("EQX")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNTC2008
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNTC2008
VB6 Procedure
Function SetNTC2008(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal PeriodFlag As Long, ByVal C1Type As Long, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal ParamsOption As Long, ByVal Latitude As Double,
ByVal Longitude As Double, ByVal Island As Long, ByVal LimitState As Long,
ByVal UsageClass As Long, ByVal NomLife As Double, ByVal PeakAccel As
Double, ByVal F0 As Double, ByVal Tcs As Double, ByVal SpecType As Long,
ByVal SoilType As Long, ByVal Topography As Long, ByVal hRatio As Double,
ByVal Damping As Double, ByVal q As Double, ByVal lambda As Double) As
Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CIType
This is 0, 1, 2 or 3, indicating the values of C1. This item applies when the
PeriodFlag item is 1 or 2.
1 = C1 = 0.085 (m)
2 = C1 = 0.075 (m)
3 = C1 = 0.05 (m)
UserT
The user specified time period. This item is meaningful when the PeriodFlag item
is 3. [s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
ParamsOption
This is 1, 2, or 3, indicating the option for defining the parameters.
1 = by latitude and longitude
2 = by island
3 = user specified
Latitude, Longitude
The latitude and longitude for which the seismic coefficients are obtained. These
items are meaningful only when ParamsOption = 1.
Island
This is one of the following values. This item is used only when ParamsOption =
2.
1 = Alicudi
2 = Arcipelago Toscano
3 = Filcudi
4 = Isole Egadi
5 = Lampedusa
6 = Linosa
7 = Lipari
8 = Palmarola
9 = Panarea
10 = Pantelleria
11 = Ponza
12 = Salina
13 = Santo Stefano
14 = Sardegna
15 = Stromboli
16 = Tremiti
17 = Ustica
18 = Ventotene
19 = Vulcano
20 = Zannone
LimitState
This is 1, 2, 3, or 4, indicating the limit state.
1= SLO
2= SLD
3= SLV
4= SLC
UsageClass
This is 1, 2, 3, or 4, indicating the usage class.
1=I
2 = II
3 = III
4 = IV
NomLife
The nominal life to be considered.
PeakAccel
The peak ground acceleration, ag/g.
F0
The magnitude factor, F0.
Tcs
The reference period, Tc* [s].
SpecType
This is 1, 2, 3, or 4, indicating the type of spectrum to consider.
1= Elastic horizontal
2= Elastic vertical
3= Design horizontal
4= Design vertical
SoilType
This is 1, 2, 3, 4, or 5, indicating the subsoil type.
1= A
2= B
3= C
4= D
5= E

Topography
This is 1, 2, 3, or 4, indicating the topography type.
1= T1
2= T2
3= T3
4= T4
hRatio
The ratio for the site altitude at the base of the hill to the height of the hill.
Damping
The damping, in percent. This is only applicable for SpecType 1 and 2.
q
The behavior correction factor. This is only applicable for SpecType 3 and 4.
lambda
A correction factor.
Remarks
This function assigns auto seismic loading parameters for the NTC 2008 code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub AssignSeismicNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX",
eLoadPatternType_QUAKE)

'assign NTC2008 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetNTC2008("EQX", 1,
0.05, 1, 1, 0, False, 0, 0, 3, 0, 0, 1, 1, 1, 50, 0.2, 2.4, 0.3,
3, 2, 1, 1, 5, 1, 0.85)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetNTC2008
SetNZS11702004
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetNZS11702004
VB6 Procedure
Function SetNZS11702004(ByVal Name As String, ByVal DirFlag As Long,
ByVal Eccen As Double, ByVal PeriodFlag As Long, ByVal UserT As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal NZS2004SiteClass As Long, ByVal NZS2004Z As Double, ByVal
NZS2004R As Double, ByVal NZS2004DIST As Double, ByVal NZS2004Sp As
Double, ByVal NZS2004Mu As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
NZS2004SiteClass
This is 1, 2, 3, 4 or 5, indicating the site class.
1= A
2= B
3= C
4= D
5= E
NZS2004Z
The hazard factor, Z.
NZS2004R
The return period factor, R.
NZS2004DIST
Distance to the fault in km, used to calculate the near fault factor.
NZS2004Sp
The structural performance factor, Sp.
NZS2004Mu
The structural ductility factor, u.
Remarks
This function assigns auto seismic loading parameters for the NZS 1170.5 2004
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicNZS11702004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign NZS 1170 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetNZS11702004("EQX", 2, 0.1, 2,
0, False, 0, 0, 3, 0.4, 1.3, 20, 0.7, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
Modified NZS2004N to NZS2004DIST in version 14.1.0.
See Also
GetNZS11702004
SetUBC94
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUBC94
VB6 Procedure
Function SetUBC94(ByVal Name As String, ByVal DirFlag As Long, ByVal Eccen
As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT As
Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal UBC94ZFlag As Long, ByVal UBC94Z As Double, ByVal UBC94S
As Double, ByVal UBC94I As Double, ByVal UBC94RW As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC94ZFlag
This is either 1 or 2, indicating if the seismic zone factor is per code or user
defined.
1 = Per code
2 = User defined
UBC94Z
The seismic zone factor, Z.
If the seismic zone factor is per code (UBC94ZFlag = 1), this item should be
one of the following: 0.075, 0.15, 0.20, 0.30, 0.40.
UBC94S
This is 1, 1.2, 1.5 or 2, indicating the site coefficient.
UBC94I
The importance factor.
UBC94RW
The numerical coefficient, Rw.
Remarks
This function assigns auto seismic loading parameters for the 1994 UBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC94 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC94("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 0.4, 1.2, 1.15, 8)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUBC94
SetUBC97
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUBC97
VB6 Procedure
Function SetUBC97(ByVal Name As String, ByVal DirFlag As Long, ByVal Eccen
As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal UserT As
Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal UBC97SeismicCoeffFlag As Long, ByVal UBC97SoilProfileType
As Long, ByVal UBC97Z As Double, ByVal UBC97Ca As Double, ByVal
UBC97Cv As Double, ByVal UBC97NearSourceFlag As Long, ByVal
UBC97SourceType As Long, ByVal UBC97Dist As Double, ByVal UBC97Na As
Double, ByVal UBC97Nv As Double, ByVal UBC97I As Double, ByVal UBC97R
As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified CT factor. This item applies when the PeriodFlag item is 1 or
2.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC97SeismicCoeffFlag
This is either 1 or 2, indicating if the seismic coefficients Ca and Cv are per
code or user defined.
1 = Per code
2 = User defined
UBC97SoilProfileType
This is 1, 2, 3, 4 or 5, indicating the soil profile type.
1= SA
2= SB
3= SC
4= SD
5= SE

This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with the code (UBC97SeismicCoeffFlag = 1).
UBC97Z
This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with code (UBC97SeismicCoeffFlag = 1).
UBC97Ca
The seismic coefficient, Ca.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2).
UBC97Cv
The seismic coefficient, Cv.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2).
UBC97NearSourceFlag
This is either 1 or 2, indicating if the near source factor coefficients Na and Nv
are per code or user defined.
1 = Per code
2 = User defined

This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with the code (UBC97SeismicCoeffFlag = 1) and
UBC97Z = 0.4.
UBC97SourceType
This is 1, 2 or 3, indicating the seismic source type.
1=A
2=B
3=C

This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with code (UBC97SeismicCoeffFlag = 1), UBC97Z =
0.4, and the near source factor coefficients Na and Nv are calculated in
accordance with code (UBC97NearSourceFlag = 1).
UBC97Dist
This is the distance to the seismic source in kilometers.
This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with code (UBC97SeismicCoeffFlag = 1), UBC97Z =
0.4, and the near source factor coefficients Na and Nv are calculated in
accordance with code (UBC97NearSourceFlag = 1).
UBC97Na
The near source factor coefficient, Na.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2) and the near source factor coefficients
Na and Nv are user defined (UBC97NearSourceFlag = 2).
UBC97Nv
The near source factor coefficient, Nv.
This item is applicable only when the seismic coefficients Ca and Cv are user
defined (UBC97SeismicCoeffFlag = 2) and the near source factor coefficients
Na and Nv are user defined (UBC97NearSourceFlag = 2).
UBC97I
The importance factor.
UBC97R
The overstrength factor.
Remarks
This function assigns auto seismic loading parameters for the 1997 UBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 3, 0.4, 0, 0, 1, 3, 5, 0, 0,
1.15, 6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUBC97
SetUBC97Iso
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUBC97Iso
VB6 Procedure
Function SetUBC97Iso(ByVal Name As String, ByVal DirFlag As Long, ByVal
Eccen As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal UBC97IsoSeismicCoeffFlag As Long, ByVal
UBC97IsoSoilProfileType As Long, ByVal UBC97IsoZ As Double, ByVal
UBC97IsoCv As Double, ByVal UBC97IsoNearSourceFlag As Long, ByVal
UBC97IsoSourceType As Long, ByVal UBC97IsoDist As Double, ByVal
UBC97IsoNv As Double, ByVal UBC97IsoRI As Double, ByVal UBC97IsoBD As
Double, ByVal UBC97IsoKDmax As Double, ByVal UBC97IsoKDmin As Double)
As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
UBC97IsoSeismicCoeffFlag
This is either 1 or 2, indicating if the seismic coefficient Cv is per code or user
defined.
1 = Per code
2 = User defined
UBC97IsoSoilProfileType
This is 1, 2, 3, 4 or 5, indicating the soil profile type.
1= SA
2= SB
3= SC
4= SD
5= SE

This item is applicable only when the seismic coefficients Ca and Cv are
calculated in accordance with code (UBC97SeismicCoeffFlag = 1).
UBC97IsoZ
This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
This item is applicable only when the seismic coefficient Cv is calculated in
accordance with code (UBC97IsoSeismicCoeffFlag = 1).
UBC97IsoCv
The seismic coefficient, Cv.
This item is applicable only when the seismic coefficient Cv is user defined
(UBC97IsoSeismicCoeffFlag = 2).
UBC97IsoNearSourceFlag
This is either 1 or 2, indicating if the near source factor coefficient Nv is per
code or user defined.
1 = Per code
2 = User defined

This item is applicable only when the seismic coefficient Cv is calculated per
code (UBC97IsoSeismicCoeffFlag = 1) and UBC97IsoZ = 0.4.
UBC97IsoSourceType
This is 1, 2 or 3, indicating the seismic source type.
1=A
2=B
3=C

This item is applicable only when the seismic coefficient Cv is calculated in


accordance with code (UBC97IsoSeismicCoeffFlag = 1), UBC97IsoZ = 0.4,
and the near source factor coefficient Nv is calculated in accordance with code
(UBC97IsoNearSourceFlag = 1).
UBC97IsoDist
This is the distance to the seismic source in kilometers.
This item is only applicable when the seismic coefficient Cv is calculated in
accordance with code (UBC97IsoSeismicCoeffFlag = 1), UBC97IsoZ = 0.4,
and the near source factor coefficient Nv is calculated in accordance with code
(UBC97IsoNearSourceFlag = 1).
UBC97IsoNv
The near source factor coefficient, Nv.
This item is applicable only when the seismic coefficient Cv is user defined
(UBC97IsoSeismicCoeffFlag = 2) and the near source factor coefficient Nv is
user defined (UBC97IsoNearSourceFlag = 2).
UBC97IsoRI
The overstrength factor, Ri.
UBC97IsoBD
The coefficient for damping.
UBC97IsoKDmax
The maximum effective stiffness of the isolation system. [F/L]
UBC97IsoKDmin
The minimum effective stiffness of the isolation system. [F/L]
Remarks
This function assigns auto seismic loading parameters for seismically isolated
buildings using the 1997 UBC code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicUBC97Iso()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97Iso parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97Iso("EQX",
1, 0.05, False, 0, 0, 1, 3, 0.4, 0, 1, 3, 5, 0, 2, 1.25, 200, 150)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUBC97Iso
SetUserCoefficient
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUserCoefficient
VB6 Procedure
Function SetUserCoefficient(ByVal Name As String, ByVal DirFlag As Long,
ByVal Eccen As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal c As Double, ByVal k As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is either 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
c
The base shear coefficient.
k
The building height exponent.
Remarks
This function assigns auto seismic loading parameters for User Coefficient type
loading.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicUserCoefficient()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign user coefficient parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetUserCoefficient("EQX", 1,
0.06, False, 0, 0, 0.15, 1.3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUserCoefficient
SetUserLoad
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUserLoad
VB6 Procedure
Function SetUserLoad(ByVal Name As String, ByVal MyType As Long, Optional
ByVal Eccen As Double = 0.05) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
MyType
This is either 1 or 2, indicating the application point type for the user load.
1 = User specified application point
2 = At center of mass with optional additional eccentricity
Eccen
The eccentricity ratio that applies to all diaphragms. This item is only applicable
when MyType = 2.
Remarks
This function sets the auto seismic load type to User Load. User load values are
assigned using the SetUserLoadValue function.
The function returns zero if the load type is successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub AssignSeismicUserLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'set to auto seismic user load


ret = SapModel.LoadPatterns.AutoSeismic.SetUserLoad("EQX",
1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUserLoadValue
GetUserLoad
SetUserLoadValue
Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetUserLoadValue
VB6 Procedure
Function SetUserLoadValue(ByVal Name As String, ByVal Diaph As String,
ByVal Fx As Double, ByVal Fy As Double, ByVal Mz As Double, Optional ByVal x
As Double = 0, Optional ByVal y As Double = 0) As Long
Parameters
Name
The name of an existing Quake-type load pattern that has been assigned a User
Load auto seismic type.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
Fx
The global X direction force assigned to the specified diaphragm. [F]
Fy
The global Y direction force assigned to the specified diaphragm. [F]
Mz
The moment about the global Z axis assigned to the specified diaphragm. [FL]
x
The global X-coordinate of the point where the seismic force is applied. [L]
This item is applicable only when the auto seismic load is specified to have a
user specified application point (see the SetUserLoad function).
y
The global Y-coordinate of the point where the seismic force is applied. [L]
This item is applicable only when the auto seismic load is specified to have a
user specified application point (see the SetUserLoad function).
Remarks
This function assigns loading to an auto seismic load that is a User Load type.
The SetUserLoad function is used to specify that an auto seismic load is a User
Load type
The function returns zero if the loading is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSeismicUserLoadValue()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'set to auto seismic user load


ret = SapModel.LoadPatterns.AutoSeismic.SetUserLoad("EQX",
1)

'set to auto seismic user load values


ret =
SapModel.LoadPatterns.AutoSeismic.SetUserLoadValue("EQX",
"Diaph1", 20, 4, 1000, 0, 0)
ret =
SapModel.LoadPatterns.AutoSeismic.SetUserLoadValue("EQX",
"Diaph2", 40, 8, 2000, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUserLoad
GetUserLoad
GetAPI4F2008_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetAPI4F2008_1
VB6 Procedure
Function GetAPI4F2008_1(ByVal Name As String, ByRef ExposureFrom As
Long, ByRef DirAngle As Double, ByRef UserZ As Boolean, ByRef TopZ As
Double, ByRef BottomZ As Double, ByRef WindSpeed As Double, ByRef
SSLFactor As Double, ByRef ShieldingFactor As Double) As Long
Parameters
Name
The name of an existing Wind-type load case with an API 4F 2008 auto wind
assignment.
ExposureFrom
This is 2, 3, or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified.
It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
ShieldingFactor
The shielding factor.
Remarks
This function retrieves auto wind loading parameters for API 4F 2008.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub GetWindAPI4F2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim SSLFactor As Double
Dim ShieldingFactor As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2008_1("WIND",
3, 0, False, 0, 0,93, 1.1, 0.85)

'get API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.GetAPI4F2008_1("WIND",
ExposureFrom, DirAngle, UserZ, TopZ, BottomZ, WindSpeed,
SSLFactor, ShieldingFactor)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes GetAPI4F2008.
See Also
SetAPI4F2008_1
GetAPI4F2013
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetAPI4F2013
VB6 Procedure
Function GetAPI4F2013(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef WindSpeed As Double, ByRef SSLFactor As
Double, ByRef ShieldingFactor As Double) As Long
Parameters
Name
The name of an existing Wind-type load case with an API 4F 2013 auto wind
assignment.
ExposureFrom
This is 2, 3, or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified.
It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
ShieldingFactor
The shielding factor.
Remarks
This function retrieves auto wind loading parameters for API 4F 2013.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub GetWindAPI4F2013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim SSLFactor As Double
Dim ShieldingFactor As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2013 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2013("WIND", 3,
0, False, 0, 0,93, 1.1, 0.85)

'get API 4F 2013 parameters


ret = SapModel.LoadPatterns.AutoWind.GetAPI4F2013("WIND",
ExposureFrom, DirAngle, UserZ, TopZ, BottomZ, WindSpeed,
SSLFactor, ShieldingFactor)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
SetAPI4F2013
GetASCE702
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetASCE702
VB6 Procedure
Function GetASCE702(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
ASCECase As Long, ByRef ASCEe1 As Double, ByRef ASCEe2 As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef WindSpeed As Double, ByRef ExposureType As Long, ByRef
ImportanceFactor As Double, ByRef Kzt As Double, ByRef GustFactor As
Double, ByRef Kd As Double, ByRef SolidGrossRatio As Double, ByRef
UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an ASCE7-02 auto wind
assignment.
ExposureFrom
This is 1, 2, 3 or 4, indicating the source of the wind exposure.
1= From extents of rigid diaphragms
2= From area objects
3= From frame objects (open structure)
4= From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
ASCECase
This is 1, 2, 3, 4 or 5, indicating the desired case from ASCE7-02 Figure 6-9. 1,
2, 3 and 4 refer to cases 1 through 4 in the figure. 5 means to create all cases.
This item applies only when ExposureFrom = 1.
ASCEe1
This is the value e1 in ASCE7-02 Figure 6-9. This item applies only when
ExposureFrom = 1.
ASCEe2
This is the value e2 in ASCE7-02 Figure 6-9. This item applies only when
ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
Kd
The directionality factor.
SolidGrossRatio
The solid area divided by gross area ratio for open frame structure loading. This
item applies only when the loading is from open structure wind loading
(ExposureFrom = 3 or ExposureFrom = 4).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for ASCE 7-02.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindASCE702()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim ASCECase As Long
Dim ASCEe1 As Double
Dim ASCEe2 As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim Kzt As Double
Dim GustFactor As Double
Dim Kd As Double
Dim SolidGrossRatio As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE702 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE702("WIND", 1,
0, 0.8, 0.5, 2, 0.15, 0.18, False, 0, 0, 80, 3, 1, 1.1, 0.85,
0.88)

'get ASCE702 parameters


ret = SapModel.LoadPatterns.AutoWind.GetASCE702("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, ASCECase, ASCEe1, ASCEe2, UserZ,
TopZ, BottomZ, WindSpeed, ExposureType, ImportanceFactor, Kzt,
GustFactor, Kd, SolidGrossRatio, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetASCE702
GetASCE705
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetASCE705
VB6 Procedure
Function GetASCE705(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
ASCECase As Long, ByRef ASCEe1 As Double, ByRef ASCEe2 As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef WindSpeed As Double, ByRef ExposureType As Long, ByRef
ImportanceFactor As Double, ByRef Kzt As Double, ByRef GustFactor As
Double, ByRef Kd As Double, ByRef SolidGrossRatio As Double, ByRef
UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an ASCE7-05 auto wind
assignment.
ExposureFrom
This is 1, 2, 3 or 4, indicating the source of the wind exposure.
1= From extents of rigid diaphragms
2= From area objects
3= From frame objects (open structure)
4= From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
ASCECase
This is 1, 2, 3, 4 or 5, indicating the desired case from ASCE7-05 Figure 6-9. 1,
2, 3 and 4 refer to cases 1 through 4 in the figure. 5 means to create all cases.
This item applies only when ExposureFrom = 1.
ASCEe1
This is the value e1 in ASCE7-05 Figure 6-9. This item applies only when
ExposureFrom = 1.
ASCEe2
This is the value e2 in ASCE7-05 Figure 6-9. This item applies only when
ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
Kd
The directionality factor.
SolidGrossRatio
The solid area divided by the gross area ratio for open frame structure loading.
This item applies only when the loading is from open structure wind loading
(ExposureFrom = 3 or ExposureFrom = 4).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for ASCE 7-05.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindASCE705()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim ASCECase As Long
Dim ASCEe1 As Double
Dim ASCEe2 As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim Kzt As Double
Dim GustFactor As Double
Dim Kd As Double
Dim SolidGrossRatio As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE705 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE705("WIND", 1,
0, 0.8, 0.5, 2, 0.15, 0.18, False, 0, 0, 80, 3, 1, 1.1, 0.85,
0.88)

'get ASCE705 parameters


ret = SapModel.LoadPatterns.AutoWind.GetASCE705("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, ASCECase, ASCEe1, ASCEe2, UserZ,
TopZ, BottomZ, WindSpeed, ExposureType, ImportanceFactor, Kzt,
GustFactor, Kd, SolidGrossRatio, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetASCE705
GetASCE788
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetASCE788
VB6 Procedure
Function GetASCE788(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef ExposureType As Long, ByRef ImportanceFactor
As Double, ByRef GustFactor As Double, ByRef UserExposure As Boolean) As
Long
Parameters
Name
The name of an existing Wind-type load pattern with an ASCE7-88 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for ASCE 7-88.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindASCE788()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim GustFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85)

'get ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.GetASCE788("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
ExposureType, ImportanceFactor, GustFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetASCE788
GetASCE795
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetASCE795
VB6 Procedure
Function GetASCE795(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef ExposureType As Long, ByRef ImportanceFactor
As Double, ByRef Kzt As Double, ByRef GustFactor As Double, ByRef
UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an ASCE7-95 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for ASCE 7-95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindASCE795()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim Kzt As Double
Dim GustFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE795 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE795("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 1.1, 0.85)

'get ASCE795 parameters


ret = SapModel.LoadPatterns.AutoWind.GetASCE795("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
ExposureType, ImportanceFactor, Kzt, GustFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetASCE795
GetASNZS117022002
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetASNZS117022002
VB6 Procedure
Function GetASNZS117022002(ByVal Name As String, ByRef ExposureFrom
As Long, ByRef DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As
Double, ByRef Ka As Double, ByRef Kc As Double, ByRef Kl As Double,
ByRef Kp As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef WindSpeed As Double, ByRef Cat As Long,
ByRef CycloneRegion As Boolean, ByRef Md As Double, ByRef Ms As
Double, ByRef Mt As Double, ByRef Cdyn As Double, ByRef UserExposure
As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load case with an AS/NZS 1170.2:2002 auto
wind assignment.
ExposureFrom
This is 1, or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
Ka
The area reduction factor, Ka.
Kc
The combination factor, Kc.
Kl
The local pressure factor, Kl.
Kp
The porous cladding factor, Kp.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The regional wind speed, Vr, in m/s.
Cat
This is 1, 2, 3 or 4, indicating the terrain category.
CycloneRegion
This is True or False, indicating if the structure is in a cyclone region.
Md
The directional multiplier, Md.
Ms
The shielding multiplier, Ms.
Mt
The topographic multiplier, Mt.
Cdyn
The dynamic response factor, Cdyn.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for AS/NZS 1170.2:2002.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub GetWindASNZS117022002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim Ka As Double
Dim Kc As Double
Dim Kl As Double
Dim Kp As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim Cat As Long
Dim CycloneRegion As Boolean
Dim Md As Double
Dim Ms As Double
Dim Mt As Double
Dim Cdyn As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign AS/NZS 1170.2:2002 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetASNZS117022002("WIND", 1, 0,
0.8, 0.5, 1, 1, 1, 1, False, 0, 0, 50, 2, False, 1, 1, 1, 1)

'get AS/NZS 1170.2:2002 parameters


ret =
SapModel.LoadPatterns.AutoWind.GetASNZS117022002("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, Ka, Kc, Kl, Kp, UserZ, TopZ,
BottomZ, WindSpeed, Cat, CycloneRegion, Md, Ms, Mt, Cdyn,
UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
SetASNZS117022002
GetBOCA96
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetBOCA96
VB6 Procedure
Function GetBOCA96(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef ExposureType As Long, ByRef ImportanceFactor
As Double, ByRef UserGust As Boolean, ByRef GustFactor As Double, ByRef
UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an BOCA 96 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
UserGust
If this item is True, the gust factor is user defined. If it is False, the gust factor is
determined from the code specified values.
GustFactor
The user defined gust factor. This item applies only when UserGust is True.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for BOCA 96.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim UserGust As Boolean
Dim GustFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoWind.SetBOCA96("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True, False)

'get BOCA96 parameters


ret = SapModel.LoadPatterns.AutoWind.GetBOCA96("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
ExposureType, ImportanceFactor, UserGust, GustFactor,
UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetBOCA96
GetBS639995
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetBS639995
VB6 Procedure
Function GetBS639995(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
Ve As Double, ByRef Ca As Double, ByRef Cr As Double, ByRef UserExposure
As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an BS6399-95 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The front coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The rear coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
Ve
The effective wind speed in meters per second.
Ca
The size effect factor.
Cr
The dynamic augmentation factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for BS6399-95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindBS639995()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim Ve As Double
Dim Ca As Double
Dim Cr As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign BS639995 parameters


ret = SapModel.LoadPatterns.AutoWind.SetBS639995("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 32, 1.1,0.28)

'get BS639995 parameters


ret = SapModel.LoadPatterns.AutoWind.GetBS639995("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, Ve, Ca,
Cr, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetBS639995
GetChinese2010
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetChinese2010
VB6 Procedure
Function GetChinese2010_1(ByVal Name As String, ByRef ExposureFrom As
Long, ByRef DirAngle As Double, ByRef BuildingWidth As Double, ByRef Us As
Double, ByRef UniformTaper As Boolean, ByRef BHoverB0 As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
wzero As Double, ByRef Rt As Long, ByRef PhiZOpt As Long, ByRef T1Opt As
Long, ByRef UserT As Double, ByRef DampRatio As Double, ByRef
UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an Chinese 2010 auto wind
assignment.
ExposureFrom
This is 1 or 2 indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
BuildingWidth
The building width. [L]
Us
The shape coefficient. This item applies only when ExposureFrom = 1.
UniformTaper
This item is True if a correction is to be applied to the wind load for a uniform
taper.
BHoverB0
The taper ratio, Bh/B0. This item applies only when UniformTaper = True.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
wzero
The basic wind pressure in kN/m2.
Rt
This is 1, 2, 3 or 4, indicating the ground roughness.
1=A
2=B
3=C
4=D
PhiZOpt
This is 0 or 1, indicating the Phi Z source.
0 = Modal analysis
1 = Z/H ratio
T1Opt
This is 0 or 1, indicating the T1 source.
0 = Modal analysis
1 = User defined
UserT
This item only applies when the T1 source is user defined (T1Opt = 1). It is the
user defined T1 period. [s]
DampRatio
The damping ratio.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for Chinese 2010.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim BuildingWidth As Double
Dim Us As Double
Dim UniformTaper As Boolean
Dim BHoverB0 As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim wzero As Double
Dim Rt As Long
Dim PhiZOpt As Long
Dim T1Opt As Long
Dim UserT As Double
Dim DampRatio As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)
'assign points to diaphragm
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Chinese2010 parameters


ret = SapModel.LoadPatterns.AutoWind.SetChinese2010("WIND",
1, 0, 1200, 0.5, False, 1, False, 0, 0, 0.48, 3, 1, 1, 0.6, 0.04)

'get Chinese2010 parameters


ret = SapModel.LoadPatterns.AutoWind.GetChinese2010("WIND",
ExposureFrom, DirAngle, BuildingWidth, Us, UniformTaper, BHoverB0,
UserZ, TopZ, BottomZ, wzero, Rt, PhiZOpt, T1Opt, UserT, DampRatio,
UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetChinese2010
GetEurocode12005_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetEurocode12005_1
VB6 Procedure
Function GetEurocode12005_1(ByVal Name As String, ByRef ExposureFrom
As Long, ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As
Double, ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As
Double, ByRef WindSpeed As Double, ByRef Terrain As Long, ByRef
Orography As Double, ByRef k1 As Double, ByRef CsCd As Double, ByRef
Rho As Double, ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with a Eurocode 1 2005 auto
wind assignment.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The basic wind speed, vb, in meters per second.
Terrain
This is 0, 1, 2, 3 or 4, indicating the terrain category.
0= 0
1= I
2= II
3= III
4= IV
Orography
The orography factor, Co.
k1
The turbulence factor, k1.
CsCd
The structural factor, CsCd.
Rho
The air density in kg/m3, Rho.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for Eurocode 1 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindEurocode12005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim Terrain As Long
Dim Orography As Double
Dim k1 As Double
Dim CsCd As Double
Dim Rho As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetEurocode12005_1("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 35, 2, 1, 1, 1)

'get Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.GetEurocode12005_1("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
Terrain, Orography, k1, CsCd, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes GetEurocode12005.
See Also
SetEurocode12005_1
GetExposure_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetExposure_1
VB6 Procedure
Function GetExposure(ByVal Name As String, ByRef Num As Long, ByRef
Diaph() As String, ByRef x() As Double, ByRef y() As Double, ByRef MyWidth()
As Double, ByRef Height() As Double) As Long
Parameters
Name
The name of an existing Wind-type load pattern that has an auto wind load
assigned.
Num
The number of diaphragms at which exposure data is reported.
Diaph
This is an array that includes the names of the diaphragms that have eccentricity
overrides.
x
This is an array that includes the global X-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
y
This is an array that includes the global Y-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
MyWidth
This is an array that includes the exposure width for the wind load applied to the
specified diaphragm. [L]
Height
This is an array that includes the exposure height for the wind load applied to the
specified diaphragm. [L]
Remarks
This function retrieves exposure parameters for auto wind loads determined
from extents of rigid diaphragms. This function does not apply for User-type auto
wind loads.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetWindExposure_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String
Dim x() As Double
Dim y() As Double
Dim MyWidth() As Double
Dim Height() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
'add new load pattern
ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True)

'assign user exposure data


ret = SapModel.LoadPatterns.AutoWind.SetExposure_1("WIND",
"Diaph2", 0, 0, 900, 125)

'get exposure data


ret = SapModel.LoadPatterns.AutoWind.GetExposure_1("WIND",
Num, Diaph, x, y, MyWidth, Height)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
This function supersedes GetExposure.
See Also
SetExposure_1
GetIS8751987
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetIS8751987
VB6 Procedure
Function GetIS8751987(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef Terrain As Long, ByRef Class As Long, ByRef
K1 As Double, ByRef K3 As Double, ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an Indian IS875-1987 auto
wind assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in meters per second.
Terrain
This is 1, 2, 3 or 4, indicating the terrain category.
Class
This is 1, 2 or 3, indicating the terrain category.
1=A
2=B
3=C
K1
The risk coefficient (k1 factor).
K3
The topography factor (k3 factor).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for Indian IS875-1987.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindIS8751987()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim Terrain As Long
Dim Class As Long
Dim K1 As Double
Dim K3 As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign IS8751987 parameters


ret = SapModel.LoadPatterns.AutoWind.SetIS8751987("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 60, 3, 3, 1.1, 1.2)

'get IS8751987 parameters


ret = SapModel.LoadPatterns.AutoWind.GetIS8751987("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
Terrain, Class, K1, K3, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetIS8751987
GetMexican
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetMexican
VB6 Procedure
Function GetMexican(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an Indian IS875-1987 auto
wind assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in meters per second.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves the Mexican auto wind loading parameters.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindMexican()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Mexican parameters


ret = SapModel.LoadPatterns.AutoWind.SetMexican("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 40)

'get Mexican parameters


ret = SapModel.LoadPatterns.AutoWind.GetMexican("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetMexican
GetNBCC2015{Wind Load}
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetNBCC2015
VB6 Procedure
Function GetNBCC2015(ByVal Name As String, ByVal ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByVal
NBCCCase As Long, ByVal e1 As Double, ByVal e2 As Double, ByVal UserZ As
Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByRef q As Double,
ByRef GustFactor As Double, ByVal TopographicFactor As Double, ByRef
ImportanceFactor As Double, ByRef TerrainType As Long, ByRef CeWindward
As Double, ByRef CeLeeward As Double, ByRef UserExposure As Boolean) As
Long
Parameters
Name
The name of an existing Wind-type load pattern with an NBCC 2015 auto wind
assignment..
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
NBCCCase
This is 1, 2, 3, 4, or 5, indicating the desired case from NBCC 2105 Figure A-
4.1.7.9(1). 1,2,3, and 4 refer to cases 1 through 4 in the figure, while 5 means all
cases. This item applies only when ExposureFrom = 1.
e1
This is the value e1 in the NBCC 2015 Figure A-4.1.7.9(1). This item applies
only when ExposureFrom = 1.
e2
This is the value e2 in the NBCC 2015 Figure A-4.1.7.9(1). This item applies
only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor, Cg.
TopographicFactor
The importance factor, Ct.
ImportanceFactor
The importance Factor, Iw.
TerrainType
This is 1, 2, or 3, indicating the terrain type.
1 = Open
2 = Rough
3 = User
CeWindward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
CeLeeward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 2015.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim NBCCCase As Long
Dim e1 As Double
Dim e2 As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim q As Double
Dim GustFactor As Double
Dim ImportanceFactor As Double
Dim TerrainType As Long
Dim CeWindward As Double
Dim CeLeeward As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)
'assign points to diaphragm
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)
'assign NBCC2015 parameters
ret = SapModel.LoadPatterns.AutoWind.SetNBCC2015("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 0.75, 2.1, 1.1, 1, 0, 0)

'get NBCC2015 parameters


ret = SapModel.LoadPatterns.AutoWind.GetNBCC2015("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, Case, e1, e2, UserZ, TopZ,
BottomZ, q, GustFactor, TopographicFactor, ImportanceFactor,
TerrainType, CeWindward, CeLeeward, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
Set NBCC2015
GetNBCC20010_1 {Wind Load}
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetNBCC2010_1
VB6 Procedure
Function GetNBCC2010_1(ByVal Name As String, ByRef ExposureFrom As
Long, ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef q As Double, ByRef GustFactor As Double, ByRef ImportanceFactor As
Double, ByRef TerrainType As Long, ByRef CeWindward As Double, ByRef
CeLeeward As Double, ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an NBCC 2010 auto wind
assignment.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
ImportanceFactor
The importance factor.
TerrainType
This is 1, 2, or 3, indicating the terrain type.
1 = Open
2 = Rough
3 = User
CeWindward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
CeLeeward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 2010.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim q As Double
Dim GustFactor As Double
Dim ImportanceFactor As Double
Dim TerrainType As Long
Dim CeWindward As Double
Dim CeLeeward As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC2010_1("WIND",
1, 0, 0.8, 0.5, False, 0, 0, 0.75, 2.1, 1.1, 1, 0, 0)

'get NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoWind.GetNBCC2010_1("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, q,
GustFactor, ImportanceFactor, TerrainType, CeWindward, CeLeeward,
UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supercedes GetNBCCC2010.
See Also
SetNBCC2010_1
GetNBCC2005
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetNBCC2005
VB6 Procedure
Function GetNBCC2005(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef q
As Double, ByRef GustFactor As Double, ByRef ImportanceFactor As Double,
ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an NBCC 2005 auto wind
assignment.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
ImportanceFactor
The importance factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim q As Double
Dim GustFactor As Double
Dim ImportanceFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC2005("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 0.75, 2.1, 1.1)

'get NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoWind.GetNBCC2005("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, q,
GustFactor, ImportanceFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetNBCC2005
GetNBCC95
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetNBCC95
VB6 Procedure
Function GetNBCC95(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef q
As Double, ByRef GustFactor As Double, ByRef UserExposure As Boolean) As
Long
Parameters
Name
The name of an existing Wind-type load pattern with an NBCC 95 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim q As Double
Dim GustFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC95 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC95("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 0.75, 2.1)

'get NBCC95 parameters


ret = SapModel.LoadPatterns.AutoWind.GetNBCC95("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, q,
GustFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetNBCC95
GetNTC2008
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetNTC2008
VB6 Procedure
Function GetNTC2008(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
Vb As Double, ByRef ExposureCategory As Long, ByRef ct As Double, ByRef
cd As Double, ByRef cp As Double, ByRef UserExposure As Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with an NTC 2008 auto wind
assignment.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
Vb
The wind velocity in m/s.
ExposureCategory
This is 1, 2, 3, 4, or 5, indicating the exposure category.
1= I
2= II
3= III
4= IV
5= V
ct
The topography factor, ct.
cd
The dynamic coefficient, cd.
cp
The shape factor, cp.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NTC 2008.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim Vb As Double
Dim ExposureCategory As Long
Dim ct As Double
Dim cd As Double
Dim cp As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND",
eLoadPatternType_WIND)

'assign NTC2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNTC2008("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 35, 3, 1, 1, 1, False)

'get NTC2008 parameters


ret = SapModel.LoadPatterns.AutoWind.GetNBCC2005("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, Vb,
ExposureCategory, ct, cd, cp , UserExposure )

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetNTC2008
GetUBC94
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetUBC94
VB6 Procedure
Function GetUBC94(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef ExposureType As Long, ByRef ImportanceFactor
As Double, ByRef GustFactor As Double, ByRef UserExposure As Boolean) As
Long
Parameters
Name
The name of an existing Wind-type load pattern with an UBC94 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for 1994 UBC.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign UBC94 parameters


ret = SapModel.LoadPatterns.AutoWind.SetUBC94("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1.15)

'get UBC94 parameters


ret = SapModel.LoadPatterns.AutoWind.GetUBC94("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
ExposureType, ImportanceFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC94
GetUBC97
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetUBC97
VB6 Procedure
Function GetUBC97(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
WindSpeed As Double, ByRef ExposureType As Long, ByRef ImportanceFactor
As Double, ByRef GustFactor As Double, ByRef UserExposure As Boolean) As
Long
Parameters
Name
The name of an existing Wind-type load pattern with an UBC97 auto wind
assignment.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for 1997 UBC.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim ExposureType As Long
Dim ImportanceFactor As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoWind.SetUBC97("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1.15)

'get UBC97 parameters


ret = SapModel.LoadPatterns.AutoWind.GetUBC97("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
ExposureType, ImportanceFactor, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC97
GetUserLoad
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetUserLoad
VB6 Procedure
Function GetUserLoad(ByVal Name As String, ByRef Num As Long, ByRef
Diaph() As String, ByRef Fx() As Double, ByRef Fx() As Double, ByRef Mz() As
Double, ByRef x() As Double, ByRef y() As Double) As Long
Parameters
Name
The name of an existing Wind-type load pattern that has a User-type auto wind
load assigned.
Num
The number of diaphragms at which user wind loads are reported.
Diaph
This is an array that includes the names of the diaphragms that have user wind
loads.
Fx
This is an array that includes the global X direction force assigned to the
specified diaphragm. [F]
Fy
This is an array that includes the global Y direction force assigned to the
specified diaphragm. [F]
Mz
This is an array that includes the moment about the global Z axis assigned to the
specified diaphragm. [FL]
x
This is an array that includes the global X-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
y
This is an array that includes the global Y-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
Remarks
This function retrieves auto wind loading parameters for User-type wind loading.
The function returns zero if the parameters are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub GetWindUser()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String
Dim Fx() As Double
Dim Fy() As Double
Dim Mz() As Double
Dim x() As Double
Dim y() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign user wind load parameters


ret = SapModel.LoadPatterns.AutoWind.SetUserLoad("WIND",
"Diaph1", 100, 20, 5000, 0, 0)
ret = SapModel.LoadPatterns.AutoWind.SetUserLoad("WIND",
"Diaph2", 50, 10, 2500, 0, 0)

'get user wind load parameters


ret = SapModel.LoadPatterns.AutoWind.GetUserLoad("WIND",
Num, Diaph, Fx, Fy, Mz, x, y)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUserLoad
GetSpecialRigidDiaphragmList
SetAPI4F2008_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetAPI4F2008_1
VB6 Procedure
Function SetAPI4F2008_1(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal UserZ As Boolean, ByVal TopZ As
Double, ByVal BottomZ As Double, ByVal WindSpeed As Double, ByVal
SSLFactor As Double, ByVal ShieldingFactor As Double) As Long
Parameters
Name
The name of an existing Wind-type load case.
ExposureFrom
This is 2, 3, or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
ShieldingFactor
The shielding factor.
Remarks
This function assigns auto wind loading parameters for API 4F 2008.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub AssignWindAPI4F2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2008_1("WIND",
3, 0, False, 0, 0, 93, 1.1, 0.85)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes SetAPI4F2008.
See Also
GetAPI4F2008_1
SetAPI4F2013
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetAPI4F2013
VB6 Procedure
Function SetAPI4F2013(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal UserZ As Boolean, ByVal TopZ As Double,
ByVal BottomZ As Double, ByVal WindSpeed As Double, ByVal SSLFactor As
Double, ByVal ShieldingFactor As Double) As Long
Parameters
Name
The name of an existing Wind-type load case.
ExposureFrom
This is 2, 3, or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
ShieldingFactor
The shielding factor.
Remarks
This function assigns auto wind loading parameters for API 4F 2013.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub AssignWindAPI4F2013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2013 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2013("WIND", 3,
0, False, 0, 0, 93, 1.1, 0.85)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
GetAPI4F2013
SetASCE702
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetASCE702
VB6 Procedure
Function SetASCE702(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
ASCECase As Long, ByVal ASCEe1 As Double, ByVal ASCEe2 As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal WindSpeed As Double, ByVal ExposureType As Long, ByVal
ImportanceFactor As Double, ByVal Kzt As Double, ByVal GustFactor As
Double, ByVal Kd As Double, Optional ByVal SolidGrossRatio As Double = 0.2,
Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1, 2, 3 or 4, indicating the source of the wind exposure.
1= From extents of rigid diaphragms
2= From area objects
3= From frame objects (open structure)
4= From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
ASCECase
This is either 1, 2, 3, 4 or 5, indicating the desired case from ASCE7-02 Figure
6-9. 1, 2, 3 and 4 refer to cases 1 through 4 in the figure. 5 means to create all
cases. This item applies only when ExposureFrom = 1.
ASCEe1
This is the value e1 in ASCE7-02 Figure 6-9. This item applies only when
ExposureFrom = 1.
ASCEe2
This is the value e2 in ASCE7-02 Figure 6-9. This item applies only when
ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies pnly when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
Kd
The directionality factor.
SolidGrossRatio
The solid area divided by gross area ratio for open frame structure loading. This
item applies only when the loading is from open structure wind loading
(ExposureFrom = 3 or ExposureFrom = 4).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for ASCE 7-02.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindASCE702()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE702 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE702("WIND", 1,
0, 0.8, 0.5, 2, 0.15, 0.18, False, 0, 0, 80, 3, 1, 1.1, 0.85,
0.88)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetASCE702
SetASCE705
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetASCE705
VB6 Procedure
Function SetASCE705(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
ASCECase As Long, ByVal ASCEe1 As Double, ByVal ASCEe2 As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal WindSpeed As Double, ByVal ExposureType As Long, ByVal
ImportanceFactor As Double, ByVal Kzt As Double, ByVal GustFactor As
Double, ByVal Kd As Double, Optional ByVal SolidGrossRatio As Double = 0.2,
Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1, 2, 3 or 4, indicating the source of the wind exposure.
1= From extents of rigid diaphragms
2= From area objects
3= From frame objects (open structure)
4= From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
ASCECase
This is 1, 2, 3, 4 or 5, indicating the desired case from ASCE7-05 Figure 6-9. 1,
2, 3 and 4 refer to cases 1 through 4 in the figure. 5 means to create all cases.
This item applies only when ExposureFrom = 1.
ASCEe1
This is the value e1 in ASCE7-05 Figure 6-9. This item applies only when
ExposureFrom = 1.
ASCEe2
This is the value e2 in ASCE7-05 Figure 6-9. This item applies only when
ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
Kd
The directionality factor.
SolidGrossRatio
The solid area divided by gross area ratio for open frame structure loading. This
item applies only when the loading is from open structure wind loading
(ExposureFrom = 3 or ExposureFrom = 4).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for ASCE 7-05.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindASCE705()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE705 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE705("WIND", 1,
0, 0.8, 0.5, 2, 0.15, 0.18, False, 0, 0, 80, 3, 1, 1.1, 0.85,
0.88)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetASCE705
SetASCE788
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetASCE788
VB6 Procedure
Function SetASCE788(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal ExposureType As Long, ByVal ImportanceFactor
As Double, ByVal GustFactor As Double, Optional ByVal UserExposure As
Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for ASCE 7-88.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindASCE788()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetASCE788
SetASCE795
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetASCE795
VB6 Procedure
Function SetASCE795(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal ExposureType As Long, ByVal ImportanceFactor
As Double, ByVal Kzt As Double, ByVal GustFactor As Double, Optional ByVal
UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
Kzt
The topographical factor.
GustFactor
The gust factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for ASCE 7-95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindASCE795()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE795 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE795("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 1.1, 0.85)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetASCE795
SetASNZS117022002
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetASNZS117022002
VB6 Procedure
Function SetASNZS117022002(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double,
ByVal Ka As Double, ByVal Kc As Double, ByVal Kl As Double, ByVal Kp As
Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As
Double, ByVal WindSpeed As Double, ByVal Cat As Long, ByVal CycloneRegion
As Boolean, ByVal Md As Double, ByVal Ms As Double, ByVal Mt As Double,
ByVal Cdyn As Double, Optional ByVal UserExposure As Boolean = False) As
Long
Parameters
Name
The name of an existing Wind-type load case.
ExposureFrom
This is 1, or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
Ka
The area reduction factor, Ka.
Kc
The combination factor, Kc.
Kl
The local pressure factor, Kl.
Kp
The porous cladding factor, Kp.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The regional wind speed, Vr, in m/s.
Cat
This is 1, 2, 3 or 4, indicating the terrain category.
CycloneRegion
This is True or False, indicating if the structure is in a cyclone region.
Md
The directional multiplier, Md.
Ms
The shielding multiplier, Ms.
Mt
The topographic multiplier, Mt.
Cdyn
The dynamic response factor, Cdyn.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for AS/NZS 1170.2:2002.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub AssignWindASNZS117022002()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign AS/NZS 1170.2:2002 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetASNZS117022002("WIND", 1, 0,
0.8, 0.5, 1, 1, 1, 1, False, 0, 0, 50, 2, False, 1, 1, 1, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
GetASNZS117022002
SetBOCA96
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetBOCA96
VB6 Procedure
Function SetBOCA96(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal ExposureType As Long, ByVal ImportanceFactor
As Double, ByVal GustFactor As Double, Optional ByVal UserGust As Boolean
= False, Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2, 3 or 4, indicating the exposure category.
1= A
2= B
3= C
4= D
ImportanceFactor
The importance factor.
GustFactor
The user defined gust factor. This item applies only when UserGust is True.
UserGust
If this item is True, the gust factor is user defined. If it is False, the gust factor is
determined from the code specified values.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for BOCA 96.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindBOCA96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoWind.SetBOCA96("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetBOCA96
SetBS639995
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetBS639995
VB6 Procedure
Function SetBS639995(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal Ve
As Double, ByVal Ca As Double, ByVal Cr As Double, Optional ByVal
UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The front coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The rear coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
Ve
The effective wind speed in meters per second.
Ca
The size effect factor.
Cr
The dynamic augmentation factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for BS6399-95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindBS639995()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign BS639995 parameters


ret = SapModel.LoadPatterns.AutoWind.SetBS639995("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 32, 1.1, 0.28)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetBS639995
SetChinese2010
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetChinese2010
VB6 Procedure
Function SetChinese2010(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal BuildingWidth As Double, ByVal Us As
Double, ByVal UniformTaper As Boolean, ByVal BHoverB0 As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
wzero As Double, ByVal Rt As Long, ByVal PhiZOpt As Long, ByVal T1Opt As
Long, ByVal UserT As Double, ByVal DampRatio As Double, Optional ByVal
UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item only applies when ExposureFrom
= 1.
BuildingWidth
The building width. [L]
Us
The shape coefficient. This item applies only when ExposureFrom = 1.
UniformTaper
This item is True if a correction is to be applied to the wind load for a uniform
taper.
BHoverB0
The taper ratio, Bh/B0. This item applies only when UniformTaper = True.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
wzero
The basic wind pressure in kN/m2.
Rt
This is 1, 2, 3 or 4, indicating the ground roughness.
1=A
2=B
3=C
4=D
PhiZOpt
This is 0 or 1, indicating the Phi Z source.
0 = Modal analysis
1 = Z/H ratio
T1Opt
This is 0 or 1, indicating the T1 source.
0 = Modal analysis
1 = User defined
UserT
This item applies only when the T1 source is user defined (T1Opt = 1). It is the
user defined T1 period. [s]
DampRatio
The damping ratio.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for Chinese 2010.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindChinese2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Chinese2010 parameters


ret = SapModel.LoadPatterns.AutoWind.SetChinese2010("WIND",
1, 0, 1200, 0.5, False, 1, False, 0, 0, 0.48, 3, 1, 1, 0.6, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetChinese2010
SetEurocode12005_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetEurocode12005_1
VB6 Procedure
Function SetEurocode12005_1(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal WindSpeed As Double, ByVal Terrain As Long, ByVal Orography As
Double, ByVal k1 As Double, ByVal CsCd As Double, ByVal Rho As Double,
Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The basic wind speed, vb, in meters per second.
Terrain
This is 0, 1, 2, 3 or 4, indicating the terrain category.
0= 0
1= I
2= II
3= III
4= IV
Orography
The orography factor, Co.
k1
The turbulence factor, k1.
CsCd
The structural factor, CsCd.
Rho
The air density in kg/m3, Rho.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for Eurocode 1 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindEurocode12005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetEurocode12005_1("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 35, 2, 1, 1, 1, 1.25)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
This function supercedes SetEurocode12005.
See Also
GetEurocode12005_1
SetExposure_1
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetExposure_1
VB6 Procedure
Function SetExposure(ByVal Name As String, ByVal Diaph As String, ByVal x As
Double, ByVal y As Double, ByVal Width As Double, ByVal Height As Double) As
Long
Parameters
Name
The name of an existing Wind-type load pattern that has an auto wind load
assigned.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
x
The global X-coordinate of the point where the wind force is applied. [L]
y
The global Y-coordinate of the point where the wind force is applied. [L]
Width
The exposure width for the wind load applied to the specified diaphragm. [L]
Height
The exposure height for the wind load applied to the specified diaphragm. [L]
Remarks
This function assigns exposure parameters for auto wind loads determined from
extents of rigid diaphragms. This function does not apply for User-type auto wind
loads.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value. The function returns an error if the auto
wind load is not specified to have user exposure parameters.
VBA Example
Sub AssignWindUserExposure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True)

'assign user exposure data


ret = SapModel.LoadPatterns.AutoWind.SetExposure_1("WIND",
"Diaph2", 0, 0, 900, 124)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetExposure_1
SetIS8751987
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetIS8751987
VB6 Procedure
Function SetIS8751987(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal Terrain As Long, ByVal Class As Long, ByVal K1
As Double, ByVal K3 As Double, Optional ByVal UserExposure As Boolean =
False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in meters per second.
Terrain
This is 1, 2, 3 or 4, indicating the terrain category.
Class
This is 1, 2 or 3, indicating the terrain category.
1=A
2=B
3=C
K1
The risk coefficient (k1 factor).
K3
The topography factor (k3 factor).
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for Indian IS875-1987.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindIS8751987()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign IS8751987 parameters


ret = SapModel.LoadPatterns.AutoWind.SetIS8751987("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 60, 3, 3, 1.1, 1.2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetIS8751987
SetMexican
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetMexican
VB6 Procedure
Function SetMexican(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, Optional ByVal UserExposure As Boolean = False) As
Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in meters per second.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns the Mexican auto wind loading parameters.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindMexican()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Mexican parameters


ret = SapModel.LoadPatterns.AutoWind.SetMexican("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 40)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetMexican
SetNBCC2015 {Wind Load}
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNBCC2015
VB6 Procedure
Function SetNBCC2015(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
NBCCCase As Long, ByVal e1 As Double, ByVal e2 As Double, ByVal UserZ As
Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal q As Double,
ByVal GustFactor As Double, ByVal TopographicFactor As Double, ByVal
ImportanceFactor As Double, ByVal TerrainType As Long, ByVal CeWindward
As Double, ByVal CeLeeward As Double, Optional ByVal UserExposure As
Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
NBCCCase
This is 1, 2, 3, 4, or 5, indicating the desired case from NBCC 2105 Figure A-
4.1.7.9(1). 1,2,3, and 4 refer to cases 1 through 4 in the figure, while 5 means all
cases. This item applies only when ExposureFrom = 1.
e1
This is the value e1 in the NBCC 2015 Figure A-4.1.7.9(1). This item applies
only when ExposureFrom = 1.
e2
This is the value e2 in the NBCC 2015 Figure A-4.1.7.9(1). This item applies
only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor, Cg.
ImportanceFactor
The importance factor, Ct.
ImportanceFactor
The importance Factor, Iw.
TerrainType
This is 1, 2, or 3, indicating the terrain type.
1 = Open
2 = Rough
3 = User
CeWindward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
CeLeeward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 2015.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNBCC2015()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC2015 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC2015("WIND", 1,
0, 0.8, 0.5, 2, 0.15, 0.18, False, 0, 0, 0.75, 2.1, 1.1, 1.1, 1,
0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
Get NBCC2015
SetNBCC2010_1 {Wind Load}
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNBCC2010_1
VB6 Procedure
Function SetNBCC2010_1(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal q As Double, ByVal GustFactor As Double, ByVal ImportanceFactor As
Double, ByVal TerrainType As Long, ByVal CeWindward As Double, ByVal
CeLeeward As Double, Optional ByVal UserExposure As Boolean = False) As
Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
ImportanceFactor
The importance factor.
TerrainType
This is 1, 2, or 3, indicating the terrain type.
1 = Open
2 = Rough
3 = User
CeWindward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
CeLeeward
The windward exposure factor, Ce. This item applies only when TerrainType = 3.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NBCC 2010.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindNBCC2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC2010 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC2010_1("WIND",
1, 0, 0.8, 0.5, False, 0, 0, 0.75, 2.1, 1.1, 1, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
This function supercedes SetNBCCC2010.
See Also
GetNBCC2010_1
SetNBCC2005
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNBCC2005
VB6 Procedure
Function SetNBCC2005(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal q
As Double, ByVal GustFactor As Double, ByVal ImportanceFactor As Double,
Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
ImportanceFactor
The importance factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for NBCC 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindNBCC2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC2005 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC2005("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 0.75, 2.1, 1.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetNBCC2005
SetNBCC95
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNBCC95
VB6 Procedure
Function SetNBCC95(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal q
As Double, ByVal GustFactor As Double, Optional ByVal UserExposure As
Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
q
The velocity pressure in kPa.
GustFactor
The gust effect factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for NBCC 95.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindNBCC95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign NBCC95 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNBCC95("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 0.75, 2.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetNBCC95
SetNTC2008
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNTC2008
VB6 Procedure
Function SetNTC2008(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double, ByRef
UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double, ByRef
Vb As Double, ByRef ExposureCategory As Long, ByRef ct As Double, ByRef
cd As Double, ByRef cp As Double, ByRef UserExposure As Boolean = False)
As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
Vb
The wind velocity in m/s.
ExposureCategory
This is 1, 2, 3, 4, or 5, indicating the exposure category.
1= I
2= II
3= III
4= IV
5= V
ct
The topography factor, ct.
cd
The dynamic coefficient, cd.
cp
The shape factor, cp.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for NTC 2008.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindNTC2008()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND",
eLoadPatternType_WIND)

'assign NTC2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetNTC2008("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 35, 3, 1, 1, 1, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetNTC2008
SetUBC94
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetUBC94
VB6 Procedure
Function SetUBC94(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal ExposureType As Long, ByVal ImportanceFactor
As Double, Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cq. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cq. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for 1994 UBC.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindUBC94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign UBC94 parameters


ret = SapModel.LoadPatterns.AutoWind.SetUBC94("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1.15)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUBC94
SetNone
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetNone
VB6 Procedure
Function SetNone(ByVal Name As String) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
Remarks
This function set the auto wind loading type for the specified load pattern to
None.
The function returns zero if the loading type is successfully assigned; otherwise
it returns a nonzero value.
VBA Example
Sub AssignWindNone()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85)

'set auto wind loading type to None


ret = SapModel.LoadPatterns.AutoWind.SetNone("WIND")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetUBC97
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetUBC97
VB6 Procedure
Function SetUBC97(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double, ByVal
UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double, ByVal
WindSpeed As Double, ByVal ExposureType As Long, ByVal ImportanceFactor
As Double, Optional ByVal UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is either 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cq. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cq. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The wind speed in miles per hour.
ExposureType
This is 1, 2 or 3, indicating the exposure category.
1=B
2=C
3=D
ImportanceFactor
The importance factor.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for 1997 UBC.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoWind.SetUBC97("WIND", 1, 0,
0.8, 0.5, False, 0, 0, 80, 3, 1.15)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUBC97
SetUserLoad
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetUserLoad
VB6 Procedure
Function SetUserLoad(ByVal Name As String, ByVal Diaph As String, ByVal Fx
As Double, ByVal Fy As Double, ByVal Mz As Double, ByVal x As Double, ByVal
y As Double) As Long
Parameters
Name
The name of an existing Wind-type load pattern that has an auto wind load
assigned.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
Fx
The global X direction force assigned to the specified diaphragm. [F]
Fy
The global Y direction force assigned to the specified diaphragm. [F]
Mz
The moment about the global Z axis assigned to the specified diaphragm. [FL]
x
The global X-coordinate of the point where the wind force is applied. [L]
y
The global Y-coordinate of the point where the wind force is applied. [L]
Remarks
This function assigns auto wind loading parameters for User-type wind loads.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindUserLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign user wind load parameters


ret = SapModel.LoadPatterns.AutoWind.SetUserLoad("WIND",
"Diaph1", 100, 20, 5000, 0, 0)
ret = SapModel.LoadPatterns.AutoWind.SetUserLoad("WIND",
"Diaph2", 50, 10, 2500, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetUserLoad
GetSpecialRigidDiaphragmList
GetAuto
Syntax
SapObject.SapModel.LoadPatterns.AutoSeastate.GetAuto
VB6 Procedure
Function GetAuto(ByVal Name As String, ByRef LoadMethod As Long, ByRef
CSys As String, ByRef AdjustGravityLat As Boolean, ByRef
AdjustGravityLatFactor As Double, ByRef AdjustGravityVert As Boolean, ByRef
AdjustGravityVertFactor As Double, ByRef CenterRotation() As Double, ByRef
Parameters() As Double, ByRef IgnorePhase As Boolean) As Long
Parameters
Name
The name of an existing seastate-type load pattern.
LoadMethod
This is one of the following three options defining what parameters are being
specified.
1 = Rotation / Translations Vertical Input
2 = Rotations / Translations Full Input
3 = Accelerations / Velocities
CSys
The coordinate system used as a reference for specifying the center of rotation
location and the inertia load parameters.
AdjustGravityLat
This item only applies when using LoadMethod 1 or 2. It is True if generated
lateral loads should include the effects of the rotated structure, otherwise it is
False.
AdjustGravityLatFactor
This item only applies when using LoadMethod 1 or 2. This is a scale factor on
the lateral effects generated as a result of the rotated structure.
AdjustGravityVert
This item only applies when using LoadMethod 1 or 2. It is True if generated
vetical loads should include the effects of the rotated structure, otherwise it is
False.
AdjustGravityVertFactor
This item only applies when using LoadMethod 1 or 2. This is a scale factor on
the vertical effects generated as a result of the rotated structure.
CenterRotation
This is an array dimensioned to 2 (3 doubles) that defines the coordinates of the
center of rotation, with respect to the selected coordinate system.
Parameters
This is an array of the inertia load parameters, based on the specified
LoadMethod, as described below.
If LoadMethod = 1, the following 9 parameters should be input:
Parameters(0) - UZ amplitude
Parameters(1) - UZ period
Parameters(2) - UZ phase
Parameters(3) - RX amplitude
Parameters(4) - RX period
Parameters(5) - RX phase
Parameters(6) - RY amplitude
Parameters(7) - RY period
Parameters(8) - RY phase
If the LoadMethod = 2, the following 18 parameters should be input:
Parameters(0) - UX amplitude
Parameters(1) - UX period
Parameters(2) - UX phase
Parameters(3) - UY amplitude
Parameters(4) - UY period
Parameters(5) - UY phase
Parameters(6) - UZ amplitude
Parameters(7) - UZ period
Parameters(8) - UZ phase
Parameters(9) - RX amplitude
Parameters(10) - RX period
Parameters(11) - RX phase
Parameters(12) - RY amplitude
Parameters(13) - RY period
Parameters(14) - RY phase
Parameters(15) - RZ amplitude
Parameters(16) - RZ period
Parameters(17) - RZ phase
If the LoadMethod = 3, the following 9 parameters should be input:
Parameters(0) - UX amplitude
Parameters(1) - UY period
Parameters(2) - UZ phase
Parameters(3) - RX amplitude
Parameters(4) - RY period
Parameters(5) - RZ phase
Parameters(6) - RX amplitude
Parameters(7) - RY period
Parameters(8) - RZ phase
Ignore Phase
This item only applies when using LoadMethod 1 or 2. It is True if the input
phases should be ignored, otherwise it is False.
Remarks
This function retrieves auto seastate loading parameters.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAutoSeastate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyCenter(2) As Double
Dim MyParams(8) As Double
Dim LoadMethod As Long
Dim CSys As String
Dim AdjustGravityLat As Boolean
Dim LatScaleFactor As Double
Dim AdjustGravityVert As Boolean
Dim VertScaleFactor As Double
Dim Center() As Double
Dim Params() As Double
Dim IgnorePhase As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'add new load pattern


ret = SapModel.LoadPatterns.Add("SEASTATE", LTYPE_SEASTATE)

'assign seastate parameters


MyCenter(0) = 0
MyCenter(1) = 0
MyCenter(2) = 0
MyParams(0) = 0
MyParams(1) = 0
MyParams(2) = 0
MyParams(3) = 0.5
MyParams(4) = 0
MyParams(5) = 0
MyParams(6) = 0
MyParams(7) = 0
MyParams(8) = 0
ret = SapModel.LoadPatterns.AutoSeastate.SetAuto("SEASTATE",
3, "Global", True, 1, True, 1, MyCenter, MyParms, False)

'get seastate parameters


ret = SapModel.LoadPatterns.AutoSeastate.GetAuto("SEASTATE",
LoadMethod, CSys, AdjustGravityLat, LatScaleFactor,
AdjustGravityVert, VertScaleFactor, Center, Params, IgnorePhase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
SetAuto
SetAuto
Syntax
SapObject.SapModel.LoadPatterns.AutoSeastate.SetAuto
VB6 Procedure
Function SetAuto(ByVal Name As String, ByVal LoadMethod As Long, ByVal
CSys As String, ByVal Adjust Gravity As Boolean, ByVal CenterRotation() As
Double, ByVal Parameters() As Double,ByVal IgnorePhase As Boolean) As
Long
Parameters
Name
The name of an existing seastate-type load pattern.
LoadMethod
This is one of the following three options defining what parameters are being
specified.
1 = Rotation / Translations Vertical Input
2 = Rotations / Translations Full Input
3 = Accelerations / Velocities
CSys
The coordinate system used as a reference for specifying the center of rotation
location and the inertia load parameters.
AdjustGravityLat
This item only applies when using LoadMethod 1 or 2. It is True if generated
lateral loads should include the effects of the rotated structure, otherwise it is
False.
AdjustGravityLatFactor
This item only applies when using LoadMethod 1 or 2. This is a scale factor on
the lateral effects generated as a result of the rotated structure.
AdjustGravityVert
This item only applies when using LoadMethod 1 or 2. It is True if generated
vetical loads should include the effects of the rotated structure, otherwise it is
False.
AdjustGravityVertFactor
This item only applies when using LoadMethod 1 or 2. This is a scale factor on
the vertical effects generated as a result of the rotated structure.
CenterRotation
This is an array dimensioned to 2 (3 doubles) that defines the coordinates of the
center of rotation, with respect to the selected coordinate system.
Parameters
This is an array of the inertia load parameters, based on the specified
LoadMethod, as described below.
If LoadMethod = 1, the following 9 parameters should be input:
Parameters(0) - UZ amplitude
Parameters(1) - UZ period
Parameters(2) - UZ phase
Parameters(3) - RX amplitude
Parameters(4) - RX period
Parameters(5) - RX phase
Parameters(6) - RY amplitude
Parameters(7) - RY period
Parameters(8) - RY phase
If the LoadMethod = 2, the following 18 parameters should be input:
Parameters(0) - UX amplitude
Parameters(1) - UX period
Parameters(2) - UX phase
Parameters(3) - UY amplitude
Parameters(4) - UY period
Parameters(5) - UY phase
Parameters(6) - UZ amplitude
Parameters(7) - UZ period
Parameters(8) - UZ phase
Parameters(9) - RX amplitude
Parameters(10) - RX period
Parameters(11) - RX phase
Parameters(12) - RY amplitude
Parameters(13) - RY period
Parameters(14) - RY phase
Parameters(15) - RZ amplitude
Parameters(16) - RZ period
Parameters(17) - RZ phase
If the LoadMethod = 3, the following 9 parameters should be input:
Parameters(0) - UX amplitude
Parameters(1) - UY period
Parameters(2) - UZ phase
Parameters(3) - RX amplitude
Parameters(4) - RY period
Parameters(5) - RZ phase
Parameters(6) - RX amplitude
Parameters(7) - RY period
Parameters(8) - RZ phase
IgnorePhase
This item only applies when using LoadMethod 1 or 2. It is True if the input
phases should be ignored, otherwise it is False.
Remarks
This function retrieves auto seastate loading parameters.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub SetAutoSeastate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyCenter(2) As Double
Dim MyParams(8) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'add new load pattern


ret = SapModel.LoadPatterns.Add("SEASTATE", LTYPE_SEASTATE)

'assign seastate parameters


MyCenter(0) = 0
MyCenter(1) = 0
MyCenter(2) = 0
MyParams(0) = 0
MyParams(1) = 0
MyParams(2) = 0
MyParams(3) = 0.5
MyParams(4) = 0
MyParams(5) = 0
MyParams(6) = 0
MyParams(7) = 0
MyParams(8) = 0
ret = SapModel.LoadPatterns.AutoSeastate.SetAuto("SEASTATE",
3, "Global", True, 1, True, 1, MyCenter, MyParms, False)

'get seastate parameters


ret = SapModel.LoadPatterns.AutoSeastate.GetAuto("SEASTATE",
LoadMethod, CSys, AdjustGravity, Center, Params)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
GetAuto
SetNone
Syntax
SapObject.SapModel.LoadPatterns.AutoSeastate.SetNone
VB6 Procedure
Function SetNone(ByVal Name As String) As Long
Parameters
Name
The name of an existing seastate-type load pattern.
Remarks
This function sets the auto seastate loading type for the specified load pattern to
None.
The function returns zero if the loading type is successfully assigned; otherwise
it returns a nonzero vale.
VBA Example
Sub AssignSeastateNone()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyCenter(2) As Double
Dim MyParams(8) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SaModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2)
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearsSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObject.SetConstraint("", Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("SEASTATE", LTYPE_SEASTATE)
'assign seastate parameters
MyCenter(0) = 0
MyCenter(1) = 0
MyCenter(2) = 0
MyParams(0) = 0
MyParams(1) = 0
MyParams(2) = 0
MyParams(3) = 0.5
MyParams(4) = 0
MyParams(5) = 0
MyParams(6) = 0
MyParams(7) = 0
MyParams(8) = 0
ret = SapModel.LoadPatterns.AutoSeastate.SetAuto("SEASTATE",
3, "Global", True, MyCenter, MyParms)

'set auto seastate loading type to None


ret = SapModel.LoadPatterns.AutoSWind.SetNone("SEASTATE")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
Add
Syntax
SapObject.SapModel.LoadPatterns.Add
VB6 Procedure
Function Add(ByVal Name As String, ByVal MyType As eLoadPatternType,
Optional ByVal SelfWTMultiplier As Double = 0, Optional ByVal AddLoadCase
As Boolean = True) As Long
Parameters
Name
The name for the new load pattern.
MyType
This is one of the following items in the eLoadPatternType enumeration:
LTYPE_DEAD = 1
LTYPE_SUPERDEAD = 2
LTYPE_LIVE = 3
LTYPE_REDUCELIVE = 4
LTYPE_QUAKE = 5
LTYPE_WIND= 6
LTYPE_SNOW = 7
LTYPE_OTHER = 8
LTYPE_MOVE = 9
LTYPE_TEMPERATURE = 10
LTYPE_ROOFLIVE = 11
LTYPE_NOTIONAL = 12
LTYPE_PATTERNLIVE = 13
LTYPE_WAVE= 14
LTYPE_BRAKING = 15
LTYPE_CENTRIFUGAL = 16
LTYPE_FRICTION = 17
LTYPE_ICE = 18
LTYPE_WINDONLIVELOAD = 19
LTYPE_HORIZONTALEARTHPRESSURE = 20
LTYPE_VERTICALEARTHPRESSURE = 21
LTYPE_EARTHSURCHARGE = 22
LTYPE_DOWNDRAG = 23
LTYPE_VEHICLECOLLISION = 24
LTYPE_VESSELCOLLISION = 25
LTYPE_TEMPERATUREGRADIENT = 26
LTYPE_SETTLEMENT = 27
LTYPE_SHRINKAGE = 28
LTYPE_CREEP = 29
LTYPE_WATERLOADPRESSURE = 30
LTYPE_LIVELOADSURCHARGE = 31
LTYPE_LOCKEDINFORCES = 32
LTYPE_PEDESTRIANLL = 33
LTYPE_PRESTRESS = 34
LTYPE_HYPERSTATIC = 35
LTYPE_BOUYANCY = 36
LTYPE_STREAMFLOW = 37
LTYPE_IMPACT = 38
LTYPE_CONSTRUCTION = 39
SelfWTMultiplier
The self weight multiplier for the new load pattern.
AddLoadCase
If this item is True, a linear static load case corresponding to the new load
pattern is added.
Remarks
This function adds a new load pattern.
The function returns 0 if the load pattern is successfully added; otherwise it
returns nonzero. An error is returned if the Name item is already used for an
existing load pattern.
VBA Example
Sub AddNewLoadPattern()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberAreas As Long
Dim AreaName() As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added three items to the eLoadPatternType enumeration in version 12.00.
See Also
ChangeName
Syntax
SapObject.SapModel.LoadPatterns.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The name of a defined load pattern.
NewName
The new name for the load pattern.
Remarks
This function applies a new name to a load pattern.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeLoadPatternName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'change name
ret = SapModel.LoadPatterns.ChangeName("DEAD", "DL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.LoadPatterns.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
The function returns the number of defined load patterns.
VBA Example
Sub CountLoadPatterns()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get number of defined load patterns


ret = SapModel.LoadPatterns.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.LoadPatterns.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing load pattern.
Remarks
The function deletes the specified load pattern.
The function returns zero if the load pattern is successfully deleted, otherwise it
returns a nonzero value.
The load pattern is not deleted and the function returns an error if the load
pattern is assigned to an load case or if it is the only defined load pattern.
VBA Example
Sub DeleteLoadPattern()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete load case


'Note: ret in the above line returns 1, indicating an error.
'This is the case because the load pattern DEAD is assigned to
'load case DEAD. This is also the case because the load
'case DEAD is the only load pattern defined.
ret = SapModel.LoadPatterns.Delete("DEAD")

'Note: ret in the above line returns 1, indicating an error.


This is the case because the load pattern DEAD is assigned to load
case DEAD. This is also the case because the load pattern DEAD is
the only load pattern defined.

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetAutoSeismicCode
Syntax
SapObject.SapModel.LoadPatterns.GetAutoSeismicCode
VB6 Procedure
Function GetAutoSeismicCode(ByVal Name As String, ByRef CodeName As
String) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
MyType
This is either blank or the name code used for the auto seismic parameters.
Blank means no auto seismic load is specified for the Quake-type load pattern.
Remarks
This function retrieves the code name used for auto seismic parameters in
Quake-type load patterns.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value. An error is returned if the specified load pattern is not a
Quake-type load pattern.
VBA Example
Sub GetAutoSeismicType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CodeName As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign BOCA96 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetBOCA96("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 0.4, 0.4, 1.5, 8)

'get auto seismic code


ret = SapModel.LoadPatterns.GetAutoSeismicCode("EQX",
CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetAutoWindCode
GetAutoWaveCode
GetAutoWaveCode
Syntax
SapObject.SapModel.LoadPatterns.GetAutoWaveCode
VB6 Procedure
Function GetAutoWaveCode(ByVal Name As String, ByRef CodeName As
String) As Long
Parameters
Name
The name of an existing Wave-type load pattern.
MyType
This is either blank or the name code used for the auto wave parameters. Blank
means no auto wave load is specified for the Wave-type load pattern.
Remarks
This function retrieves the code name used for auto wave parameters in Wave-
type load patterns.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value. An error is returned if the specified load pattern is not a
Wave-type load pattern.
VBA Example
Sub GetAutoWaveType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CodeName As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("WAVE", LTYPE_WAVE)

'get auto wave code


ret = SapModel.LoadPatterns.GetAutoWaveCode("WAVE",
CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetAutoSeismicCode
GetAutoWindCode
GetAutoWindCode
Syntax
SapObject.SapModel.LoadPatterns.GetAutoWindCode
VB6 Procedure
Function GetAutoWindCode(ByVal Name As String, ByRef CodeName As
String) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
MyType
This is either blank or the name code used for the auto wind parameters. Blank
means no auto wind load is specified for the Wind-type load pattern.
Remarks
This function retrieves the code name used for auto wind parameters in Wind-
type load patterns.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value. An error is returned if the specified load pattern is not a
Wind-type load pattern.
VBA Example
Sub GetAutoWindType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CodeName As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'get auto wind code


ret = SapModel.LoadPatterns.GetAutoWindCode("WIND",
CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetAutoSeismicCode
GetAutoWaveCode
GetLoadType
Syntax
SapObject.SapModel.LoadPatterns.GetLoadType
VB6 Procedure
Function GetLoadType(ByVal Name As String, ByRef MyType As
eLoadPatternType) As Long
Parameters
Name
The name of an existing load pattern.
MyType
This is one of the following items in the eLoadPatternType enumeration:
LTYPE_DEAD = 1
LTYPE_SUPERDEAD = 2
LTYPE_LIVE = 3
LTYPE_REDUCELIVE = 4
LTYPE_QUAKE = 5
LTYPE_WIND= 6
LTYPE_SNOW = 7
LTYPE_OTHER = 8
LTYPE_MOVE = 9
LTYPE_TEMPERATURE = 10
LTYPE_ROOFLIVE = 11
LTYPE_NOTIONAL = 12
LTYPE_PATTERNLIVE = 13
LTYPE_WAVE= 14
LTYPE_BRAKING = 15
LTYPE_CENTRIFUGAL = 16
LTYPE_FRICTION = 17
LTYPE_ICE = 18
LTYPE_WINDONLIVELOAD = 19
LTYPE_HORIZONTALEARTHPRESSURE = 20
LTYPE_VERTICALEARTHPRESSURE = 21
LTYPE_EARTHSURCHARGE = 22
LTYPE_DOWNDRAG = 23
LTYPE_VEHICLECOLLISION = 24
LTYPE_VESSELCOLLISION = 25
LTYPE_TEMPERATUREGRADIENT = 26
LTYPE_SETTLEMENT = 27
LTYPE_SHRINKAGE = 28
LTYPE_CREEP = 29
LTYPE_WATERLOADPRESSURE = 30
LTYPE_LIVELOADSURCHARGE = 31
LTYPE_LOCKEDINFORCES = 32
LTYPE_PEDESTRIANLL = 33
LTYPE_PRESTRESS = 34
LTYPE_HYPERSTATIC = 35
LTYPE_BOUYANCY = 36
LTYPE_STREAMFLOW = 37
LTYPE_IMPACT = 38
LTYPE_CONSTRUCTION = 39
Remarks
This function retrieves the load type for a specified load pattern.
The function returns zero if the load type is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLoadPatternType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As eLoadPatternType

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get load pattern type


ret = SapModel.LoadPatterns.GetLoadType("DEAD", MyType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added three items to the eLoadPatternType enumeration in version 12.00.
See Also
SetLoadType
GetNameList
Syntax
SapObject.SapModel.LoadPatterns.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of load pattern names retrieved by the program.
MyName
This is a one-dimensional array of load pattern names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined load cases.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetLoadPatternNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get load pattern names


ret = SapModel.LoadPatterns.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSelfWtMultiplier
Syntax
SapObject.SapModel.LoadPatterns.GetSelfWtMultiplier
VB6 Procedure
Function GetSelfWtMultiplier(ByVal Name As String, ByRef SelfWTMultiplier As
Double) As Long
Parameters
Name
The name of an existing load pattern.
SelfWTMultiplier
The self weight multiplier for the specified load pattern.
Remarks
This function retrieves the self weight multiplier for a specified load pattern.
The function returns zero if the multiplier is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSelfWeightMultiplier()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SelfWTMultiplier As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get self weight multiplier


ret = SapModel.LoadPatterns.GetSelfWtMultiplier("DEAD",
SelfWTMultiplier)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetSelfWtMultiplier
SetLoadType
Syntax
SapObject.SapModel.LoadPatterns.SetLoadType
VB6 Procedure
Function SetLoadType(ByVal Name As String, ByVal MyType As
eLoadPatternType) As Long
Parameters
Name
The name of an existing load pattern.
MyType
This is one of the following items in the eLoadPatternType enumeration:
LTYPE_DEAD = 1
LTYPE_SUPERDEAD = 2
LTYPE_LIVE = 3
LTYPE_REDUCELIVE = 4
LTYPE_QUAKE = 5
LTYPE_WIND= 6
LTYPE_SNOW = 7
LTYPE_OTHER = 8
LTYPE_MOVE = 9
LTYPE_TEMPERATURE = 10
LTYPE_ROOFLIVE = 11
LTYPE_NOTIONAL = 12
LTYPE_PATTERNLIVE = 13
LTYPE_WAVE= 14
LTYPE_BRAKING = 15
LTYPE_CENTRIFUGAL = 16
LTYPE_FRICTION = 17
LTYPE_ICE = 18
LTYPE_WINDONLIVELOAD = 19
LTYPE_HORIZONTALEARTHPRESSURE = 20
LTYPE_VERTICALEARTHPRESSURE = 21
LTYPE_EARTHSURCHARGE = 22
LTYPE_DOWNDRAG = 23
LTYPE_VEHICLECOLLISION = 24
LTYPE_VESSELCOLLISION = 25
LTYPE_TEMPERATUREGRADIENT = 26
LTYPE_SETTLEMENT = 27
LTYPE_SHRINKAGE = 28
LTYPE_CREEP = 29
LTYPE_WATERLOADPRESSURE = 30
LTYPE_LIVELOADSURCHARGE = 31
LTYPE_LOCKEDINFORCES = 32
LTYPE_PEDESTRIANLL = 33
LTYPE_PRESTRESS = 34
LTYPE_HYPERSTATIC = 35
LTYPE_BOUYANCY = 36
LTYPE_STREAMFLOW = 37
LTYPE_IMPACT = 38
LTYPE_CONSTRUCTION = 39
Remarks
This function assigns a load type to a load pattern.
The function returns zero if the load type is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignLoadType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign load type


ret = SapModel.LoadPatterns.SetLoadType("DEAD",
LTYPE_SUPERDEAD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added three items to the eLoadPatternType enumeration in version 12.00.
See Also
GetLoadType
SetSelfWtMultiplier
Syntax
SapObject.SapModel.LoadPatterns.SetSelfWtMultiplier
VB6 Procedure
Function SetSelfWtMultiplier(ByVal Name As String, ByVal SelfWTMultiplier As
Double) As Long
Parameters
Name
The name of an existing load pattern.
SelfWTMultiplier
The self weight multiplier for the specified load pattern.
Remarks
This function assigns a self weight multiplier to a load case.
The function returns zero if the multiplier is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSelfWeightMultiplier()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign self weight multiplier


ret = SapModel.LoadPatterns.SetSelfWtMultiplier("DEAD", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSelfWtMultiplier
Change Name {Mass Source}
Syntax
SapObject.SapModel.SourceMass.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The name of an existing mass source.
NewName
The new name for the mass source.
Remarks
This function changes the name of an existing mass source.
The function returns zero if the mass source is successfully changed, otherwise
it returns a nonzero value. If the new name already exists, a nonzero value is
returned and the mass source name is not changed.
VBA Example
Sub ChangeMassSourceName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'change mass source name from MSSSRC1 to MyMassSource


ret = SapModel.SourceMass.ChangeName("MSSSRC1",
"MyMassSource")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0..
See Also
Count {Mass Source}
Syntax
SapObject.SapModel.SourceMass.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the number of defined mass sources.
VBA Example
Sub CountMassSources()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim LoadPat(0) As String
Dim SF(0) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add a new mass source and make it the default mass sourc
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'get mass source count


Count = SapModel.SourceMass.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Delete {Mass Source}
Syntax
SapObject.SapModel.SourceMass.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of the mass source to be deleted.
Remarks
This function deletes an existing mass source.
The function returns zero if the mass source is successfully deleted; otherwise it
returns a nonzero value. If the mass source to be deleted is the default mass
source, a nonzero value is returned and th mass source is not deleted.
VBA Example
Sub DeleteMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim LoadPat(0) As String
Dim SF(0) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)
'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'delete mass source MSSSRC1


ret = SapModel.SourceMass.Delete("MSSSRC1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Get Default {Mass Source}
Syntax
SapObject.SapModel.SourceMass.GetDefault
VB6 Procedure
Function GetDefault(ByRef Name As String) As Long
Parameters
Name
The name of the default mass source.
Remarks
This function retrieves the default mass source.
The function returns zero if the default mass source is successfully retrieved,
otherwise it returns nonzero.
VBA Example
Sub GetDefaultMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim LoadPat(0) As String
Dim SF(0) As Double
Dim DefaultMassSource As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'get the default mass source


ret = SapModel.SourceMass.GetDefault(DefaultMassSource)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Get Mass Source
Syntax
SapObject.SapModel.SourceMass.GetMassSource
VB6 Procedure
Function GetMassSource (ByVal Name As String, ByRef MassFromElements
As Boolean, ByRef MassFromMasses As Boolean, ByRef MassFromLoads As
Boolean, ByRef IsDefault As Boolean, ByRef NumberLoads As Long, ByRef
LoadPat() As String, ByRef SF() As Double) As Long
Parameters
Name
The mass source name.
MassFromElements
If this item is True then element self mass is included in the mass.
MassFromMasses
If this item is True then assigned masses are included in the mass.
MassFromLoads
If this item is True then specified load patterns are included in the mass.
IsDefault
If this item is True then the mass source is the default mass source.
NumberLoads
The number of load patterns specified for the mass source. This item is only
applicable when the MassFromLoads item is True.
LoadPat
This is an array of load pattern names specified for the mass source.
SF
This is an array of load pattern multipliers specified for the mass source.
Remarks
This function gets the mass source data for an existing mass source.
The function returns zero if the mass source data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MassFromElements As Boolean
Dim MassFromMasses As Boolean
Dim MassFromLoads As Boolean
Dim IsDefault As Boolean
Dim NumberLoads As Long
Dim LoadPat() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'get data for mass source MSSSRC1


ret = SapModel.SourceMass.GetMassSource("MSSSRC1",
MassFromElements, MassFromMasses, MassFromLoads,
IsDefault, NumberLoads, LoadPat, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Get Name List
Syntax
SapObject.SapModel.SourceMass.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of mass source names retrieved by the program.
MyName
This is a one-dimensional array of mass source names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames 1) inside the Sap2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined mass sources.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetMassSourceNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'get mass source names


ret = SapModel.SourceMass.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Set Default
Syntax
SapObject.SapModel.SourceMass.SetDefault
VB6 Procedure
Function SetDefault(ByVal Name As String) As Long
Parameters
Name
The name of the mass source to be flagged as the default mass source.
Remarks
This function sets the default mass source.
The function returns zero if the mass source is successfully flagged as default,
otherwise it returns nonzero. Only one mass source can be the default mass
source so when this assignment is set all other mass sources are automatically
set to have their IsDefault flag False.
VBA Example
Sub SetDefaultMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim LoadPat(0) As String
Dim SF(0) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add a new mass source and do NOT make it the default mass
source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, False, 1, LoadPat, SF)

'set MyMassSource as the default mass source


ret = SapModel.SourceMass.SetDefault("MyMassSource")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
Set Mass Source
Syntax
SapObject.SapModel.SourceMass.SetMassSource
VB6 Procedure
Function SetMassSource(ByVal Name As String, ByVal MassFromElements As
Boolean, ByVal MassFromMasses As Boolean, ByVal MassFromLoads As
Boolean, ByVal IsDefault As Boolean, ByVal NumberLoads As Long, ByRef
LoadPat() As String, ByRef SF() As Double) As Long
Parameters
Name
The mass source name. If a mass source with this name already exists then the
mass source is reinitialized with the new data. All previous data assigned to the
mass source is lost. If a mass source with this name does not exist then a new
mass source is added.
MassFromElements
If this item is True then element self mass is included in the mass.
MassFromMasses
If this item is True then assigned masses are included in the mass.
MassFromLoads
If this item is True then specified load patterns are included in the mass.
IsDefault
If this item is True then the mass source is the default mass source. Only one
mass source can be the default mass source so when this assignment is True
all other mass sources are automatically set to have the IsDefault flag False.
NumberLoads
The number of load patterns specified for the mass source. This item is only
applicable when the MassFromLoads item is True.
LoadPat
This is an array of load pattern names specified for the mass source.
SF
This is an array of load pattern multipliers specified for the mass source.
Remarks
This function adds a new mass source to the model or reinitializes an existing
mass source.
The function returns zero if the mass source is successfully added or initialized,
otherwise it returns a nonzero value.
VBA Example
Sub SetMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim LoadPat(0) As String
Dim SF(0) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add a new mass source and make it the default mass source
LoadPat(0) = "DEAD"
SF(0) = 1.25
ret = SapModel.SourceMass.SetMassSource("MyMassSource",
True, True, True, True, 1, LoadPat, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
ChangeName
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined area stiffness modifier.
NewName
The new name for the area stiffness modifier.
Remarks
This function changes the name of an existing area stiffness modifier.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeAreaStiffnessModifierName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'add new stiffness modifier


ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)

'change name of stiffness modifier


ret = SapModel.NamedAssign.ModifierArea.ChangeName("AMOD1",
"MyModifier")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined area stiffness modifiers in the
model.
VBA Example
Sub CountAreaStiffnessModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'add new stiffness modifier


ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 2
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)
Value(5) = 1.5
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD2", Value)

'return number of defined stiffness modifiers


Count = SapModel.NamedAssign.ModifierArea.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing area stiffness modifier.
Remarks
The function deletes a specified area stiffness modifier.
The function returns zero if the modifier is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified modifier can not be
deleted; for example, if it is currently used by a staged construction load case.
VBA Example
Sub DeleteAreaStiffnessModifier()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'add new stiffness modifier


ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 2
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)
Value(5) = 1.5
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD2", Value)

'delete stiffness modifier


ret = SapModel.NamedAssign.ModifierArea.Delete("AMOD1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing area stiffness modifier.
Value
This is an array of ten unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function retrieves the modifier assignments for an area stiffness modifier.
The default value for all modifier values is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaPropModifierValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'define modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 2
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)

'get modifier values


ReDim Value(9)
ret =
SapModel.NamedAssign.ModifierArea.GetModifiers("AMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
GetNameList
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of area stiffness modifier names retrieved by the program.
MyName
This is a one-dimensional array of area stiffness modifier names. The MyName
array is created as a dynamic, zero-based array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined area stiffness modifiers.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero values.
VBA Example
Sub GetAreaStiffnessModifierNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'add new stiffness modifier


ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 2
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)
Value(5) = 1.5
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD2", Value)

'get area stiffness modifier names


ret =
SapModel.NamedAssign.ModifierArea.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierArea.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of a new or existing area stiffness modifier.
Value
This is an array of ten unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function defines a named area stiffness modifier. The default value for all
modifier values is one.
The function returns zero if the modifier is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub DefineAreaStiffnessModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'define modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(5) = 2
ret =
SapModel.NamedAssign.ModifierArea.SetModifiers("AMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
ChangeName
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined cable property modifier.
NewName
The new name for the cable property modifier.
Remarks
This function changes the name of an existing cable property modifier.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeCablePropModifierName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)

'change name of property modifier


ret = SapModel.NamedAssign.ModifierCable.ChangeName("CMOD1",
"MyModifier")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined cable property modifiers in the
model.
VBA Example
Sub CountCablePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)
Value(1) = 1.5
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD2", Value)

'return number of defined property modifiers


Count = SapModel.NamedAssign.ModifierCable.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing cable property modifier.
Remarks
The function deletes a specified cable property modifier.
The function returns zero if the modifier is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified modifier can not be
deleted, for example, if it is currently used by a staged construction load case.
VBA Example
Sub DeleteCablePropModifier()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)
Value(1) = 1.5
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD2", Value)

'delete property modifier


ret = SapModel.NamedAssign.ModifierCable.Delete("CMOD1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing cable property modifier.
Value
This is an array of three unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
Remarks
This function retrieves the modifier assignments for a cable property modifier.
The default value for all modifier values is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCablePropModifierValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 100
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)

'get modifier values


ReDim Value(2)
ret =
SapModel.NamedAssign.ModifierCable.GetModifiers("CMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
GetNameList
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of cable property modifier names retrieved by the program.
MyName
This is a one-dimensional array of cable property modifier names. The MyName
array is created as a dynamic, zero-based array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined cable property modifiers.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetCablePropModifierNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new property modifier


ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)
Value(1) = 1.5
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD2", Value)

'get cable property modifier names


ret =
SapModel.NamedAssign.ModifierCable.GetNameList(NumberNames,
MyName)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierCable.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of a new or existing cable property modifier.
Value
This is an array of three unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
Remarks
This function defines a named cable property modifier. The default value for all
modifier values is one.
The function returns zero if the modifier is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub DefineCablePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
ret =
SapModel.NamedAssign.ModifierCable.SetModifiers("CMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
ChangeName
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined frame property modifier.
NewName
The new name for the frame property modifier.
Remarks
This function changes the name of an existing frame property modifier.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeFramePropModifierName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)

'change name of property modifier


ret = SapModel.NamedAssign.ModifierFrame.ChangeName("FMOD1",
"MyModifier")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined frame property modifiers in the
model.
VBA Example
Sub CountFramePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)
Value(5) = 10
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD2", Value)

'return number of defined property modifiers


Count = SapModel.NamedAssign.ModifierFrame.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing frame property modifier.
Remarks
The function deletes a specified frame property modifier.
The function returns zero if the modifier is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified modifier can not be
deleted; for example, if it is currently used by a staged construction load case.
VBA Example
Sub DeleteFramePropModifier()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new property modifier


ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)
Value(5) = 10
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD2", Value)

'delete property modifier


ret = SapModel.NamedAssign.ModifierFrame.Delete("FMOD1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing frame property modifier.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function retrieves the modifier assignments for a frame property modifier.
The default value for all modifier values is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropModifierValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)

'get modifier values


ReDim Value(7)
ret =
SapModel.NamedAssign.ModifierFrame.GetModifiers("FMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
GetNameList
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of frame property modifier names retrieved by the program.
MyName
This is a one-dimensional array of frame property modifier names. The
MyName array is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined frame property modifiers.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetFramePropModifierNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new property modifier


ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)
Value(5) = 10
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD2", Value)

'get frame property modifier names


ret =
SapModel.NamedAssign.ModifierFrame.GetNameList(NumberNames,
MyName)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetModifiers
Syntax
SapObject.SapModel.NamedAssign.ModifierFrame.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of a new or existing frame property modifier.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function defines a named frame property modifier. The default value for all
modifier values is one.
The function returns zero if the modifier is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub DefineFramePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret =
SapModel.NamedAssign.ModifierFrame.SetModifiers("FMOD1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetModifiers
ChangeName
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined frame end release.
NewName
The new name for the frame end release.
Remarks
This function changes the name of an existing frame end release.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeFrameEndReleaseName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new end release


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)

'change name of end release


ret = SapModel.NamedAssign.ReleaseFrame.ChangeName("FREL1",
"MyRelease")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Count
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined frame end releases in the
model.
VBA Example
Sub CountFrameEndReleases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new end release


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)
ii(0) = False
StartValue(0) = 0
ii(5) = True
jj(5) = True
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL2",
ii, jj, StartValue, EndValue)
'return number of defined end releases
Count = SapModel.NamedAssign.ReleaseFrame.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
Delete
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing frame end release.
Remarks
The function deletes a specified frame end release.
The function returns zero if the end release is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified end release can not
be deleted; for example, if it is currently used by a staged construction load
case.
VBA Example
Sub DeleteFrameEndRelease()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add new end release


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)
ii(0) = False
StartValue(0) = 0
ii(5) = True
jj(5) = True
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL2",
ii, jj, StartValue, EndValue)

'delete end release


ret = SapModel.NamedAssign.ReleaseFrame.Delete("FREL1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetNameList
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of frame end release names retrieved by the program.
MyName
This is a one-dimensional array of frame end release names. The MyName
array is created as a dynamic, zero-based array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined frame end releases.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero values.
VBA Example
Sub GetFrameEndReleaseNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new end release


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)
ii(0) = False
StartValue(0) = 0
ii(5) = True
jj(5) = True
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL2",
ii, jj, StartValue, EndValue)
'get frame end release names
ret =
SapModel.NamedAssign.ReleaseFrame.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReleases
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.GetReleases
VB6 Procedure
Function GetReleases(ByVal Name As String, ByRef ii() As Boolean, ByRef jj()
As Boolean, ByRef StartValue() As Double, ByRef EndValue() As Double) As
Long
Parameters
Name
The name of an existing frame end release.
ii, jj
These are arrays of six booleans indicating the I-End and J-End releases.
ii(0) and jj(0) = U1 release
ii(1) and jj(1) = U2 release
ii(2) and jj(2) = U3 release
ii(3) and jj(3) = R1 release
ii(4) and jj(4) = R2 release
ii(5) and jj(5) = R3 release

StartValue, EndValue
These are arrays of six values indicating the I-End and J-End partial fixity
springs.
StartValue(0) and EndValue(0) = U1 partial fixity [F/L]
StartValue(1) and EndValue(1) = U2 partial fixity [F/L]
StartValue(2) and EndValue(2) = U3 partial fixity [F/L]
StartValue(3) and EndValue(3) = R1 partial fixity [FL/rad]
StartValue(4) and EndValue(4) = R2 partial fixity [FL/rad]
StartValue(5) and EndValue(5) = R3 partial fixity [FL/rad]
Remarks
This function retrieves the release assignments for a frame end release.
The function returns zero if the release assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameEndReleaseValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define releases
ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)

'clear variables
For i = 0 to 5
ii(i) = False
jj(i) = False
StartValue(i) = 0
EndValue(i) = 0
Next i

'get release values


ret = SapModel.NamedAssign.ReleaseFrame.GetReleases("FREL1",
ii, jj, StartValue, EndValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReleases
SetReleases
Syntax
SapObject.SapModel.NamedAssign.ReleaseFrame.SetReleases
VB6 Procedure
Function SetReleases(ByVal Name As String, ByRef ii() As Boolean, ByRef jj()
As Boolean, ByRef StartValue() As Double, ByRef EndValue() As Double) As
Long
Parameters
Name
The name of a new or existing frame end release.
ii, jj
These are arrays of six booleans indicating the I-End and J-End releases.
ii(0) and jj(0) = U1 release
ii(1) and jj(1) = U2 release
ii(2) and jj(2) = U3 release
ii(3) and jj(3) = R1 release
ii(4) and jj(4) = R2 release
ii(5) and jj(5) = R3 release

StartValue, EndValue
These are arrays of six values indicating the I-End and J-End partial fixity
springs.
StartValue(0) and EndValue(0) = U1 partial fixity [F/L]
StartValue(1) and EndValue(1) = U2 partial fixity [F/L]
StartValue(2) and EndValue(2) = U3 partial fixity [F/L]
StartValue(3) and EndValue(3) = R1 partial fixity [FL/rad]
StartValue(4) and EndValue(4) = R2 partial fixity [FL/rad]
StartValue(5) and EndValue(5) = R3 partial fixity [FL/rad]
Remarks
This function defines a named frame end release.
The function returns zero if the release is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub DefineFrameEndReleases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define releases
ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(0) = True
StartValue(0) = 10
ret = SapModel.NamedAssign.ReleaseFrame.SetReleases("FREL1",
ii, jj, StartValue, EndValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReleases
GetJointRespSpec
Syntax
SapObject.SapModel.NamedSets.GetJointRespSpec
VB6 Procedure
Function GetJointRespSpec(ByVal Name As String, ByRef LoadCase As String,
ByRef NumberJoints As Long, ByRef JointNames() As String, ByRef CoordSys
As String, ByRef Direction As Long, ByRef Abscissa As Long, ByRef Ordinate
As Long, ByRef DefaultFreq As Boolean, ByRef StructuralFreq As Boolean,
ByRef NumberUserFreq As Long, ByRef UserFreqValues() As Double, ByRef
NumberDampValues As Long, ByRef DampingValues() As Double, ByRef
AbscissaPlotType As Long, ByRef SpectrumWidening As Double, ByRef
OrdinatePlotType As Long, ByRef OrdinateScaleFactor As Double) As Long
Parameters
Name
The name of an existing joint response spectrum named set..
Load Case
The name of a time history load case for which results will be extracted.
NumberJoints
The number of joints for which to generate response spectra.
JointNames
This is an array of joint names for which to generate response spectra.
CoordSys
The name of a coordinate system in which the direction for results is defined.
This can be Global, Local, or any other user-defined coordinate system.
Direction
This specifies the direction, in the specified coordinate system, in which the
results are to be retrieved. Valid values for the direction are:
1 = Local 1, Global X, or user-defined coordinate system X
2 = Local 2, Global Y, or user-defined coordinate system Y
3 = Local 3, Global Z, or user-defined coordinate system Z
Abscissa
This is one of the following, specifying the abscissa data type.
1 = Frequency
2 = Period
Ordinate
This is one of the following, specifying the ordinate data type.
1 = Spectral displacement
2 = Spectral velocity
3 = Pseudo-spectral velocity
4 = Spectral acceleration
5 = Pseudo-spectral acceleration
DefaultFreq
If this item is True, the default frequencies are used for output.
StructuralFreq
If this item is True, the structural frequencies are used for output.
NumberUserFreq
The number of user-defined frequencies, which may be 0.
UserFreqValues
This is an array that includes the user-defined frequencies. Values are
returned using indices 0 to NumberUserFreq-1 if NumberUserFreq > 0. [1/s]
NumberDampValues
The number of critical damping ratio values.
Damping Values
This is an array that includes the critical damping ratios to be used for extracting
results. Values are supplied using indices 0 to NumberDampValues-1.
Abscissa Plot Type
This is one of the following, specifying the abscissa axis scale type.
1 = Arithmetic
2 = Log
Spectrum Widening
This specifies the percentage by which to widen the peaks of the spectrum.
OrdinatePlotType
This is one of the following, specifying the ordinate axis scale type.
1 = Arithmetic
2 = Log
OrdinateScaleFactor
This is the scale factor used to linearly scale the response spectrum ordinate
values.
Remarks
This function gets a joint response spectrum named set definition.
The function returns zero if the named set is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetJointRSNamedSet()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim InJoints() As String
Dim InUserFreq() As Double
Dim InDampValues() As Double
Dim LoadCase As String
Dim NumJoints As Long
Dim Joints() As String
Dim CoordSys As String
Dim Direction As Long
Dim Abscissa As Long
Dim Ordinate As Long
Dim DefaultFreq As Boolean
Dim StructuralFreq As Boolean
Dim NumUserFreq As Long
Dim UserFreqValues() As Double
Dim NumDampValues As Long
Dim DampingValues() As Double
Dim AbscissaPlotType As Long
Dim SpectrumWidening As Double
Dim OrdinatePlotType As Long
Dim OrdinateScaleFactor As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")
'define named set
ReDim InJoints(1)
InJoints(0) = "3"
InJoints(1) = "6"
ReDim InDampValues(1)
InDampValues(0) = 0
InDampValues(1) = 0.05

ret = SapModel.NamedSets.SetJointRespSpec("Sample", "LCASE1",


2, InJoints, "Global", 1, 1, 4, True, True, 0, InUserFreq, 2,
InDampValues)

'get named set


ret = SapModel.NamedSets.GetJointRespSpec("Sample",
LoadCase, NumJoints, Joints, CoordSys, Direction, Abscissa,
Ordinate, DefaultFreq, StructuralFreq, NumUserFreq,
UserFreqValues, NumDampValues, DampingValues, AbscissaPlotType,
SpectrumWidening, OrdinatePlotType, OrdinateScaleFactor)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetJointRespSpec
SetJointRespSpec
Syntax
SapObject.SapModel.NamedSets.SetJointRespSpec
VB6 Procedure
Function SetJointRespSpec(ByVal Name As String, ByVal LoadCase As String,
ByVal NumberJoints As Long, ByVal JointNames() As String, ByVal CoordSys
As String, ByVal Direction As Long, ByVal Abscissa As Long, ByVal Ordinate As
Long, ByVal DefaultFreq As Boolean, ByVal StructuralFreq As Boolean, ByVal
NumberUserFreq As Long, ByVal UserFreqValues() As Double, ByVal
NumberDampValues As Long, ByVal DampingValues() As Double, Optional
ByVal AbscissaPlotType As Long = 2, Optional ByVal SpectrumWidening As
Double = 0, Optional ByVal OrdinatePlotType As Long = 1, Optional ByVal
OrdinateScaleFactor As Double = 1) As Long
Parameters
Name
The name of a new or existing joint response spectrum named set. If the named
set already exists, it will be modified, otherwise a new named set will be created.
Load Case
The name of a time history load case for which results will be extracted.
NumberJoints
The number of joints for which to generate response spectra.
JointNames
This is an array of joint names for which to generate response spectra.
CoordSys
The name of a coordinate system in which the direction for results is defined.
This can be Global, Local, or any other user-defined coordinate system.
Direction
This is a value specifying the direction, in the specified coordinate system, in
which the results are to be retrieved. Valid values for the direction are:
1 = Local 1, Global X, or user-defined coordinate system X
2 = Local 2, Global Y, or user-defined coordinate system Y
3 = Local 3, Global Z, or user-defined coordinate system Z
Abscissa
This is one of the following, specifying the abscissa data type.
1 = Frequency
2 = Period
Ordinate
This is one of the following, specifying the ordinate data type.
1 = Spectral displacement
2 = Spectral velocity
3 = Pseudo-spectral velocity
4 = Spectral acceleration
5 = Pseudo-spectral acceleration
DefaultFreq
If this item is True, the default frequencies are used for output.
StructuralFreq
If this item is True, the structural frequencies are used for output.
NumberUserFreq
The number of user-defined frequencies, which may be 0.
UserFreqValues
This is an array that includes the user-defined frequencies. Values are
returned using indices 0 to NumberUserFreq-1 if NumberUserFreq > 0. [1/s]
NumberDampValues
The number of critical damping ratio values, which must be at least 1..
Damping Values
This is an array that includes the critical damping ratios to be used for extracting
results. Values are supplied using indices 0 to NumberDampValues-1.
Abscissa Plot Type
This is one of the following, specifying the abscissa axis scale type.
1 = Arithmetic
2 = Log
Spectrum Widening
This specifies the percentage by which to widen the peaks of the spectrum.
OrdinatePlotType
This is one of the following, specifying the ordinate axis scale type.
1 = Arithmetic
2 = Log
OrdinateScaleFactor
This is the scale factor used to linearly scale the response spectrum ordinate
values.
Remarks
This function defines a joint response spectrum named set.
The function returns zero if the named set is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub DefineJointRSNamedSet()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Joints() As String
Dim UserFreq() As Double
Dim DampValues() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add linear modal history load case


ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")

'define named set


ReDim InJoints(1)
Joints(0) = "3"
Joints(1) = "6"
ReDim DampValues(1)
DampValues(0) = 0
DampValues(1) = 0.05

ret = SapModel.NamedSets.SetJointRespSpec("Sample", "LCASE1",


2, Joints, "Global", 1, 1, 4, True, True, 0, UserFreq, 2,
DampValues)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetJointRespSpec
ChangeName
Syntax
SapObject.SapModel.PropArea.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined area property.
NewName
The new name for the area property.
Remarks
This function changes the name of an existing area property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeAreaPropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'change name of area property


ret = SapModel.PropArea.ChangeName("ASEC1", "MyArea")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropArea.Count
VB6 Procedure
Function Count(Optional ByVal PropType As Long = 0) As Long
Parameters
PropType
This optional value is 0, 1, 2 or 3, indicating the type of area properties included
in the count.
0= All
1= Shell
2= Plane
3= Asolid
Remarks
This function returns the total number of defined area properties in the model. If
desired, counts can be returned for all area properties of a specified type in the
model.
VBA Example
Sub CountAreaProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'return number of defined area properties of all types


Count = SapModel.PropArea.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropArea.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing area property.
Remarks
The function deletes a specified area property.
The function returns zero if the area property is successfully deleted; otherwise
it returns a nonzero value. It returns an error if the specified area property can
not be deleted, for example, if it is being used by an area object.
VBA Example
Sub DeleteAreaProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 1, "4000Psi", 0, 16,
16)

'get area object names


ret = SapModel.AreaObj.GetNameList(NumberNames, MyName)

'assign area property


For i = 1 to NumberNames
ret = SapModel.AreaObj.SetProperty(MyName(i - 1), "A1")
Next i

'delete area property


ret = SapModel.PropArea.Delete("ASEC1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAsolid
Syntax
SapObject.SapModel.PropArea.GetAsolid
VB6 Procedure
Function GetAsolid(ByVal Name As String, ByRef MatProp As String, ByRef
MatAng As Double, ByRef Arc As Double, ByRef Incompatible As Boolean,
ByRef CSys As String, ByRef Color As Long, ByRef Notes As String, ByRef
GUID As String) As Long
Parameters
Name
The name of an existing asolid-type area property.
MatProp
The name of the material property for the area property.
MatAng
The material angle. [deg]
Arc
The arc angle through which the area object is passed to define the asolid
element. [deg]
A value of zero means 1 radian (approximately 57.3 degrees).
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
CSys
The area object is rotated about the Z-axis in this coordinate system to define
the asolid element.
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves area property data for an asolid-type area section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropAsolid()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim MatAng As Double
Dim Arc As Double
Dim Incompatible As Boolean
Dim CSys As String
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetAsolid("AS1", "4000Psi", 0, 45,
True)

'get area property data


ret = SapModel.PropArea.GetAsolid("AS1", MatProp, MatAng,
Arc, Incompatible, CSys, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAsolid
GetModifiers
Syntax
SapObject.SapModel.PropArea.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing area property.
Value
This is an array of 10 unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function retrieves the modifier assignments for an area property. The
default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaPropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim MyValue() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim MyValue(9)
For i = 0 To 9
MyValue(i) = 1
Next i
MyValue(0) = 0.1
ret = SapModel.PropArea.SetModifiers("ASEC1", MyValue)

'get modifiers
ret = SapModel.PropArea.GetModifiers("ASEC1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetModifiers
GetNameList
Syntax
SapObject.SapModel.PropArea.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal PropType As Long = 0) As Long
Parameters
NumberNames
The number of area property names retrieved by the program.
MyName
This is a one-dimensional array of area property names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
PropType
This optional value is 0, 1, 2 or 3, indicating the type of area properties included
in the name list.
0= All
1= Shell
2= Plane
3= Asolid
Remarks
This function retrieves the names of all defined area properties of the specified
type.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetAreaPropNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get area property names


ret = SapModel.PropArea.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPlane
Syntax
SapObject.SapModel.PropArea.GetPlane
VB6 Procedure
Function GetPlane(ByVal Name As String, ByRef MyType As Long, ByRef
MatProp As String, ByRef MatAng As Double, ByRef Thickness As Double,
ByRef Incompatible As Boolean, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing plane-type area property.
MyType
This is either 1 or 2, indicating the plane type.
1 = Plane-stress
2 = Plane-strain
MatProp
The name of the material property for the area property.
MatAng
The material angle. [deg]
Thickness
The plane thickness. [L]
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves area property data for a plane-type area section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropPlane()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim MatProp As String
Dim MatAng As Double
Dim Thickness As Double
Dim Incompatible As Boolean
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetPlane("P1", 1, "4000Psi", 0, 9,
True)

'get area property data


ret = SapModel.PropArea.GetPlane("P1", MyType, MatProp,
MatAng, Thickness, Incompatible, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetPlane
GetShell_1
Syntax
SapObject.SapModel.PropArea.GetShell
VB6 Procedure
Function GetShell_1(ByVal Name As String, ByRef ShellType As Long, ByRef
IncludeDrillingDOF As Boolean, ByRef MatProp As String, ByRef MatAng As
Double, ByRef Thickness As Double, ByRef Bending As Double, ByRef Color
As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing shell-type area property.
ShellType
This is 1, 2, 3, 4, 5 or 6, indicating the shell type.
1= Shell - thin
2= Shell - thick
3= Plate - thin
4= Plate - thick
5= Membrane
6= Shell layered/nonlinear
IncludeDrillingDOF
This item is True if drilling degrees of freedom are included in the element
formulation in the analysis model. This item does not apply when ShellType = 3, 4
or 6.
MatProp
The name of the material property for the area property. This item does not
apply when ShellType = 6.
MatAng
The material angle. [deg]
This item does not apply when ShellType = 6.
Thickness
The membrane thickness. [L]
This item does not apply when ShellType = 6.
Bending
The bending thickness. [L]
This item does not apply when ShellType = 6.
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves area property data for a shell-type area section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropShell_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ShellType As Long
Dim IncludeDrillingDOF As Boolean
Dim MatProp As String
Dim MatAng As Double
Dim Thickness As Double
Dim Bending As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 1, "4000Psi", 0, 16,
16)

'get area property data


ret = SapModel.PropArea.GetShell_1("A1", ShellType,
IncludeDrillingDOF, MatProp, MatAng, Thickness, Bending, Color,
Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
This function supersedes GetShell.
See Also
SetShell_1
GetShellDesign
Syntax
SapObject.SapModel.PropArea.GetShellDesign
VB6 Procedure
Function GetShellDesign(ByVal Name As String, ByRef MatProp As String,
ByRef SteelLayoutOption As Long, ByRef DesignCoverTopDir1 As Double,
ByRef DesignCoverTopDir2 As Double, ByRef DesignCoverBotDir1 As Double,
ByRef DesignCoverBotDir2 As Double) As Long
Parameters
Name
The name of an existing shell-type area property.
MatProp
The name of the material property for the area property.
SteelLayoutOption
This is 0, 1 or 2 indicating, the rebar layout option.
0 = Default
1 = One layer
2 = Two layers
DesignCoverTopDir1, DesignCoverTopDir2
The cover to the centroid of the top reinforcing steel running in the local 1 and 2
axes directions of the area object, respectively. [L]
This item applies only when SteelLayoutOption = 1 or 2.
DesignCoverBotDir1, DesignCoverBotDir2
The cover to the centroid of the bottom reinforcing steel running in the local 1
and 2 axes directions of the area object, respectively. [L]
This item applies only when SteelLayoutOption = 2.
Remarks
This function retrieves area property design parameters for a shell-type area
section.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropShellDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim SteelLayoutOption As Long
Dim DesignCoverTopDir1 As Double
Dim DesignCoverTopDir2 As Double
Dim DesignCoverBotDir1 As Double
Dim DesignCoverBotDir2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 1, "4000Psi", 0, 16,
16)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set area property design parameters


ret = SapModel.PropArea.SetShellDesign("A1", Name, 2, 2, 3,
2.5, 3.5)

'get area property design parameters


ret = SapModel.PropArea.GetShellDesign("A1", MatProp,
SteelLayoutOption, DesignCoverTopDir1, DesignCoverTopDir2,
DesignCoverBotDir1, DesignCoverBotDir2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetShellDesign
GetShellLayer_1
Syntax
SapObject.SapModel.PropArea.GetShellLayer_1
VB6 Procedure
Function GetShellLayer_1(ByVal Name As String, ByRef NumberLayers As Long,
ByRef LayerName() As String, ByRef Dist() As Double, ByRef Thickness() As
Double, ByRef MyType() As Long, ByRef NumIntegrationPts() As Long, ByRef
MatProp() As String, ByRef Matang() As Double, ByRef S11Type() As Long, ByRef
S22Type() As Long, ByRef S12Type() As Long) As Long
Parameters
Name
The name of an existing shell-type area property that is specified to be a layered
shell property.
NumberLayers
The number of layers in the area property.
LayerName
This is an array that includes the name of each layer.
Dist
This is an array that includes the distance from the area reference surface
(area object joint location plus offsets) to the mid-height of the layer. [L]
Thickness
This is an array that includes the thickness of each layer. [L]
Type
This is an array that includes 1, 2 or 3, indicating the layer type.
1 = Shell
2 = Membrane
3 = Plate

NumIntegrationPts
The number of integration points in the thickness direction for the layer. The
locations are determined by the program using standard Guass-quadrature
rules.
MatProp
This is an array that includes the name of the material property for the layer.
MatAng
This is an array that includes the material angle for the layer. [deg]
S11Type, S22Type, S12Type
These are arrays that include 0, 1 or 2, indicating the material component
behavior.
0 = Inactive
1 = Linear
2 = Nonlinear
Remarks
This function retrieves area property layer parameters for a shell-type area
section.
The function returns zero if the parameters are successfully retrieved, otherwise
it returns a nonzero value.
The function returns an error if the specified area property is not a shell-type
property specified to be a layered shell.
VBA Example
Sub GetAreaPropShellLayer1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyNumberLayers As Long
Dim MyLayerName() As String
Dim MyDist() As Double
Dim MyThickness() As Double
Dim MyType() As Long
Dim MyNumIntegrationPts() As Long
Dim MyMatProp() As String
Dim MyMatAng() As Double
Dim MyS11Type() As Long
Dim MyS22Type() As Long
Dim MyS12Type() As Long
Dim NumberLayers As Long
Dim LayerName() As String
Dim Dist() As Double
Dim Thickness() As Double
Dim SType() As Long
Dim MatProp() As String
Dim MatAng() As Double
Dim S11Type() As Long
Dim S22Type() As Long
Dim S12Type() As Long
Dim NumIntegrationPts() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object

Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 6, "", 0, 0, 0)

'add A615Gr60 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr60)

'set area property layer parameters


MyNumberLayers = 5
ReDim MyLayerName(MyNumberLayers 1)
ReDim MyDist(MyNumberLayers 1)
ReDim MyThickness(MyNumberLayers 1)
ReDim MyType(MyNumberLayers 1)
ReDim MyNumIntegrationPts(MyNumberLayers 1)
ReDim MyMatProp(MyNumberLayers 1)
ReDim MyMatAng(MyNumberLayers 1)
ReDim MyS11Type(MyNumberLayers 1)
ReDim MyS22Type(MyNumberLayers 1)
ReDim MyS12Type(MyNumberLayers 1)

MyLayerName(0) = "Concrete"
MyDist(0) = 0
MyThickness(0) = 16
MyType(0) = 1
MyNumIntegrationPts(0) = 2
MyMatProp(0) = "4000Psi"
MyMatAng(0) = 0
MyS11Type(0) = 1
MyS22Type(0) = 1
MyS12Type(0) = 1

MyLayerName(1) = "Top Bar 1"


MyDist(1) = 6
MyThickness(1) = 0.03
MyType(1) = 1
MyNumIntegrationPts(1) = 1
MyMatProp(1) = Name
MyMatAng(1) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

MyLayerName(2) = "Top Bar 2"


MyDist(2) = 6
MyThickness(2) = 0.03
MyType(2) = 1
MyNumIntegrationPts(2) = 1
MyMatProp(2) = Name
MyMatAng(2) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

MyLayerName(3) = "Bot Bar 1"


MyDist(3) = -6
MyThickness(3) = 0.03
MyType(3) = 1
MyNumIntegrationPts(3) = 1
MyMatProp(3) = Name
MyMatAng(3) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

MyLayerName(4) = "Bot Bar 2"


MyDist(4) = -6
MyThickness(4) = 0.03
MyType(4) = 1
MyNumIntegrationPts(4) = 1
MyMatProp(4) = Name
MyMatAng(4) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

ret = SapModel.PropArea.SetShellLayer_1("A1",
MyNumberLayers, MyLayerName, MyDist, MyThickness, MyType,
MyNumIntegrationPts, MyMatProp, MyMatAng, MyS11Type, MyS22Type,
MyS12Type)

'get area property layer parameters


ret = SapModel.PropArea.GetShellLayer_1("A1", NumberLayers,
LayerName, Dist, Thickness, Stype, NumIntegrationPts, MatProp,
MatAng, S11Type, S22Type, S12Type)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.5.

This function supersedes GetShellLayer


See Also
SetShellLayer_1
GetTypeOAPI
Syntax
SapObject.SapModel.PropArea.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef PropType As Long) As
Long
Parameters
Name
The name of an existing area property.
PropType
This is 1, 2 or 3, indicating the type of area property.
1 = Shell
2 = Plane
3 = Asolid
Remarks
This function retrieves the property type for the specified area property.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetAreaPropType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get area property type


ret = SapModel.PropArea.GetTypeOAPI("ASEC1", PropType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
SetAsolid
Syntax
SapObject.SapModel.PropArea.SetAsolid
VB6 Procedure
Function SetAsolid(ByVal Name As String, ByVal MatProp As String, ByVal
MatAng As Double, ByVal Arc As Double, ByVal Incompatible As Boolean,
Optional ByVal CSys As String = "Global", Optional ByVal Color As Long = -1,
Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new area property. If this is an existing property, that
property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the area property.
MatAng
The material angle. [deg]
Arc
The arc angle through which the area object is passed to define the asolid
element. [deg]
A value of zero means 1 radian (approximately 57.3 degrees).
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
CSys
The area object is rotated about the Z-axis in this coordinate system to define
the asolid element.
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes an asolid-type area property. If this function is called for
an existing area property, all items for the property are reset to their default
value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaPropAsolid()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetAsolid("AS1", "4000Psi", 0, 45,
True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAsolid
SetModifiers
Syntax
SapObject.SapModel.PropArea.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing area property.
Value
This is an array of 10 unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function assigns property modifiers to an area property. The default value
for all modifiers is one.
The function returns zero if the modifiers are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaPropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim MyValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim MyValue(9)
For i = 0 To 9
MyValue(i) = 1
Next i
MyValue(0) = 0.1
ret = SapModel.PropArea.SetModifiers("ASEC1", MyValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetModifiers
SetPlane
Syntax
SapObject.SapModel.PropArea.SetPlane
VB6 Procedure
Function SetPlane(ByVal Name As String, ByVal MyType As Long, ByVal
MatProp As String, ByVal MatAng As Double, ByVal Thickness As Double, ByVal
Incompatible As Boolean, Optional ByVal Color As Long = -1, Optional ByVal
Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new area property. If this is an existing property, that
property is modified; otherwise, a new property is added.
MyType
This is either 1 or 2, indicating the plane type.
1 = Plane-stress
2 = Plane-strain
MatProp
The name of the material property for the area property.
MatAng
The material angle. [deg]
Thickness
The plane thickness. [L]
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a plane-type area property. If this function is called for an
existing area property, all items for the property are reset to their default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaPropPlane()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetPlane("P1", 1, "4000Psi", 0, 9,
True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPlane
SetShell_1
Syntax
SapObject.SapModel.PropArea.SetShell_1
VB6 Procedure
Function SetShell(ByVal Name As String, ByVal ShellType As Long, ByVal
IncludeDrillingDOF As Boolean, ByVal MatProp As String, ByVal MatAng As
Double, ByVal Thickness As Double, ByVal Bending As Double, Optional ByVal
Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal GUID
As String = "") As Long
Parameters
Name
The name of an existing or new area property. If this is an existing property, that
property is modified; otherwise, a new property is added.
ShellType
This is 1, 2, 3, 4, 5 or 6, indicating the shell type.
1= Shell - thin
2= Shell - thick
3= Plate - thin
4= Plate - thick
5= Membrane
6= Shell layered/nonlinear
IncludeDrillingDOF
This item is True if drilling degrees of freedom are included in the element
formulation in the analysis model. This item does not apply when ShellType = 3, 4
or 6.
MatProp
The name of the material property for the area property. This item does not
apply when ShellType = 6.
MatAng
The material angle. [deg]
This item does not apply when ShellType = 6.
Thickness
The membrane thickness. [L]
This item does not apply when ShellType = 6.
Bending
The bending thickness. [L]
This item does not apply when ShellType = 6.
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, then the program assigns a GUID to the property.
Remarks
This function initializes a shell-type area property. If this function is called for an
existing area property, all items for the property are reset to their default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaPropShell_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell_1("A1", 1, True, "4000Psi",
0, 16, 16)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
This function supersedes SetShell.
See Also
GetShell_1
SetShellDesign
Syntax
SapObject.SapModel.PropArea.SetShellDesign
VB6 Procedure
Function SetShellDesign(ByVal Name As String, ByVal MatProp As String, ByVal
SteelLayoutOption As Long, ByVal DesignCoverTopDir1 As Double, ByVal
DesignCoverTopDir2 As Double, ByVal DesignCoverBotDir1 As Double, ByVal
DesignCoverBotDir2 As Double) As Long
Parameters
Name
The name of an existing shell-type area property.
MatProp
The name of the material property for the area property.
SteelLayoutOption
This is 0, 1 or 2, indicating the rebar layout option.
0 = Default
1 = One layer
2 = Two layers
DesignCoverTopDir1, DesignCoverTopDir2
The cover to the centroid of the top reinforcing steel running in the local 1 and 2
axes directions of the area object, respectively. [L]
This item applies only when SteelLayoutOption = 1 or 2.
DesignCoverBotDir1, DesignCoverBotDir2
The cover to the centroid of the bottom reinforcing steel running in the local 1
and 2 axes directions of the area object, respectively. [L]
This item applies only when SteelLayoutOption = 2.
Remarks
This function assigns the design parameters for shell-type area properties.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub SetAreaPropShellDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 1, "4000Psi", 0, 16,
16)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set area property design parameters


ret = SapModel.PropArea.SetShellDesign("A1", Name, 2, 2, 3,
2.5, 3.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetShellDesign
SetShellLayer_1
Syntax
SapObject.SapModel.PropArea.SetShellLayer_1
VB6 Procedure
Function SetShellLayer_1(ByVal Name As String, ByVal NumberLayers As Long,
ByRef LayerName() As String, ByRef Dist() As Double, ByRef Thickness() As
Double, ByRef MatProp() As String, ByRef NonLinear() As Boolean, ByRef MatAng()
As Double, ByRef NumIntegrationPts() As Long) As Long
Parameters
Name
The name of an existing shell-type area property that is specified to be a layered
shell property.
NumberLayers
The number of layers in the area property.
LayerName
This is an array that includes the name of each layer.
Dist
This is an array that includes the distance from the area reference surface
(area object joint location plus offsets) to the mid-height of the layer. [L]
Thickness
This is an array that includes the thickness of each layer. [L]
Type
This is an array that includes 1, 2 or 3, indicating the layer type.
1 = Shell
2 = Membrane
3 = Plate

NumIntegrationPts
The number of integration points in the thickness direction for the layer. The
locations are determined by the program using standard Guass-quadrature
rules.
MatProp
This is an array that includes the name of the material property for the layer.
MatAng
This is an array that includes the material angle for the layer. [deg]
S11Type, S22Type, S12Type
These are arrays that include 0, 1 or 2, indicating the material component
behavior.
0 = Inactive
1 = Linear
2 = Nonlinear
Remarks
This function assigns the layer parameters for shell-type area properties.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
The function returns an error if the specified area property is not a shell-type
property specified to be a layered shell.
VBA Example
Sub SetAreaPropShellLayer1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyNumberLayers As Long
Dim MyLayerName() As String
Dim MyDist() As Double
Dim MyThickness() As Double
Dim MyType() As Long
Dim MyNumIntegrationPts() As Long
Dim MyMatProp() As String
Dim MyMatAng() As Double
Dim MyS11Type() As Long
Dim MyS22Type() As Long
Dim MyS12Type() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 6, "", 0, 0, 0)

'add A615Gr60 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr60)

'set area property layer parameters


MyNumberLayers = 5
ReDim MyLayerName(MyNumberLayers 1)
ReDim MyDist(MyNumberLayers 1)
ReDim MyThickness(MyNumberLayers 1)
ReDim MyType(MyNumberLayers 1)
ReDim MyNumIntegrationPts(MyNumberLayers 1)
ReDim MyMatProp(MyNumberLayers 1)
ReDim MyMatAng(MyNumberLayers 1)
ReDim MyS11Type(MyNumberLayers 1)
ReDim MyS22Type(MyNumberLayers 1)
ReDim MyS12Type(MyNumberLayers 1)

MyLayerName(0) = "Concrete"
MyDist(0) = 0
MyThickness(0) = 16
MyType(0) = 1
MyNumIntegrationPts(0) = 2
MyMatProp(0) = "4000Psi"
MyMatAng(0) = 0
MyS11Type(0) = 1
MyS22Type(0) = 1
MyS12Type(0) = 1

MyLayerName(1) = "Top Bar 1"


MyDist(1) = 6
MyThickness(1) = 0.03
MyType(1) = 1
MyNumIntegrationPts(1) = 1
MyMatProp(1) = Name
MyMatAng(1) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

MyLayerName(2) = "Top Bar 2"


MyDist(2) = 6
MyThickness(2) = 0.03
MyType(2) = 1
MyNumIntegrationPts(2) = 1
MyMatProp(2) = Name
MyMatAng(2) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1
MyLayerName(3) = "Bot Bar 1"
MyDist(3) = -6
MyThickness(3) = 0.03
MyType(3) = 1
MyNumIntegrationPts(3) = 1
MyMatProp(3) = Name
MyMatAng(3) = 0
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

MyLayerName(4) = "Bot Bar 2"


MyDist(4) = -6
MyThickness(4) = 0.03
MyType(4) = 1
MyNumIntegrationPts(4) = 1
MyMatProp(4) = Name
MyMatAng(4) = 90
MyS11Type(1) = 1
MyS22Type(1) = 1
MyS12Type(1) = 1

ret = SapModel.PropArea.SetShellLayer_1("A1",
MyNumberLayers, MyLayerName, MyDist, MyThickness, MyType,
MyNumIntegrationPts, MyMatProp, MyMatAng, MyS11Type, MyS22Type,
MyS12Type)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.5.

This function supersedes SetShellLayer


See Also
GetShellLayer_1
ChangeName
Syntax
SapObject.SapModel.PropCable.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined cable property.
NewName
The new name for the cable property.
Remarks
This function changes the name of an existing cable property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeCablePropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'change name of cable property


ret = SapModel.PropCable.ChangeName("C1", "MyCable")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropCable.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined cable properties in the model.
VBA Example
Sub CountCableProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'return number of defined cable properties


Count = SapModel.PropCable.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropCable.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing cable property.
Remarks
The function deletes a specified cable property.
The function returns zero if the property is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified property can not be
deleted, for example, if it is assigned to an existing object.
VBA Example
Sub DeleteCableProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable properties


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)
ret = SapModel.PropCable.SetProp("C2", Name, 3.25)

'delete cable property


ret = SapModel.PropCable.Delete("C1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetModifiers
Syntax
SapObject.SapModel.PropCable.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing cable property.
Value
This is an array of three unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
Remarks
This function retrieves the modifier assignments for a cable property. The
default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetCablePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'assign modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
Value(2) = 2
ret = SapModel.PropCable.SetModifiers("C1", Value)

'get modifiers
ReDim Value(2)
ret = SapModel.PropCable.GetModifiers("C1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetModifiers
GetNameList
Syntax
SapObject.SapModel.PropCable.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of cable property names retrieved by the program.
MyName
This is a one-dimensional array of cable property names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined cable properties in the model.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetCableNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable properties


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)
ret = SapModel.PropCable.SetProp("C2", Name, 3.25)

'get cable property names


ret = SapModel.PropCable.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
Syntax
SapObject.SapModel.PropCable.GetProp
VB6 Procedure
Function GetProp(ByVal Name As String, ByRef MatProp As String, ByRef Area
As Double, ByRef Color As Long, ByRef Notes As String, ByRef GUID As
String) As Long
Parameters
Name
The name of an existing cable property.
MatProp
The name of the material property assigned to the cable property.
Area
The cross-sectional area of the cable. [L2]
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves cable property definition data.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetCableProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim Area As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'get cable property data


ret = SapModel.PropCable.GetProp("C1", MatProp, Area, Color,
Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetProp
SetModifiers
Syntax
SapObject.SapModel.PropCable.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing cable property.
Value
This is an array of 3 unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
Remarks
This function assigns property modifiers to a cable property. The default value
for all modifiers is one.
The function returns zero if the modifiers are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignCablePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'assign modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(1) = 2
Value(2) = 2
ret = SapModel.PropCable.SetModifiers("C1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetModifiers
SetProp
Syntax
SapObject.SapModel.PropCable.SetProp
VB6 Procedure
Function SetProp(ByVal Name As String, ByVal MatProp As String, ByVal Area
As Double, Optional ByVal Color As Long = -1, Optional ByVal Notes As String =
"", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new cable property. If this is an existing property, that
property is modified; otherwise, a new property is added.
MatProp
The name of the material property assigned to the cable property.
Area
The cross-sectional area of the cable. [L2]
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function defines a cable property.
The function returns zero if the property is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetCableProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add material
ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new cable property


ret = SapModel.PropCable.SetProp("C1", Name, 2.25)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
ChangeName
Syntax
SapObject.SapModel.PropFrame.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined frame section property.
NewName
The new name for the frame section property.
Remarks
This function changes the name of an existing frame section property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeFramePropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name of frame section property


ret = SapModel.PropFrame.ChangeName("FSEC1", "MySection")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropFrame.Count
VB6 Procedure
Function Count(Optional ByVal PropType As eFramePropType) As Long
Parameters
PropType
This optional value is one of the following items in the eFramePropType
enumeration.
SECTION_I = 1
SECTION_CHANNEL = 2
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_DBLANGLE = 5
SECTION_BOX = 6
SECTION_PIPE = 7
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
SECTION_GENERAL = 10
SECTION_DBCHANNEL = 11
SECTION_AUTO = 12
SECTION_SD = 13
SECTION_VARIABLE = 14
SECTION_JOIST = 15
SECTION_BRIDGE = 16
SECTION_COLD_C = 17
SECTION_COLD_2C = 18
SECTION_COLD_Z = 19
SECTION_COLD_L = 20
SECTION_COLD_2L = 21
SECTION_COLD_HAT = 22
SECTION_BUILTUP_I_COVERPLATE = 23
SECTION_PCC_GIRDER_I = 24
SECTION_PCC_GIRDER_U = 25
SECTION_BUILTUP_I_HYBRID = 26
SECTION_BUILTUP_U_HYBRID = 27

If no value is input for PropType, a count is returned for all frame section
properties in the model regardless of type.
Remarks
This function returns the total number of defined frame section properties in the
model. If desired, counts can be returned for all frame section properties of a
specified type in the model.
VBA Example
Sub CountFrameProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined materials of all types


Count = SapModel.PropFrame.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Builtup I Hybrid and Builitup U Hybrid added with Version 16.0.0.
See Also
Delete
Syntax
SapObject.SapModel.PropFrame.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing frame section property.
Remarks
The function deletes a specified frame section property.
The function returns zero if the frame section property is successfully deleted;
otherwise it returns a nonzero value. It returns an error if the specified frame
section property can not be deleted; for example, if it is being used by a frame
object.
VBA Example
Sub DeleteFrameProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set new frame section property


ret = SapModel.PropFrame.SetGeneral("GEN1", "A992Fy50", 24,
14, 100, 80, 80, 4, 1000, 2400, 140, 200, 150, 220, 3, 5, -1, "API
example", "Default")

'get frame object names


ret = SapModel.FrameObj.GetNameList(NumberNames, MyName)

'set frame section property


For i = 1 to NumberNames
ret = SapModel.FrameObj.SetSection(MyName(i - 1), "GEN1")
Next i

'delete frame property


ret = SapModel.PropFrame.Delete("FSEC1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAngle
Syntax
SapObject.SapModel.PropFrame.GetAngle
VB6 Procedure
Function GetAngle(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file; this is the name of that
file. If the section property was not imported; this item is blank.
MatProp
The name of the material property for the section.
t3
The vertical leg depth. [L]
t2
The horizontal leg width. [L]
tf
The horizontal leg thickness. [L]
tw
The vertical leg thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for an angle-type frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetAngle("ANGLE1", "A992Fy50", 6,
4, 0.5, 0.5)

'get frame section property data


ret = SapModel.PropFrame.GetAngle("ANGLE1", FileName,
MatProp, t3, t2, tf, tw, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAngle
SetRebarBeam
GetRebarBeam
GetAutoSelectAluminum
Syntax
SapObject.SapModel.PropFrame.GetAutoSelectAluminum
VB6 Procedure
Function GetAutoSelectAluminum(ByVal Name As String, ByVal NumberItems
As Long, ByRef SectName() As String, ByRef AutoStartSection As String,
ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing auto select section list-type frame section property.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
AutoStartSection
This is Median or the name of a frame section property in the SectName array.
It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a aluminum auto select
lists.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetFramePropAutoSelectAluminum()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String
Dim NumberItems As Long
Dim SectName() As String
Dim AutoStartSection As String
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section properties


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("AI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("AI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "AI"
MyName(1) = "AI2"
MyName(2) = "AI3"
ret = SapModel.PropFrame.SetAutoSelectAluminum("AUTO1", 3,
MyName)

'get auto select list data


ret = SapModel.PropFrame.GetAutoSelectAluminum("AUTO1",
NumberItems, SectName, AutoStartSection, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAutoSelectAluminum
GetAutoSelectColdFormed
Syntax
SapObject.SapModel.PropFrame.GetAutoSelectColdFormed
VB6 Procedure
Function GetAutoSelectColdFormed(ByVal Name As String, ByVal NumberItems
As Long, ByRef SectName() As String, ByRef AutoStartSection As String,
ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing auto select section list-type frame section property.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
AutoStartSection
This is Median or the name of a frame section property in the SectName array.
It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a cold formed auto select
lists.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetFramePropAutoSelectColdFormed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String
Dim NumberItems As Long
Dim SectName() As String
Dim AutoStartSection As String
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section properties


ret = SapModel.PropFrame.SetISection("CI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("CI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("CI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "CI", "CI")
'define new auto select list frame section property
ReDim MyName(2)
MyName(0) = "CI"
MyName(1) = "CI2"
MyName(2) = "CI3"
ret = SapModel.PropFrame.SetAutoSelectColdFormed("AUTO1", 3,
MyName)

'get auto select list data


ret = SapModel.PropFrame.GetAutoSelectColdFormed("AUTO1",
NumberItems, SectName, AutoStartSection, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAutoSelectColdFormed
GetAutoSelectSteel
Syntax
SapObject.SapModel.PropFrame.GetAutoSelectSteel
VB6 Procedure
Function GetAutoSelectSteel(ByVal Name As String, ByVal NumberItems As
Long, ByRef SectName() As String, ByRef AutoStartSection As String, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing auto select section listtype frame section property.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
AutoStartSection
This is either Median or the name of a frame section property in the SectName
array. It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a steel auto select lists.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetFramePropAutoSelectSteel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String
Dim NumberItems As Long
Dim SectName() As String
Dim AutoStartSection As String
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50",
20, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC3", "A992Fy50",
16, 8, 0.5, 0.3, 8, 0.5)

'set new auto select list frame section property


ReDim MyName(2)
MyName(0) = "ISEC1"
MyName(1) = "ISEC2"
MyName(2) = "ISEC3"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName, "ISEC2")

'get auto select list data


ret = SapModel.PropFrame.GetAutoSelectSteel("AUTO1",
NumberItems, SectName, AutoStartSection, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetAutoSelectSteel
GetChannel
Syntax
SapObject.SapModel.PropFrame.GetChannel
VB6 Procedure
Function GetChannel(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a channel-type frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetChannel("CHN1", "A992Fy50", 24,
6, 0.5, 0.3)

'get frame section property data


ret = SapModel.PropFrame.GetChannel("CHN1", FileName,
MatProp, t3, t2, tf, tw, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetChannel
GetCircle
Syntax
SapObject.SapModel.PropFrame.GetCircle
VB6 Procedure
Function GetCircle(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef Color As Long, ByRef Notes As
String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing circular frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section diameter. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a circular frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetCircle("C1", "4000Psi", 20)

'get frame section property data


ret = SapModel.PropFrame.GetCircle("C1", FileName, MatProp,
t3, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetCircle
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
GetColdC
Syntax
SapObject.SapModel.PropFrame.GetColdC
VB6 Procedure
Function GetColdC(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef Thickness
As Double, ByRef Radius As Double, ByRef LipDepth As Double, ByRef Color
As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing cold formed C-type frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a cold formed C-type
frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropColdC()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim Thickness As Double
Dim Radius As Double
Dim LipDepth As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdC("CC1", Name, 10, 3.2,
0.08, 0.3, 0.6)

'get frame section property data


ret = SapModel.PropFrame.GetColdC("CC1", FileName, MatProp,
t3, t2, Thickness , Radius, LipDepth, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetColdC
GetColdHat
Syntax
SapObject.SapModel.PropFrame.GetColdHat
VB6 Procedure
Function GetColdHat(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef Thickness
As Double, ByRef Radius As Double, ByRef LipDepth As Double, ByRef Color
As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing cold formed hat-type frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a cold formed hat-type
frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropColdHat()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim Thickness As Double
Dim Radius As Double
Dim LipDepth As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdHat("CH1", Name, 10, 3.2,
0.08, 0.3, 0.6)

'get frame section property data


ret = SapModel.PropFrame.GetColdHat("CH1", FileName,
MatProp, t3, t2, Thickness , Radius, LipDepth, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetColdHat
GetColdZ
Syntax
SapObject.SapModel.PropFrame.GetColdZ
VB6 Procedure
Function GetColdZ(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef Thickness
As Double, ByRef Radius As Double, ByRef LipDepth As Double, ByRef
LipAngle As Double, ByRef Color As Long, ByRef Notes As String, ByRef GUID
As String) As Long
Parameters
Name
The name of an existing cold formed Z-type frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
LipAngle
The lip angle measured from horizontal (0 <= LipAngle <= 90). [deg]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a cold formed Z-type
frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropColdZ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim Thickness As Double
Dim Radius As Double
Dim LipDepth As Double
Dim LipAngle As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdZ("CZ1", Name, 10, 3.2,
0.08, 0.3, 0.6, 60)
'get frame section property data
ret = SapModel.PropFrame.GetColdZ("CZ1", FileName, MatProp,
t3, t2, Thickness , Radius, LipDepth, LipAngle, Color, Notes,
GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetColdZ
GetCoverPlatedI
Syntax
SapObject.SapModel.PropFrame.GetCoverPlatedI
VB6 Procedure
Function GetCoverPlatedI(ByVal Name As String, ByRef SectName As String,
ByRef FyTopFlange As Double, ByRef FyWeb As Double, ByRef FyBotFlange
As Double, ByRef tc As Double, ByRef bc As Double, ByRef MatPropTop As
String, ByRef tcb As Double, ByRef bcb As Double, ByRef MatPropBot As
String, ByRef Color As Long, ByRef Notes As String, ByRef GUID As String) As
Long
Parameters
Name
The name of an existing frame section property.
SectName
The name of an existing I-type frame section property that is used for the I-
section portion of the coverplated I section.
FyTopFlange
The yield strength of the top flange of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
FyWeb
The yield strength of the web of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
FyBotFlange
The yield strength of the bottom flange of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
tc
The thickness of the top cover plate. [L]
If the tc or the bc item is less than or equal to 0, no top cover plate exists.
bc
The width of the top cover plate. [L]
If the tc or the bc item is less than or equal to 0, no top cover plate exists.
MatPropTop
The name of the material property for the top cover plate.
This item applies only if both the tc and the bc items are greater than 0.
tcb
The thickness of the bottom cover plate. [L]
If the tcb or the bcb item is less than or equal to 0, no bottom cover plate exists.
bcb
The width of the bottom cover plate. [L]
If the tcb or the bcb item is less than or equal to 0, no bottom cover plate exists.
MatPropBot
The name of the material property for the bottom cover plate.
This item applies only if both the tcb and the bcb items are greater than 0.
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a tube-type frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropCoverPlatedI()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SectName As String
Dim FyTopFlange As Double
Dim FyWeb As Double
Dim FyBotFlange As Double
Dim tc As Double
Dim bc As Double
Dim MatPropTop As String
Dim tcb As Double
Dim bcb As Double
Dim MatPropBot As String
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC", "A992Fy50", 24,
8, 0.5, 0.3, 8, 0.5)

'set new cover plated I-type frame section property


ret = SapModel.PropFrame.SetCoverPlatedI("CPI1", "ISEC", 0,
36, 0, 0.75, 14, "A992Fy50", 0.5, 6, "A992Fy50")
'get frame section property data for cover plated I
ret = SapModel.PropFrame.GetCoverPlatedI("CPI1", SectName,
FyTopFlange, FyWeb, FyBotFlange, tc, bc, MatPropTop, tcb, bcb,
MatPropBot, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetCoverPlatedI
GetDblAngle
Syntax
SapObject.SapModel.PropFrame.GetDblAngle
VB6 Procedure
Function GetDblAngle(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef dis As Double, ByRef Color As Long, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The vertical leg depth. [L]
t2
The total width of the section, that is, the sum of the widths of each horizontal leg
plus the back-to-back distance. [L]
tf
The horizontal leg thickness. [L]
tw
The vertical leg thickness. [L]
dis
The back-to-back distance between the angles. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a double angle-type
frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropDblAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim dis As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetDblAngle("DBANG1", "A992Fy50",
6, 9, 0.5, 0.5, 1)

'get frame section property data


ret = SapModel.PropFrame.GetDblAngle("DBANG1", FileName,
MatProp, t3, t2, tf, tw, dis, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetDblAngle
GetDblChannel
Syntax
SapObject.SapModel.PropFrame.GetDblChannel
VB6 Procedure
Function GetDblChannel(ByVal Name As String, ByRef FileName As String,
ByRef MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef dis As Double, ByRef Color As Long, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The total width of the section, that is, the sum of the widths of each flange plus
the back-to-back distance. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
dis
The back-to-back distance between the channels. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a double channel-type
frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropDblChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim dis As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetDblChannel("DBCHN1", "A992Fy50",
12, 6.5, 0.5, 0.3, 0.5)

'get frame section property data


ret = SapModel.PropFrame.GetDblChannel("DBCHN1", FileName,
MatProp, t3, t2, tf, tw, dis, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetDblChannel
GetGeneral
Syntax
SapObject.SapModel.PropFrame.GetGeneral
VB6 Procedure
Function GetGeneral(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef Area As
Double, ByRef As2 As Double, ByRef As3 As Double, ByRef Torsion As
Double, ByRef I22 As Double, ByRef I33 As Double, ByRef S22 As Double,
ByRef S33 As Double, ByRef Z22 As Double, ByRef Z33 As Double, ByRef
R22 As Double, ByRef R33 As Double, ByRef Color As Long, ByRef Notes As
String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Area
The cross-sectional area. [L2]
As2
The shear area for forces in the section local 2-axis direction. [L2]
As3
The shear area for forces in the section local 3-axis direction. [L2]
Torsion
The torsional constant. [L4]
I22
The moment of inertia for bending about the local 2 axis. [L4]
I33
The moment of inertia for bending about the local 3 axis. [L4]
S22
The section modulus for bending about the local 2 axis. [L3]
S33
The section modulus for bending about the local 3 axis. [L3]
Z22
The plastic modulus for bending about the local 2 axis. [L3]
Z33
The plastic modulus for bending about the local 3 axis. [L3]
R22
The radius of gyration about the local 2 axis. [L]
R33
The radius of gyration about the local 3 axis. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a general frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropGeneral()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim Area As Double
Dim as2 As Double
Dim as3 As Double
Dim Torsion As Double
Dim I22 As Double
Dim I33 As Double
Dim S22 As Double
Dim S33 As Double
Dim Z22 As Double
Dim Z33 As Double
Dim R22 As Double
Dim R33 As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetGeneral("GEN1", "A992Fy50", 24,
14, 100, 80, 80, 4, 1000, 2400, 140, 200, 150, 220, 3, 5, -1, "API
example", "Default")

'get frame section property data


ret = SapModel.PropFrame.GetGeneral("GEN1", FileName,
MatProp, t3, t2, Area, As2, As3, Torsion, I22, I33, S22, S33, Z22,
Z33, R22, R33, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetGeneral
GetHybridISection
Syntax
SapObject.SapModel.PropFrame.GetHybridISection
VB6 Procedure
Function GetHybridISection(ByVal name As String, ByRef MatPropTopFlange As
String, ByRef MatPropWeb As String, ByRef MatPropBotFlange As String,
ByRef t3 As Double, ByRef t2 As Double, ByRef TF As Double, ByRef TW As
Double, ByRef t2b As Double, ByRef tfb As Double,
ByRef color As Long, ByRef notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
MatPropTopFlange
The name of the material property for the top flange.
MatPropWeb
The name of the material property for the web.
MatPropBotFlange
The name of the material property for the bottom flange.
t3
The height of the section. [L]
t2
The width of the top flange. [L]
TF
The thickness of the top flange. [L]
TW
The thickness of the web. [L]
t2b
The width of the bottom flange. [L]
tfb
The thickness of the bottom flange. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a steel hybrid I frame
section.
The function returns zero if the section property data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropHybridISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatPropTopFlange As String
Dim MatPropWeb As String
Dim MatPropBotFlange As String
Dim t3 As Double
Dim t2 As Double
Dim TF As Double
Dim TW As Double
Dim t2b As Double
Dim tfb As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new Hybrid I-type frame section property


ret = SapModel.PropFrame.SetHybridISection("HybridI",
"A992Fy50", "A992Fy50", "A992Fy50", 24, 8, 0.5, 0.3, 8, 0.5)

'get frame section property data for cover plated I


ret = SapModel.PropFrame.GetHybridISection("HybridI",
MatPropTopFlange, MatPropWeb, MatPropBotFlange, t3, t2, TF, TW,
t2b, tfb, Color, Notes, GUID)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetHybridUSection
Syntax
SapObject.SapModel.PropFrame.GetHybridUSection
VB6 Procedure
Function GetHybridUSection(ByVal name As String, ByRef WebMaterial As
String, ByRef TopFlangeMaterial As String, ByRef BotFlangeMaterial As String,
ByRef T() As Double, ByRef color As Long, ByRef notes As String, ByRef GUID
As String) As Long
Parameters
Name
The name of an existing frame section property.
WebMaterial
The name of the material property for the webs.
TopFlangeMaterial
The name of the material property for the top flanges.
BotFlangeMaterial
The name of the material property for the bottom flange.
T()
The dimension array of the section:
(0) D1 = Web Depth (vertical, inside to inside of flanges). [L]
(1) B1 = Web Distance at Top (CL to CL). [L]
(2) B2 = Bottom Flange Width. [L]
(3) B3 = Top Flange Width (per each). [L]
(4) B4 = Bottom Flange Lip (Web CL to flange edge, may be zero). [L]
(5) tw = Web Thickness. [L]
(6) tf = Top Flange Thickness. [L]
(7) tfb = Bottom Flange Thickness. [L]

Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a steel hybrid U frame
section.
The function returns zero if the section property data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropHybridUSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim WebMaterial As String
Dim TopFlangeMaterial As String
Dim BotFlangeMaterial As String
Dim T() As Double
Dim MyT() As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new Hybrid U-type frame section property


Redim T(7)
T(0) = 48
T(1) = 64
T(2) = 48
T(3) = 15
T(4) = 1.5
T(5) = 1
T(6) = 2
T(7) = 2
ret = SapModel.PropFrame.SetHybridUSection("HybridU",
"A992Fy50", "A992Fy50", "A992Fy50", T())
'get frame section property data for cover plated I
ret = SapModel.PropFrame.GetHybridUSection("HybridI",
WebMaterial, TopFlangeMaterial, BotFlangeMaterial, MyT(), Color,
Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetISection
Syntax
SapObject.SapModel.PropFrame.GetISection
VB6 Procedure
Function GetISection(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef t2b As Double, ByRef tfb As Double, ByRef
Color As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing I-type frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The top flange width. [L]
tf
The top flange thickness. [L]
tw
The web thickness. [L]
t2b
The bottom flange width. [L]
tfb
The bottom flange thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for an I-type frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim t2b As Double
Dim tfb As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get frame section property data


ret = SapModel.PropFrame.GetISection("FSEC1", FileName,
MatProp, t3, t2, tf, tw, t2b, tfb, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetISection
GetModifiers
Syntax
SapObject.SapModel.PropFrame.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing frame section property.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function retrieves the modifier assignments for a frame section property.
The default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.PropFrame.SetModifiers("FSEC1", Value)

'get modifiers
ReDim Value(7)
ret = SapModel.PropFrame.GetModifiers("FSEC1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetModifiers
GetNameInPropFile
Syntax
SapObject.SapModel.PropFrame.GetNameInPropFile
VB6 Procedure
Function GetNameInPropFile(ByVal Name As String, ByRef NameInFile As
String, ByRef FileName As String, ByRef MatProp As String, ByRef PropType
As eFramePropType) As Long
Parameters
Name
The name of an existing frame section property.
NameInFile
The name of the specified frame section property in the frame section property
file.
FileName
The name of the frame section property file from which the specified frame
section property was obtained.
MatProp
The name of the material property for the section.
PropType
This is one of the following items in the eFramePropType enumeration.
SECTION_I = 1
SECTION_CHANNEL = 2
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_DBLANGLE = 5
SECTION_BOX = 6
SECTION_PIPE = 7
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
SECTION_GENERAL = 10
SECTION_DBCHANNEL = 11
SECTION_AUTO = 12
SECTION_SD = 13
SECTION_VARIABLE = 14
SECTION_JOIST = 15
SECTION_BRIDGE = 16
SECTION_COLD_C = 17
SECTION_COLD_2C = 18
SECTION_COLD_Z = 19
SECTION_COLD_L = 20
SECTION_COLD_2L = 21
SECTION_COLD_HAT = 22
SECTION_BUILTUP_I_COVERPLATE = 23
SECTION_PCC_GIRDER_I = 24
SECTION_PCC_GIRDER_U = 25
Remarks
This function retrieves the names of the section property file from which an
imported frame section originated, and it also retrieves the section name used in
the property file.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
If the specified frame section property was not imported, blank strings are
returned for NameInFile and FileName.
VBA Example
Sub GetFramePropNameInFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NameInFile As String
Dim FileName As String
Dim MatProp As String
Dim PropType As eFramePropType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section property


ret = SapModel.PropFrame.ImportProp("MyFrame", "A992Fy50",
"Sections8.pro", "W18X35")

'get frame property name in file


ret = SapModel.PropFrame.GetNameInPropFile("MyFrame",
NameInFile, FileName, MatProp, PropType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetNameList
Syntax
SapObject.SapModel.PropFrame.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal PropType As eFramePropType) As Long
Parameters
NumberNames
The number of frame section property names retrieved by the program.
MyName
This is a one-dimensional array of frame section property names. The MyName
array is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
PropType
This optional value is one of the following items in the eFramePropType
enumeration.
SECTION_I = 1
SECTION_CHANNEL = 2
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_DBLANGLE = 5
SECTION_BOX = 6
SECTION_PIPE = 7
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
SECTION_GENERAL = 10
SECTION_DBCHANNEL = 11
SECTION_AUTO = 12
SECTION_SD = 13
SECTION_VARIABLE = 14
SECTION_JOIST = 15
SECTION_BRIDGE = 16
SECTION_COLD_C = 17
SECTION_COLD_2C = 18
SECTION_COLD_Z = 19
SECTION_COLD_L = 20
SECTION_COLD_2L = 21
SECTION_COLD_HAT = 22
SECTION_BUILTUP_I_COVERPLATE = 23
SECTION_PCC_GIRDER_I = 24
SECTION_PCC_GIRDER_U = 25
SECTION_BUILTUP_I_HYBRID = 26
SECTION_BUILTUP_U_HYBRID = 27
If no value is input for PropType, names are returned for all frame section
properties in the model regardless of type.
Remarks
This function retrieves the names of all defined frame section properties of the
specified type.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetFramePropNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get frame section property names


ret = SapModel.PropFrame.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Builtup I Hybrid and Builitup U Hybrid added with Version 15.0.0.
See Also
GetNonPrismatic
Syntax
SapObject.SapModel.PropFrame.GetNonPrismatic
VB6 Procedure
Function GetNonPrismatic(ByVal Name As String, ByRef NumberItems As
Long, ByRef StartSec() As String, ByRef EndSec() As String, ByRef MyLength()
As Double, ByRef MyType() As Long, ByRef EI33() As Long, ByRef EI22() As
Long, ByRef Color As Long, ByRef Notes As String, ByRef GUID As String) As
Long
Parameters
NumberItems
The number of segments assigned to the nonprismatic section.
StartSec
This is an array of the names of the frame section properties at the start of each
segment.
EndSec
This is an array of the names of the frame section properties at the end of each
segment.
MyLength
This is an array that includes the length of each segment. The length may be
variable or absolute as indicated by the MyType item. [L] when length is absolute
MyType
This is an array of either 1 or 2, indicating the length type for each segment.
1 = Variable (relative length)
2 = Absolute
EI33, EI22
This is an array of either 1, 2 or 3, indicating the variation type for EI33 and EI22
in each segment.
1 = Linear
2 = Parabolic
3 = Cubic
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for nonprismatic (variable)
sections.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetFramePropNonPrismatic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim StartSec() As String
Dim EndSec() As String
Dim MyLength() As Double
Dim MyType() As Long
Dim EI33() As Long
Dim EI22() As Long
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50",
20, 8, 0.5, 0.3, 8, 0.5)

'set new nonprismatic frame section property


ReDim StartSec(2)
ReDim EndSec(2)
ReDim MyLength(2)
ReDim MyType(2)
ReDim EI33(2)
ReDim EI22(2)
StartSec(0) = "ISEC2"
EndSec(0) = "ISEC1"
MyLength(0) = 60
MyType(0) = 2
EI33(0)= 2
EI22(0)= 1

StartSec(1) = "ISEC1"
EndSec(1) = "ISEC1"
MyLength(1) = 1
MyType(1) = 1
EI33(1)= 2
EI22(1)= 1

StartSec(2) = "ISEC1"
EndSec(2) = "ISEC2"
MyLength(2) = 60
MyType(2) = 2
EI33(2)= 2
EI22(2)= 1

ret = SapModel.PropFrame.SetNonPrismatic("NP1", 3, StartSec,


EndSec, MyLength, MyType, EI33, EI22)

'clear arrays
ReDim StartSec(0)
ReDim EndSec(0)
ReDim MyLength(0)
ReDim MyType(0)
ReDim EI33(0)
ReDim EI22(0)

'get nonprismatic section data


ret = SapModel.PropFrame.GetNonPrismatic("NP1", NumberItems,
StartSec, EndSec, MyLength, MyType, EI33, EI22, Color, Notes,
GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetNonPrismatic
GetPipe
Syntax
SapObject.SapModel.PropFrame.GetPipe
VB6 Procedure
Function GetPipe(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef tw As Double, ByRef Color As
Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The outside diameter. [L]
tw
The wall thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a pipe-type frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropPipe()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim tw As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetPipe("PIPE1", "A992Fy50", 8,
0.375)

'get frame section property data


ret = SapModel.PropFrame.GetPipe("PIPE1", FileName, MatProp,
t3, tw, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetPipe
GetPrecastI_1
Syntax
SapObject.SapModel.PropFrame.GetPrecastI_1
VB6 Procedure
Function GetPrecastI_1(ByVal Name As String, ByRef FileName As String,
ByRef MatProp As String, ByRef b() As Double, ByRef d() As Double, ByRef t()
As Double, ByRef c As Double, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing precast concrete I girder frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 3, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (>= 0)
b(3) = B4 (>= 0)
Section dimensions B1 through B4 are defined on the precast concrete I girder
definition form.
d
This is an array, dimensioned to 5, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (> 0)
d(5) = D6 (>= 0)
d(6) = D7 (>=0)
Section dimensions D1 through D7 are defined on the precast concrete I girder
definition form.
t
This is an array, dimensioned to 1, containing the web thickness dimensions. [L]
T(0) = T1 (> 0)
T(1) = T2 (> 0)
Section dimensions T1 and T2 are defined on the precast I girder definition
form.
c
The bottom flange chamfer dimension, denoted as C1 on the precast concrete I
girder definition form.
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a precast concrete I
girder frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropPrecastI_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim bb() As Double
Dim dd() As Double
Dim b() As Double
Dim d() As Double
Dim t() As Double
Dim c As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ReDim bb(3)
ReDim dd(5)
bb(0) = 12
bb(1) = 16
bb(2) = 0
bb(3) = 0
dd(0) = 28
dd(1) = 4
dd(2) = 3
dd(3) = 0
dd(4) = 5
dd(5) = 5
dd(6) = 0
tt(0) = 6
tt(1) = 6
cc = 0
ret = SapModel.PropFrame.SetPrecastI_1("PC1", "4000Psi", bb,
dd, tt, cc)

'get frame section property data


ret = SapModel.PropFrame.GetPrecastI_1("PC1", FileName,
MatProp, b, d, t, c, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
This function supersedes GetPrecast1.
See Also
SetPrecastI_1
GetPrecastU
Syntax
SapObject.SapModel.PropFrame.GetPrecastU
VB6 Procedure
Function GetPrecastU(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef b() As Double, ByRef d() As Double, ByRef Color As
Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing precast concrete U girder frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 5, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (> 0)
b(3) = B4 (>= 0)
b(4) = B5 (>= 0)
b(5) = B6 (>= 0)
Section dimensions B1 through B6 are defined on the precast concrete U girder
definition form.
d
This is an array, dimensioned to 6, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (>= 0)
d(5) = D6 (>= 0)
d(6) = D7 (>= 0)
Section dimensions D1 through D7 are defined on the precast concrete U girder
definition form.
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a precast concrete U
girder frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropPrecastU()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim bb() As Double
Dim dd() As Double
Dim b() As Double
Dim d() As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set present units to kN-mm


ret = SapModel.SetPresentUnits(kN_mm_C)

'set new frame section property


ReDim bb(5)
ReDim dd(6)
bb(0) = 2350
bb(1) = 1500
bb(2) = 200
bb(3) = 75
bb(4) = 143.8447
bb(5) = 0
dd(0) = 1700
dd(1) = 175
dd(2) = 75
dd(3) = 0
dd(4) = 0
dd(5) = 125
dd(6) = 175
ret = SapModel.PropFrame.SetPrecastU("PC1", "4000Psi", bb,
dd)

'get frame section property data


ret = SapModel.PropFrame.GetPrecastU("PC1", FileName,
MatProp, b, d, Color, Notes, GUID)

'set present units to kip-in


ret = SapModel.SetPresentUnits(kip_in_F)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetPrecastU
GetPropFileNameList
Syntax
SapObject.SapModel.PropFrame.GetPropFileNameList
VB6 Procedure
Function GetPropFileNameList(ByVal FileName As String, ByRef
NumberNames As Long, ByRef MyName() As String, ByRef MyPropType() As
eFramePropType, Optional ByVal PropType As eFramePropType) As Long
Parameters
FileName
The name of the frame section property file from which to get the name list.
In most cases, inputting only the name of the property file (e.g. Sections8.pro) is
required, and the program will be able to find it. In some cases, inputting the full
path to the property file may be necessary.
NumberNames
The number of frame section property names retrieved by the program.
MyName
This is an array the includes the property names obtained from the frame
section property file.
MyType
This is an array the includes the property type for each property obtained from
the frame section property file. See the PropType item below for a list of the
possible property types.
PropType
This optional value is one of the following items in the eFramePropType
enumeration.
SECTION_I = 1
SECTION_CHANNEL = 2
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_DBLANGLE = 5
SECTION_BOX = 6
SECTION_PIPE = 7
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
SECTION_GENERAL = 10
SECTION_DBCHANNEL = 11
SECTION_AUTO = 12
SECTION_SD = 13
SECTION_VARIABLE = 14
SECTION_JOIST = 15
SECTION_BRIDGE = 16
SECTION_COLD_C = 17
SECTION_COLD_2C = 18
SECTION_COLD_Z = 19
SECTION_COLD_L = 20
SECTION_COLD_2L = 21
SECTION_COLD_HAT = 22
SECTION_BUILTUP_I_COVERPLATE = 23
SECTION_PCC_GIRDER_I = 24
SECTION_PCC_GIRDER_U = 25
SECTION_BUILTUP_I_HYBRID = 26
SECTION_BUILTUP_U_HYBRID = 27

If no value is input for PropType, names are returned for all frame section
properties in the specified file regardless of type.
Remarks
This function retrieves the names of all defined frame section properties of a
specified type in a specified frame section property file.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetFramePropNamesFromFile()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String
Dim MyType() As eFramePropType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get frame section property names


ret =
SapModel.PropFrame.GetPropFileNameList("Sections8.pro",
NumberNames, MyName, MyType, SECTION_I)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Builtup I Hybrid and Builitup U Hybrid added with Version 15.0.0.
See Also
ImportProp
GetRebarBeam
Syntax
SapObject.SapModel.PropFrame.GetRebarBeam
VB6 Procedure
Function GetRebarBeam(ByVal Name As String, ByRef MatPropLong As String,
ByRef MatPropConfine As String, ByRef CoverTop As Double, ByRef CoverBot
As Double, ByRef TopLeftArea As Double, ByRef TopRightArea As Double,
ByRef BotLeftArea As Double, ByRef BotRightArea As Double) As Long
Parameters
Name
The name of an existing frame section property.
MatPropLong
The name of the rebar material property for the longitudinal rebar.
MatPropConfine
The name of the rebar material property for the confinement rebar.
CoverTop
The distance from the top of the beam to the centroid of the top longitudinal
reinforcement. [L]
CoverBot
The distance from the bottom of the beam to the centroid of the bottom
longitudinal reinforcement. [L]
TopLeftArea
The total area of longitudinal reinforcement at the top left end of the beam. [L2]
TopRightArea
The total area of longitudinal reinforcement at the top right end of the beam. [L2]
BotLeftArea
The total area of longitudinal reinforcement at the bottom left end of the beam.
[L2]
BotRightArea
The total area of longitudinal reinforcement at the bottom right end of the beam.
[L2]
Remarks
This function retrieves beam rebar data for frame sections.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
This function applies only to the following section types. Calling this function for
any other type of frame section property returns an error.
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
The material assigned to the specified frame section property must be concrete
or this function returns an error.
VBA Example
Sub GetBeamRebar()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim RebarName As String
Dim MatPropLong As String
Dim MatPropConfine As String
Dim CoverTop As Double
Dim CoverBot As Double
Dim TopLeftArea As Double
Dim TopRightArea As Double
Dim BotLeftArea As Double
Dim BotRightArea As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(RebarName,
MATERIAL_REBAR, , , , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set beam rebar data


ret = SapModel.PropFrame.SetRebarBeam("R1", RebarName,
RebarName, 3.5, 3, 4.1, 4.2, 4.3, 4.4)
'get beam rebar data
ret = SapModel.PropFrame.GetRebarBeam("R1", MatPropLong,
MatPropConfine, CoverTop, CoverBot, TopLeftArea, TopRightArea,
BotLeftArea, BotRightArea)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetRebarBeam
GetRebarColumn
Syntax
SapObject.SapModel.PropFrame.GetRebarColumn
VB6 Procedure
Function GetRebarColumn(ByVal Name As String, ByRef MatPropLong As
String, ByRef MatPropConfine As String, ByRef Pattern As Long, ByRef
ConfineType As Long, ByRef Cover As Double, ByRef NumberCBars As Long,
ByRef NumberR3Bars As Long, ByRef NumberR2Bars As Long, ByRef
RebarSize As String, ByRef TieSize As String, ByRef TieSpacingLongit As
Double, ByRef Number2DirTieBars As Long, ByRef Number3DirTieBars As
Long, ByRef ToBeDesigned As Boolean) As Long
Parameters
Name
The name of an existing frame section property.
MatPropLong
The name of the rebar material property for the longitudinal rebar.
MatPropConfine
The name of the rebar material property for the confinement rebar.
Pattern
This is either 1 or 2, indicating the rebar configuration.
1 = Rectangular
2 = Circular
For circular frame section properties, this item must be 2; otherwise an error is
returned.
ConfineType
This is either 1 or 2, indicating the confinement bar type.
1 = Ties
2 = Spiral
This item applies only when Pattern = 2. If Pattern = 1, the confinement bar type
is assumed to be ties.
Cover
The clear cover for the confinement steel (ties). In the special case of circular
reinforcement in a rectangular column, this is the minimum clear cover. [L]
NumberCBars
This item applies to a circular rebar configuration, Pattern = 2. It is the total
number of longitudinal reinforcing bars in the column.
NumberR3Bars
This item applies to a rectangular rebar configuration, Pattern = 1. It is the
number of longitudinal bars (including the corner bar) on each face of the column
that is parallel to the local 3-axis of the column.
NumberR2Bars
This item applies to a rectangular rebar configuration, Pattern = 1. It is the
number of longitudinal bars (including the corner bar) on each face of the column
that is parallel to the local 2-axis of the column.
RebarSize
The rebar name for the longitudinal rebar in the column.
TieSize
The rebar name for the confinement rebar in the column.
TieSpacingLongit
The longitudinal spacing of the confinement bars (ties). [L]
Number2DirTieBars
This item applies to a rectangular reinforcing configuration, Pattern = 1. It is the
number of confinement bars (tie legs) extending in the local 2-axis direction of
the column.
Number3DirTieBars
This item applies to a rectangular reinforcing configuration, Pattern = 1. It is the
number of confinement bars (tie legs) extending in the local 3-axis direction of
the column.
ToBeDesigned
If this item is True, the column longitudinal rebar is to be designed; otherwise it is
to be checked.
Remarks
This function retrieves column rebar data for frame sections.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
This function applies only to the following section types. Calling this function for
any other type of frame section property returns an error.
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
The material assigned to the specified frame section property must be concrete
or else this function returns an error.
VBA Example
Sub GetColumnRebar()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim RebarName As String
Dim MatPropLong As String
Dim MatPropConfine As String
Dim Pattern As Long
Dim ConfineType As Long
Dim Cover As Double
Dim NumberCBars As Long
Dim NumberR3Bars As Long
Dim NumberR2Bars As Long
Dim RebarSize As String
Dim TieSize As String
Dim TieSpacingLongit As Double
Dim Number2DirTieBars As Long
Dim Number3DirTieBars As Long
Dim ToBeDesigned As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(RebarName,
MATERIAL_REBAR, , , , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set column rebar data


ret = SapModel.PropFrame.SetRebarColumn("R1", RebarName,
RebarName, 2, 2, 2, 10, 0, 0, "#10", "#5", 4, 0, 0, False)

'get column rebar data


ret = SapModel.PropFrame.GetRebarColumn("R1", MatPropLong,
MatPropConfine, Pattern, ConfineType, Cover, NumberCBars,
NumberR3Bars, NumberR2Bars, RebarSize, TieSize, TieSpacingLongit,
Number2DirTieBars, Number3DirTieBars, ToBeDesigned)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetRebarColumn
GetRectangle
Syntax
SapObject.SapModel.PropFrame.GetRectangle
VB6 Procedure
Function GetRectangle(ByVal Name As String, ByRef FileName As String,
ByRef MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef
Color As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing rectangular frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a rectangular frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropRectangle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'get frame section property data


ret = SapModel.PropFrame.GetRectangle("R1", FileName,
MatProp, t3, t2, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetRectangle
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
GetSDSection
Syntax
SapObject.SapModel.PropFrame.GetSDSection
VB6 Procedure
Function GetSDSection(ByVal Name As String, ByRef MatProp As String,
ByRef NumberItems As Long, ByRef ShapeName() As String, ByRef MyType()
As Long, ByRef DesignType As Long, ByRef Color As Long, ByRef Notes As
String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing section designer property.
MatProp
The name of the base material property for the section.
NumberItems
The number of shapes defined in the section designer section.
ShapeName
This is an array that includes the name of each shape in the section designer
section.
MyType
This is an array that includes the type of each shape in the section designer
section.
1= I-section
2= Channel
3= Tee
4= Angle
5= Double Angle
6= Box
7= Pipe
8= Plate

101 = Solid Rectangle


102 = Solid Circle
103 = Solid Segment
104 = Solid Sector

201 = Polygon

301 = Reinforcing Single


302 = Reinforcing Line
303 = Reinforcing Rectangle
304 = Reinforcing Circle

401 = Reference Line


402 = Reference Circle

501 = Caltrans Square


502 = Caltrans Circle
503 = Caltrans Hexagon
504 = Caltrans Octagon
DesignType
This is 0, 1, 2 or 3, indicating the design option for the section.
0= No design
1= Design as general steel section
2= Design as a concrete column; check the reinforcing
3= Design as a concrete column; design the reinforcing
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves section property data for a section designer section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropSDSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim NumberItems As Long
Dim ShapeName() As String
Dim MyType() As Long
Dim DesignType As Long
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add I-section shapes to new property


ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)
ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH2",
"A992Fy50", "", -9, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)
ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH3",
"A992Fy50", "", 9, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)
'get section designer section property data
ret = SapModel.PropFrame.GetSDSection("SD1", MatProp,
NumberItems, ShapeName, MyType, DesignType, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetSDSection
GetSectProps
Syntax
SapObject.SapModel.PropFrame.GetSectProps
VB6 Procedure
Function GetSectProps(ByVal Name As String, ByRef Area As Double, ByRef
As2 As Double, ByRef As3 As Double, ByRef Torsion As Double, ByRef I22 As
Double, ByRef I33 As Double, ByRef S22 As Double, ByRef S33 As Double,
ByRef Z22 As Double, ByRef Z33 As Double, ByRef R22 As Double, ByRef
R33 As Double) As Long
Parameters
Name
The name of an existing frame section property.
Area
The cross-sectional area. [L2]
As2
The shear area for forces in the section local 2-axis direction. [L2]
As3
The shear area for forces in the section local 3-axis direction. [L2]
Torsion
The torsional constant. [L4]
I22
The moment of inertia for bending about the local 2 axis. [L4]
I33
The moment of inertia for bending about the local 3 axis. [L4]
S22
The section modulus for bending about the local 2 axis. [L3]
S33
The section modulus for bending about the local 3 axis. [L3]
Z22
The plastic modulus for bending about the local 2 axis. [L3]
Z33
The plastic modulus for bending about the local 3 axis. [L3]
R22
The radius of gyration about the local 2 axis. [L]
R33
The radius of gyration about the local 3 axis. [L]
Remarks
This function retrieves properties for frame section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFramePropProperties()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Area As Double
Dim as2 As Double
Dim as3 As Double
Dim Torsion As Double
Dim I22 As Double
Dim I33 As Double
Dim S22 As Double
Dim S33 As Double
Dim Z22 As Double
Dim Z33 As Double
Dim R22 As Double
Dim R33 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get frame section properties


ret = SapModel.PropFrame.GetSectProps("FSEC1", Area, As2,
As3, Torsion, I22, I33, S22, S33, Z22, Z33, R22, R33)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTee
Syntax
SapObject.SapModel.PropFrame.GetTee
VB6 Procedure
Function GetTee(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a tee-type frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropTee()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTee("TEE1", "A992Fy50", 12, 10,
0.6, 0.3)

'get frame section property data


ret = SapModel.PropFrame.GetTee("TEE1", FileName, MatProp,
t3, t2, tf, tw, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTee
SetRebarBeam
GetRebarBeam
GetTube
Syntax
SapObject.SapModel.PropFrame.GetTube
VB6 Procedure
Function GetTube(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef tf As
Double, ByRef tw As Double, ByRef Color As Long, ByRef Notes As String,
ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a tube-type frame
section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropTube()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim tf As Double
Dim tw As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTube("TUBE1", "A992Fy50", 8, 6,
0.5, 0.5)

'get frame section property data


ret = SapModel.PropFrame.GetTube("TUBE1", FileName, MatProp,
t3, t2, tf, tw, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTube
GetTypeOAPI
Syntax
SapObject.SapModel.PropFrame.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef PropType As
eFramePropType) As Long
Parameters
Name
The name of an existing frame section property.
PropType
This is one of the following items in the eFramePropType enumeration.
SECTION_I = 1
SECTION_CHANNEL = 2
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_DBLANGLE = 5
SECTION_BOX = 6
SECTION_PIPE = 7
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
SECTION_GENERAL = 10
SECTION_DBCHANNEL = 11
SECTION_AUTO = 12
SECTION_SD = 13
SECTION_VARIABLE = 14
SECTION_JOIST = 15
SECTION_BRIDGE = 16
SECTION_COLD_C = 17
SECTION_COLD_2C = 18
SECTION_COLD_Z = 19
SECTION_COLD_L = 20
SECTION_COLD_2L = 21
SECTION_COLD_HAT = 22
SECTION_BUILTUP_I_COVERPLATE = 23
SECTION_PCC_GIRDER_I = 24
SECTION_PCC_GIRDER_U = 25
Remarks
This function retrieves the property type for the specified frame section property.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetFramePropType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropType As eFramePropType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get frame property type


ret = SapModel.PropFrame.GetTypeOAPI("FSEC1", PropType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
GetTypeRebar
Syntax
SapObject.SapModel.PropFrame.GetTypeRebar
VB6 Procedure
Function GetTypeRebar(ByVal Name As String, ByRef MyType As Long) As
Long
Parameters
Name
The name of an existing frame section property.
PropType
This is 0, 1 or 2, indicating the rebar design type.
0 = None
1 = Column
2 = Beam
Remarks
This function retrieves the rebar design type for the specified frame section
property.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
This function applies only to the following section property types. Calling this
function for any other type of frame section property returns an error.
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
A nonzero rebar type is returned only if the frame section property has a
concrete material.
VBA Example
Sub GetFramePropRebarType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'get rebar design type


ret = SapModel.PropFrame.GetTypeRebar("R1", MyType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
ImportProp
Syntax
SapObject.SapModel.PropFrame.ImportProp
VB6 Procedure
Function ImportProp(ByVal Name As String, ByVal MatProp As String, ByVal
FileName As String, ByVal PropName As String, Optional ByVal Color As Long =
-1, Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added. This
name does not need to be the same as the PropName item.
MatProp
The name of the material property for the section.
FileName
The name of the frame section property file from which to get the frame section
property specified by the PropName item.
In most cases you can input just the name of the property file (e.g.
Sections8.pro) and the program will be able to find it. In some cases you may
have to input the full path to the property file.
PropName
The name of the frame section property, inside the property file specified by the
FileName item, that is to be imported.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function imports a frame section property from a property file.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
If the property file is not found, or the specified property name is not found in the
property file, the section is set to be a general section with default properties.
VBA Example
Sub ImportFrameProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section property


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPropFileNameList
SetAngle
Syntax
SapObject.SapModel.PropFrame.SetAngle
VB6 Procedure
Function SetAngle(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, Optional
ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The vertical leg depth. [L]
t2
The horizontal leg width. [L]
tf
The horizontal leg thickness. [L]
tw
The vertical leg thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, then the program assigns a GUID to the section.
Remarks
This function initializes an angle-type frame section property. If this function is
called for an existing frame section property, all items for the section are reset to
their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetAngle("ANGLE1", "A992Fy50", 6,
4, 0.5, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAngle
SetRebarBeam
GetRebarBeam
SetAutoSelectAluminum
Syntax
SapObject.SapModel.PropFrame.SetAutoSelectAluminum
VB6 Procedure
Function SetAutoSelectAluminum(ByVal Name As String, ByVal NumberItems As
Long, ByRef SectName() As String, Optional ByVal AutoStartSection As String =
"Median", Optional ByVal Notes As String = "", Optional ByVal GUID As String =
"") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
Auto select lists and nonprismatic (variable) sections are not allowed in this
array.
AutoStartSection
This is Median or the name of a frame section property in the SectName array.
It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function assigns frame section properties to an auto select list. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the auto select list is successfully filled; otherwise it
returns a nonzero value.
VBA Example
Sub SetFramePropAutoSelectAluminum()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section properties


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("AI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("AI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "AI"
MyName(1) = "AI2"
MyName(2) = "AI3"
ret = SapModel.PropFrame.SetAutoSelectAluminum("AUTO1", 3,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAutoSelectAluminum
SetAutoSelectColdFormed
Syntax
SapObject.SapModel.PropFrame.SetAutoSelectColdFormed
VB6 Procedure
Function SetAutoSelectColdFormed(ByVal Name As String, ByVal NumberItems
As Long, ByRef SectName() As String, Optional ByVal AutoStartSection As
String = "Median", Optional ByVal Notes As String = "", Optional ByVal GUID As
String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
Auto select lists and nonprismatic (variable) sections are not allowed in this
array.
AutoStartSection
This is Median or the name of a frame section property in the SectName array.
It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function assigns frame section properties to an auto select list. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the auto select list is successfully filled; otherwise it
returns a nonzero value.
VBA Example
Sub SetFramePropAutoSelectColdFormed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section properties


ret = SapModel.PropFrame.SetISection("CI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("CI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("CI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "CI", "CI")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "CI"
MyName(1) = "CI2"
MyName(2) = "CI3"
ret = SapModel.PropFrame.SetAutoSelectColdFormed("AUTO1", 3,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAutoSelectColdFormed
SetAutoSelectSteel
Syntax
SapObject.SapModel.PropFrame.SetAutoSelectSteel
VB6 Procedure
Function SetAutoSelectSteel(ByVal Name As String, ByVal NumberItems As
Long, ByRef SectName() As String, Optional ByVal AutoStartSection As String =
"Median", Optional ByVal Notes As String = "", Optional ByVal GUID As String =
"") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
NumberItems
The number of frame section properties included in the auto select list.
SectName
This is an array of the names of the frame section properties included in the
auto select list.
Auto select lists and nonprismatic (variable) sections are not allowed in this
array.
AutoStartSection
This is either Median or the name of a frame section property in the SectName
array. It is the starting section for the auto select list.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function assigns frame section properties to an auto select list. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the auto select list is successfully filled; otherwise it
returns a nonzero value.
VBA Example
Sub SetFramePropAutoSelectSteel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50",
20, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC3", "A992Fy50",
16, 8, 0.5, 0.3, 8, 0.5)

'set new auto select list frame section property


ReDim MyName(2)
MyName(0) = "ISEC1"
MyName(1) = "ISEC2"
MyName(2) = "ISEC3"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName, "ISEC2")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetAutoSelectSteel
SetChannel
Syntax
SapObject.SapModel.PropFrame.SetChannel
VB6 Procedure
Function SetChannel(ByVal Name As String, ByVal MatProp As String, ByVal t3
As Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double,
Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a channel-type frame section property. If this function is
called for an existing frame section property, all items for the section are reset to
their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetChannel("CHN1", "A992Fy50", 24,
6, 0.5, 0.3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetChannel
SetCircle
Syntax
SapObject.SapModel.PropFrame.SetCircle
VB6 Procedure
Function SetCircle(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "",
Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section diameter. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a solid circular frame section property. If this function is
called for an existing frame section property, all items for the section are reset to
their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetCircle("C1", "4000Psi", 20)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetCircle
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
SetColdC
Syntax
SapObject.SapModel.PropFrame.SetColdC
VB6 Procedure
Function SetColdC(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal t2 As Double, ByVal Thickness As Double, ByVal Radius As
Double, ByVal LipDepth As Double, Optional ByVal Color As Long = -1, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes an cold formed C-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropColdC()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdC("CC1", Name, 10, 3.2,
0.08, 0.3, 0.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetColdC
SetColdHat
Syntax
SapObject.SapModel.PropFrame.SetColdHat
VB6 Procedure
Function SetColdHat(ByVal Name As String, ByVal MatProp As String, ByVal t3
As Double, ByVal t2 As Double, ByVal Thickness As Double, ByVal Radius As
Double, ByVal LipDepth As Double, Optional ByVal Color As Long = -1, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, then the program assigns a GUID to the section.
Remarks
This function initializes an cold formed hat-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropColdHat()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdHat("CH1", Name, 10, 3.2,
0.08, 0.3, 0.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetColdHat
SetColdZ
Syntax
SapObject.SapModel.PropFrame.SetColdZ
VB6 Procedure
Function SetColdZ(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal t2 As Double, ByVal Thickness As Double, ByVal Radius As
Double, ByVal LipDepth As Double, ByVal LipAngle As Double, Optional ByVal
Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal GUID
As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property then that property is modified, otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Thickness
The section thickness. [L]
Radius
The corner radius, if any. [L]
LipDepth
The lip depth, if any. [L]
LipAngle
The lip angle measured from horizontal (0 <= LipAngle <= 90). [deg]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes an cold formed Z-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropColdZ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'set new frame section property


ret = SapModel.PropFrame.SetColdZ("CZ1", Name, 10, 3.2,
0.08, 0.3, 0.6, 60)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetColdZ
SetCoverPlatedI
Syntax
SapObject.SapModel.PropFrame.SetCoverPlatedI
VB6 Procedure
Function SetCoverPlatedI(ByVal Name As String, ByVal SectName As String,
ByVal FyTopFlange As Double, ByVal FyWeb As Double, ByVal FyBotFlange As
Double, ByVal tc As Double, ByVal bc As Double, ByVal MatPropTop As String,
ByVal tcb As Double, ByVal bcb As Double, ByVal MatPropBot As String,
Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
SectName
The name of an existing I-type frame section property that is used for the I-
section portion of the coverplated I section.
FyTopFlange
The yield strength of the top flange of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
FyWeb
The yield strength of the web of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
FyBotFlange
The yield strength of the bottom flange of the I-section. [F/L2]
If this item is 0, the yield strength of the I-section specified by the SectName
item is used.
tc
The thickness of the top cover plate. [L]
If the tc or the bc item is less than or equal to 0, no top cover plate exists.
bc
The width of the top cover plate. [L]
If the tc or the bc item is less than or equal to 0, no top cover plate exists.
MatPropTop
The name of the material property for the top cover plate.
This item applies only if both the tc and the bc items are greater than 0.
tcb
The thickness of the bottom cover plate. [L]
If the tcb or the bcb item is less than or equal to 0, no bottom cover plate exists.
bcb
The width of the bottom cover plate. [L]
If the tcb or the bcb item is less than or equal to 0, no bottom cover plate exists.
MatPropBot
The name of the material property for the bottom cover plate.
This item applies only if both the tcb and the bcb items are greater than 0.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a cover plated I-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropCoverPlatedI()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC", "A992Fy50", 24,
8, 0.5, 0.3, 8, 0.5)

'set new cover plated I-type frame section property


ret = SapModel.PropFrame.SetCoverPlatedI("CPI1", "ISEC", 0,
36, 0, 0.75, 14, "A992Fy50", 0.5, 6, "A992Fy50")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetCoverPlatedI
SetDblAngle
Syntax
SapObject.SapModel.PropFrame.SetDblAngle
VB6 Procedure
Function SetDblAngle(ByVal Name As String, ByVal MatProp As String, ByVal t3
As Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, ByVal
dis As Double, Optional ByVal Color As Long = -1, Optional ByVal Notes As
String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The vertical leg depth. [L]
t2
The total width of the section, that is, the sum of the widths of each horizontal leg
plus the back-to-back distance. [L]
tf
The horizontal leg thickness. [L]
tw
The vertical leg thickness. [L]
dis
The back-to-back distance between the angles. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a double angle-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropDblAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetDblAngle("DBANG1", "A992Fy50",
6, 9, 0.5, 0.5, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetDblAngle
SetDblChannel
Syntax
SapObject.SapModel.PropFrame.SetDblChannel
VB6 Procedure
Function SetDblChannel(ByVal Name As String, ByVal MatProp As String, ByVal
t3 As Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, ByVal
dis As Double, Optional ByVal Color As Long = -1, Optional ByVal Notes As
String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The total width of the section, that is, the sum of the widths of each flange plus
the back-to-back distance. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
dis
The back-to-back distance between the channels. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a double channel-type frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropDblChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetDblChannel("DBCHN1", "A992Fy50",
12, 6.5, 0.5, 0.3, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetDblChannel
SetGeneral
Syntax
SapObject.SapModel.PropFrame.SetGeneral
VB6 Procedure
Function SetGeneral(ByVal Name As String, ByVal MatProp As String, ByVal t3
As Double, ByVal t2 As Double, ByVal Area As Double, ByVal As2 As Double,
ByVal As3 As Double, ByVal Torsion As Double, ByVal I22 As Double, ByVal I33
As Double, ByVal S22 As Double, ByVal S33 As Double, ByVal Z22 As Double,
ByVal Z33 As Double, ByVal R22 As Double, ByVal R33 As Double, Optional
ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Area
The cross-sectional area. [L2]
As2
The shear area for forces in the section local 2-axis direction. [L2]
As3
The shear area for forces in the section local 3-axis direction. [L2]
Torsion
The torsional constant. [L4]
I22
The moment of inertia for bending about the local 2 axis. [L4]
I33
The moment of inertia for bending about the local 3 axis. [L4]
S22
The section modulus for bending about the local 2 axis. [L3]
S33
The section modulus for bending about the local 3 axis. [L3]
Z22
The plastic modulus for bending about the local 2 axis. [L3]
Z33
The plastic modulus for bending about the local 3 axis. [L3]
R22
The radius of gyration about the local 2 axis. [L]
R33
The radius of gyration about the local 3 axis. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a general frame section property. If this function is called
for an existing frame section property, all items for the section are reset to their
default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropGeneral()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetGeneral("GEN1", "A992Fy50", 24,
14, 100, 80, 80, 4, 1000, 2400, 140, 200, 150, 220, 3, 5, -1, "API
example", "Default")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetGeneral
SetHybridISection
Syntax
SapObject.SapModel.PropFrame.SetHybridISection
VB6 Procedure
Function SetHybridISection(ByVal Name As String, ByRef MatPropTopFlange
As String, ByRef MatPropWeb As String, ByRef MatPropBotFlange As String,
ByRef t3 As Double, ByRef t2 As Double, ByRef TF As Double, ByRef TW As
Double, ByRef t2b As Double, ByRef tfb As Double, Optional ByVal Color As
Long = -1, Optional ByVal Notes As String = "", Optional ByVal GUID As String =
"") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property then that property is modified, otherwise, a new property is added.
MatPropTopFlange
The name of the material property for the top flange.
MatPropWeb
The name of the material property for the web.
MatPropBotFlange
The name of the material property for the bottom flange.
t3
The height of the section. [L]
t2
The width of the top flange. [L]
TF
The thickness of the top flange. [L]
TW
The thickness of the web. [L]
t2b
The width of the bottom flange. [L]
tfb
The thickness of the bottom flange. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, then the program assigns a GUID to the section.
Remarks
This function initializes a steel hybrid I frame section property. If this function is
called for an existing frame section property then all items for the section are
reset to their default value.
The function returns zero if the section property is successfully initialized,
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropHybridISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new Hybrid I-type frame section property


ret = SapModel.PropFrame.SetHybridISection("HybridI",
"A992Fy50", "A992Fy50", "A992Fy50", 24, 8, 0.5, 0.3, 8, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetHybridUSection
Syntax
SapObject.SapModel.PropFrame.SetHybridUSection
VB6 Procedure
Function SetHybridUSection(ByVal Name As String, ByRef WebMaterial As
String, ByRef TopFlangeMaterial As String, ByRef BotFlangeMaterial As String,
ByRef T() As Double, Optional ByVal Color As Long = -1, Optional ByVal Notes
As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property then that property is modified, otherwise, a new property is added.
MatPropTopFlange
The name of the material property for the top flange.
MatPropWeb
The name of the material property for the web.
MatPropBotFlange
The name of the material property for the bottom flange.
T()
The dimension array of the section:
(0) D1 = Web Depth (vertical, inside to inside of flanges). [L]
(1) B1 = Web Distance at Top (CL to CL). [L]
(2) B2 = Bottom Flange Width. [L]
(3) B3 = Top Flange Width (per each). [L]
(4) B4 = Bottom Flange Lip (Web CL to flange edge, may be zero). [L]
(5) tw = Web Thickness. [L]
(6) tf = Top Flange Thickness. [L]
(7) tfb = Bottom Flange Thickness. [L]

Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, then the program assigns a GUID to the section.
Remarks
This function initializes a steel hybrid U frame section property. If this function is
called for an existing frame section property then all items for the section are
reset to their default value.
The function returns zero if the section property is successfully initialized,
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropHybridUSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim T() As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new Hybrid U-type frame section property


Redim T(7)
T(0) = 48
T(1) = 64
T(2) = 48
T(3) = 15
T(4) = 1.5
T(5) = 1
T(6) = 2
T(7) = 2
ret =
SapModel.PropFrame.SetHybridUSection("HybridU", "A992Fy50",
"A992Fy50", "A992Fy50", T())

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetISection
Syntax
SapObject.SapModel.PropFrame.SetISection
VB6 Procedure
Function SetISection(ByVal Name As String, ByVal MatProp As String, ByVal t3
As Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, ByVal
t2b As Double, ByVal tfb As Double, Optional ByVal Color As Long = -1, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The top flange width. [L]
tf
The top flange thickness. [L]
tw
The web thickness. [L]
t2b
The bottom flange width. [L]
tfb
The bottom flange thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes an I-type frame section property. If this function is called
for an existing frame section property, all items for the section are reset to their
default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 10, 0.5, 0.3, 14, 0.6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetISection
SetModifiers
Syntax
SapObject.SapModel.PropFrame.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing frame section property.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function assigns property modifiers to a frame section property. The default
value for all modifiers is one.
The function returns zero if the modifiers are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignFramePropModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.PropFrame.SetModifiers("FSEC1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetModifiers
SetNonPrismatic
Syntax
SapObject.SapModel.PropFrame.SetNonPrismatic
VB6 Procedure
Function SetNonPrismatic(ByVal Name As String, ByVal NumberItems As Long,
ByRef StartSec() As String, ByRef EndSec() As String, ByRef MyLength() As
Double, ByRef MyType() As Long, ByRef EI33() As Long, ByRef EI22() As
Long, Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "",
Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
NumberItems
The number of segments assigned to the nonprismatic section.
StartSec
This is an array of the names of the frame section properties at the start of each
segment.
Auto select lists and nonprismatic sections are not allowed in this array.
EndSec
This is an array of the names of the frame section properties at the end of each
segment.
Auto select lists and nonprismatic sections are not allowed in this array.
MyLength
This is an array that includes the length of each segment. The length may be
variable or absolute as indicated by the MyType item. [L] when length is absolute
MyType
This is an array of either 1 or 2, indicating the length type for each segment.
1 = Variable (relative length)
2 = Absolute
EI33, EI22
This is an array of 1, 2 or 3, indicating the variation type for EI33 and EI22 in
each segment.
1 = Linear
2 = Parabolic
3 = Cubic
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function assigns data to a nonprismatic frame section property.
The function returns zero if the data is successfully filled; otherwise it returns a
nonzero value.
VBA Example
Sub SetFramePropNonprismatic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim StartSec() As String
Dim EndSec() As String
Dim MyLength() As Double
Dim MyType() As Long
Dim EI33() As Long
Dim EI22() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50",
20, 8, 0.5, 0.3, 8, 0.5)

'set new nonprismatic frame section property


ReDim StartSec(2)
ReDim EndSec(2)
ReDim MyLength(2)
ReDim MyType(2)
ReDim EI33(2)
ReDim EI22(2)
StartSec(0) = "ISEC2"
EndSec(0) = "ISEC1"
MyLength(0) = 60
MyType(0) = 2
EI33(0)= 2
EI22(0)= 1

StartSec(1) = "ISEC1"
EndSec(1) = "ISEC1"
MyLength(1) = 1
MyType(1) = 1
EI33(1)= 2
EI22(1)= 1

StartSec(2) = "ISEC1"
EndSec(2) = "ISEC2"
MyLength(2) = 60
MyType(2) = 2
EI33(2)= 2
EI22(2)= 1

ret = SapModel.PropFrame.SetNonPrismatic("NP1", 3, StartSec,


EndSec, MyLength, MyType, EI33, EI22)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNonPrismatic
SetPipe
Syntax
SapObject.SapModel.PropFrame.SetPipe
VB6 Procedure
Function SetPipe(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal tw As Double, Optional ByVal Color As Long = -1, Optional ByVal
Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The outside diameter. [L]
tw
The wall thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a pipe-type frame section property. If this function is
called for an existing frame section property, all items for the section are reset to
their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropPipe()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetPipe("PIPE1", "A992Fy50", 8,
0.375)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPipe
SetPrecastI_1
Syntax
SapObject.SapModel.PropFrame.SetPrecastI_1
VB6 Procedure
Function SetPrecastI_1(ByVal Name As String, ByVal MatProp As String, ByRef
b() As Double, ByRef d() As Double, ByRef t() As Double, ByRef c As
Double,Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "",
Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 3, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (>= 0)
b(3) = B4 (>= 0)
Section dimensions B1 through B4 are defined on the precast concrete I girder
definition form.
d
This is an array, dimensioned to 5, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (> 0)
d(5) = D6 (>= 0)
d(6) = D7 (>=0)
Section dimensions D1 through D7 are defined on the precast concrete I girder
definition form.
t
This is an array, dimensioned to 1, containing the web thickness dimensions. [L]
T(0) = T1 (> 0)
T(1) = T2 (> 0)
Section dimensions T1 and T2 are defined on the precast I girder definition
form.
c
The bottom flange chamfer dimension, denoted as C1 on the precast concrete I
girder definition form.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a precast concrete I girder frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropPrecastI_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim bb() As Double
Dim dd() As Double
Dim tt() As Double
Dim cc As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ReDim bb(3)
ReDim dd(5)
bb(0) = 12
bb(1) = 16
bb(2) = 0
bb(3) = 0
dd(0) = 28
dd(1) = 4
dd(2) = 3
dd(3) = 0
dd(4) = 5
dd(5) = 5
dd(6) = 0
tt(0) = 6
tt(1) = 6
cc = 0
ret = SapModel.PropFrame.SetPrecastI_1("PC1", "4000Psi", bb,
dd, tt, cc)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
The function supersedes by SetPrecastI.
See Also
GetPrecastI_1
SetPrecastU
Syntax
SapObject.SapModel.PropFrame.SetPrecastU
VB6 Procedure
Function SetPrecastU(ByVal Name As String, ByVal MatProp As String, ByRef
b() As Double, ByRef d() As Double, Optional ByVal Color As Long = -1,
Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 5, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (> 0)
b(3) = B4 (>= 0)
b(4) = B5 (>= 0)
b(5) = B6 (>= 0)
Section dimensions B1 through B6 are defined on the precast concrete U girder
definition form.
d
This is an array, dimensioned to 6, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (>= 0)
d(5) = D6 (>= 0)
d(6) = D7 (>= 0)
Section dimensions D1 through D7 are defined on the precast concrete U girder
definition form.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a precast concrete U girder frame section property. If
this function is called for an existing frame section property, all items for the
section are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropPrecastU()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim bb() As Double
Dim dd() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set present units to kN-mm


ret = SapModel.SetPresentUnits(kN_mm_C)

'set new frame section property


ReDim bb(5)
ReDim dd(6)
bb(0) = 2350
bb(1) = 1500
bb(2) = 200
bb(3) = 75
bb(4) = 143.8447
bb(5) = 0
dd(0) = 1700
dd(1) = 175
dd(2) = 75
dd(3) = 0
dd(4) = 0
dd(5) = 125
dd(6) = 175
ret = SapModel.PropFrame.SetPrecastU("PC1", "4000Psi", bb,
dd)

'set present units to kip-in


ret = SapModel.SetPresentUnits(kip_in_F)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPrecastU
SetRebarBeam
Syntax
SapObject.SapModel.PropFrame.SetRebarBeam
VB6 Procedure
Function SetRebarBeam(ByVal Name As String, ByVal MatPropLong As String,
ByVal MatPropConfine As String, ByVal CoverTop As Double, ByVal CoverBot
As Double, ByVal TopLeftArea As Double, ByVal TopRightArea As Double, ByVal
BotLeftArea As Double, ByVal BotRightArea As Double) As Long
Parameters
Name
The name of an existing frame section property.
MatPropLong
The name of the rebar material property for the longitudinal rebar.
MatPropConfine
The name of the rebar material property for the confinement rebar.
CoverTop
The distance from the top of the beam to the centroid of the top longitudinal
reinforcement. [L]
CoverBot
The distance from the bottom of the beam to the centroid of the bottom
longitudinal reinforcement. [L]
TopLeftArea
The total area of longitudinal reinforcement at the top left end of the beam. [L2]
TopRightArea
The total area of longitudinal reinforcement at the top right end of the beam. [L2]
BotLeftArea
The total area of longitudinal reinforcement at the bottom left end of the beam.
[L2]
BotRightArea
The total area of longitudinal reinforcement at the bottom right end of the beam.
[L2]
Remarks
This function assigns beam rebar data to frame sections.
The function returns zero if the rebar data is successfully assigned; otherwise it
returns a nonzero value.
This function applies only to the following section types. Calling this function for
any other type of frame section property returns an error.
SECTION_T = 3
SECTION_ANGLE = 4
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
The material assigned to the specified frame section property must be concrete
or this function returns an error.
VBA Example
Sub AssignBeamRebar()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim RebarName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(RebarName,
MATERIAL_REBAR, , , , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set beam rebar data


ret = SapModel.PropFrame.SetRebarBeam("R1", RebarName,
RebarName, 3.5, 3, 4.1, 4.2, 4.3, 4.4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetRebarBeam
SetRebarColumn
Syntax
SapObject.SapModel.PropFrame.SetRebarColumn
VB6 Procedure
Function SetRebarColumn(ByVal Name As String, ByVal MatPropLong As
String, ByVal MatPropConfine As String, ByVal Pattern As Long, ByVal
ConfineType As Long, ByVal Cover As Double, ByVal NumberCBars As Long,
ByVal NumberR3Bars As Long, ByVal NumberR2Bars As Long, ByVal
RebarSize As String, ByVal TieSize As String, ByVal TieSpacingLongit As
Double, ByVal Number2DirTieBars As Long, ByVal Number3DirTieBars As
Long, ByVal ToBeDesigned As Boolean) As Long
Parameters
Name
The name of an existing frame section property.
MatPropLong
The name of the rebar material property for the longitudinal rebar.
MatPropConfine
The name of the rebar material property for the confinement rebar.
Pattern
This is either 1 or 2, indicating the rebar configuration.
1 = Rectangular
2 = Circular
For circular frame section properties this item must be 2; otherwise an error is
returned.
ConfineType
This is either 1 or 2, indicating the confinement bar type.
1 = Ties
2 = Spiral
This item applies only when Pattern = 2. If Pattern = 1, the confinement bar type
is assumed to be ties.
Cover
The clear cover for the confinement steel (ties). In the special case of circular
reinforcement in a rectangular column, this is the minimum clear cover. [L]
NumberCBars
This item applies to a circular rebar configuration, Pattern = 2. It is the total
number of longitudinal reinforcing bars in the column.
NumberR3Bars
This item applies to a rectangular rebar configuration, Pattern = 1. It is the
number of longitudinal bars (including the corner bar) on each face of the column
that is parallel to the local 3-axis of the column.
NumberR2Bars
This item applies to a rectangular rebar configuration, Pattern = 1. It is the
number of longitudinal bars (including the corner bar) on each face of the column
that is parallel to the local 2-axis of the column.
RebarSize
The rebar name for the longitudinal rebar in the column.
TieSize
The rebar name for the confinement rebar in the column.
TieSpacingLongit
The longitudinal spacing of the confinement bars (ties). [L]
Number2DirTieBars
This item applies to a rectangular reinforcing configuration, Pattern = 1. It is the
number of confinement bars (tie legs) running in the local 2-axis direction of the
column.
Number3DirTieBars
This item applies to a rectangular reinforcing configuration, Pattern = 1. It is the
number of confinement bars (tie legs) running in the local 3-axis direction of the
column.
ToBeDesigned
If this item is True, the column longitudinal rebar is to be designed; otherwise it is
to be checked.
Remarks
This function assigns column rebar data to frame sections.
The function returns zero if the rebar data is successfully assigned; otherwise it
returns a nonzero value.
This function applies only to the following section types. Calling this function for
any other type of frame section property returns an error.
SECTION_RECTANGULAR = 8
SECTION_CIRCLE = 9
The material assigned to the specified frame section property must be concrete
or else this function returns an error.
VBA Example
Sub AssignColumnRebar()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim RebarName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 30,
30)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(RebarName,
MATERIAL_REBAR, , , , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'set column rebar data


ret = SapModel.PropFrame.SetRebarColumn("R1", RebarName,
RebarName, 2, 2, 2, 10, 0, 0, "#10", "#5", 4, 0, 0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetRebarColumn
SetRectangle
Syntax
SapObject.SapModel.PropFrame.SetRectangle
VB6 Procedure
Function SetRectangle(ByVal Name As String, ByVal MatProp As String, ByVal
t3 As Double, ByVal t2 As Double, Optional ByVal Color As Long = -1, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a solid rectangular frame section property. If this function
is called for an existing frame section property, all items for the section are reset
to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropRectangle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetRectangle
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
SetSDSection
Syntax
SapObject.SapModel.PropFrame.SetSDSection
VB6 Procedure
Function SetSDSection(ByVal Name As String, ByVal MatProp As String,
Optional ByVal DesignType As Long = 0, Optional ByVal Color As Long = -1,
Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the base material property for the section.
DesignType
This is 0, 1, 2 or 3, indicating the design option for the section.
0= No design
1= Design as general steel section
2= Design as a concrete column; check the reinforcing
3= Design as a concrete column; design the reinforcing

When DesignType = 1 is assigned, the material property specified by the


MatProp item must be a steel material; otherwise the program sets DesignType
= 0.
Similarly, when DesignType = 2 or DesignType = 3 is assigned, the material
property specified by the MatProp item must be a concrete material; otherwise
the program sets DesignType = 0.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a section designer property.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropSDSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSDSection
SetTee
Syntax
SapObject.SapModel.PropFrame.SetTee
VB6 Procedure
Function SetTee(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, Optional
ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a tee-type frame section property. If this function is called
for an existing frame section property, all items for the section are reset to their
default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropTee()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTee("TEE1", "A992Fy50", 12, 10,
0.6, 0.3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTee
SetRebarBeam
GetRebarBeam
SetTube
Syntax
SapObject.SapModel.PropFrame.SetTube
VB6 Procedure
Function SetTube(ByVal Name As String, ByVal MatProp As String, ByVal t3 As
Double, ByVal t2 As Double, ByVal tf As Double, ByVal tw As Double, Optional
ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a tube-type frame section property. If this function is
called for an existing frame section property, all items for the section are reset to
their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropTube()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTube("TUBE1", "A992Fy50", 8, 6,
0.5, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTube
Delete
Syntax
SapObject.SapModel.PropFrame.SDShape.Delete
VB6 Procedure
Function Delete(ByVal Name As String, ByRef ShapeName As String, Optional
ByVal All As Boolean = False) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing shape in a section designer property. If the All item is
True, this item may be specified as a blank string.
All
If this item is True, all shapes in the section designer property specified by the
Name item are deleted.
Remarks
This function deletes shapes from a section designer property.
The function returns zero if the shape is successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteFrameSDPropShape()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add I-section shapes to new property


ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)
ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH2",
"A992Fy50", "", -9, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)
ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH3",
"A992Fy50", "", 9, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)

'delete shape from section designer property


ret = SapModel.PropFrame.SDShape.Delete("SD1", "SH1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
Modified optional argument All to be ByVal in version 12.0.1.
See Also
GetAngle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetAngle
VB6 Procedure
Function GetAngle(ByVal Name As String, ByVal ShapeName As String, ByRef
MatProp As String, ByRef PropName As String, ByRef Color As Long, ByRef
XCenter As Double, ByRef YCenter As Double, ByRef h As Double, ByRef bf
As Double, ByRef tf As Double, ByRef tw As Double, ByRef Rotation As
Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Angle shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Angle property that has been
imported from a section property file. If it is the name of a defined Angle
property, the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
bf
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for an Angle shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim bf As Double
Dim tf As Double
Dim tw As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Angle shape to new property


ret = SapModel.PropFrame.SDShape.SetAngle("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'get Angle shape property data


ret = SapModel.PropFrame.SDShape.GetAngle("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, bf, tf,
tw, Rotation)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetAngle
GetChannel
Syntax
SapObject.SapModel.PropFrame.SDShape.GetChannel
VB6 Procedure
Function GetChannel(ByVal Name As String, ByVal ShapeName As String,
ByRef MatProp As String, ByRef PropName As String, ByRef Color As Long,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef h As Double,
ByRef bf As Double, ByRef tf As Double, ByRef tw As Double, ByRef Rotation
As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Channel shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Channel property that has been
imported from a section property file. If it is the name of a defined Channel
property, the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
bf
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for a Channel shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim bf As Double
Dim tf As Double
Dim tw As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Channel shape to new property


ret = SapModel.PropFrame.SDShape.SetChannel("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'get Channel shape property data


ret = SapModel.PropFrame.SDShape.GetChannel("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, bf, tf, tw,
Rotation)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetChannel
GetDblAngle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetDblAngle
VB6 Procedure
Function GetDblAngle(ByVal Name As String, ByVal ShapeName As String,
ByRef MatProp As String, ByRef PropName As String, ByRef Color As Long,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef h As Double,
ByRef w As Double, ByRef tf As Double, ByRef tw As Double, ByRef dis As
Double, ByRef Rotation As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Double Angle shape in the specified frame section
property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Double Angle property that has
been imported from a section property file. If it is the name of a defined Double
Angle property, then the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
w
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
dis
Separation between the two flanges that are parallel. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for a Double Angle shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropDblAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim w As Double
Dim tf As Double
Dim tw As Double
Dim dis As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Double Angle shape to new property


ret = SapModel.PropFrame.SDShape.SetDblAngle("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 2)

'get Double Angle shape property data


ret = SapModel.PropFrame.SDShape.GetDblAngle("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, w, tf, tw,
dis, Rotation)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetDblAngle
GetISection
Syntax
SapObject.SapModel.PropFrame.SDShape.GetISection
VB6 Procedure
Function GetISection(ByVal Name As String, ByVal ShapeName As String,
ByRef MatProp As String, ByRef PropName As String, ByRef Color As Long,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef h As Double,
ByRef bf As Double, ByRef tf As Double, ByRef tw As Double, ByRef bfb As
Double, ByRef tfb As Double, ByRef Rotation As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing I-section shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined I-section property that has been
imported from a section property file. If it is the name of a defined I-section
property, the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
bf
The top flange width. [L]
tf
The top flange thickness. [L]
tw
The web thickness. [L]
bfb
The bottom flange width. [L]
tfb
The bottom flange thickness. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for an I-section shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim bf As Double
Dim tf As Double
Dim tw As Double
Dim bfb As Double
Dim tfb As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add I-section shape to new property


ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)

'get I-section shape property data


ret = SapModel.PropFrame.SDShape.GetISection("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, bf, tf, tw, bfb,
tfb, Rotation)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetISection
GetPipe
Syntax
SapObject.SapModel.PropFrame.SDShape.GetPipe
VB6 Procedure
Function GetPipe(ByVal Name As String, ByVal ShapeName As String, ByRef
MatProp As String, ByRef PropName As String, ByRef Color As Long, ByRef
XCenter As Double, ByRef YCenter As Double, ByRef diameter As Double,
ByRef thickness As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Pipe shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Pipe property that has been
imported from a section property file. If it is the name of a defined Pipe property,
the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
diameter
The outer diameter of the Pipe. [L]
thickness
The wall thickness of the Pipe. [L]
Remarks
This function retrieves property data for a Pipe shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropPipe()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim diameter As Double
Dim thickness As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Pipe shape to new property


ret = SapModel.PropFrame.SDShape.SetPipe("SD1", "SH1",
"A992Fy50", "", 0, -9, -1, 12, 1)

'get Pipe shape property data


ret = SapModel.PropFrame.SDShape.GetPipe("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, diameter, thickness)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetPipe
GetPlate
Syntax
SapObject.SapModel.PropFrame.SDShape.GetPlate
VB6 Procedure
Function GetPlate(ByVal Name As String, ByVal ShapeName As String, ByRef
MatProp As String, ByRef Color As Long, ByRef XCenter As Double, ByRef
YCenter As Double, ByRef thickness As Double, ByRef w As Double, ByRef
Rotation As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Plate shape in the specified frame section property.
MatProp
The name of the material property for the shape.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
thickness
The thickness of the plate. [L]
w
The width of the Plate. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for an Plate shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropPlate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim thickness As Double
Dim w As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Plate shape to new property


ret = SapModel.PropFrame.SDShape.SetPlate("SD1", "SH1",
"A992Fy50", 0, -9, 0, -1, 2, 6)

'get Plate shape property data


ret = SapModel.PropFrame.SDShape.GetPlate("SD1", "SH1",
MatProp, Color, Xcenter, Ycenter, thickness, w, Rotation)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetPlate
GetPolygon
Syntax
SapObject.SapModel.PropFrame.SDShape.GetPolygon
VB6 Procedure
Function GetPolygon(ByVal Name As String, ByVal ShapeName As String,
ByRef MatProp As String, ByRef SSOverwrite As String, ByRef NumberPoints
As Long, ByRef X() As Double, ByRef Y() As Double, ByRef Radius() As
Double, ByRef Color As Long, ByRef Reinf As Boolean, ByRef MatRebar As
String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing polygon shape in the specified frame section property.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
NumberPoints
The number of point coordinates used to define the polygon.
X
This is an array that contains the X-coordinates of the polygon points. [L]
Y
This is an array that contains the Y-coordinates of the polygon points. [L]
Radius
This is an array that contains the radius to be applied at each of the polygon
points. [L]
Color
The fill color assigned to the shape.
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape. The MatProp item must refer to a concrete material for this item
to be True.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function retrieves property data for a polygon shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropPolygon()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim SSOverwrite As String
Dim NumberPoints As Long
Dim NumberPointsGet As Long
Dim X() As Double
Dim Y() As Double
Dim Radius() As Double
Dim XGet() As Double
Dim YGet() As Double
Dim RadiusGet() As Double
Dim Color As Long
Dim Reinf As Boolean
Dim MatRebar As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name,
eMatType.eMatType_Rebar, , , , ,
eMatTypeRebar.eMatTypeRebar_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")
'add polygon shape to new property
NumberPoints = 5
ReDim X(4)
ReDim Y(4)
ReDim Radius(4)
X(0) = -26
Y(0) = -26
Radius(0) = 0
X(1) = -20
Y(1) = -20
Radius(1) = 5
X(2) = -25
Y(2) = 15
Radius(2) = 0
X(3) = 20
Y(3) = 12
Radius(3) = 3
X(4) = 25
Y(4) = -15
Radius(4) = 0
ret = SapModel.PropFrame.SDShape.SetPolygon("SD1", "SH1",
"4000Psi", "Default", NumberPoints, X, Y, Radius, -1, True, Name)

'get polygon shape property data


ret = SapModel.PropFrame.SDShape.GetPolygon("SD1", "SH1",
MatProp, SSOverwrite, NumberPointsGet, XGet, YGet, RadiusGet,
Color, Reinf, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
SetPolygon
GetRefCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetRefCircle
VB6 Procedure
Function GetRefCircle(ByVal Name As String, ByVal ShapeName As String,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef Diameter As
Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circular shape. [L]
Remarks
This function retrieves property data for a reference circle shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropRefCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim XCenter As Double
Dim YCenter As Double
Dim Diameter As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add reference circle shape to new property


ret = SapModel.PropFrame.SDShape.SetRefCircle("SD1", "SH1",
5, 5, 120)

'get reference circle shape property data


ret = SapModel.PropFrame.SDShape.GetRefCircle("SD1", "SH1",
XCenter, YCenter, Diameter)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetRefCircle
GetRefLine
Syntax
SapObject.SapModel.PropFrame.SDShape.GetRefLine
VB6 Procedure
Function GetRefLine(ByVal Name As String, ByVal ShapeName As String,
ByRef X1 As Double, ByRef Y1 As Double, ByRef X2 As Double, ByRef Y2 As
Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of a reference line shape in the section designer section.
X1
The section designer X coordinate of the first drawn end point of the line pattern
reinforcing. [L]
Y1
The section designer Y coordinate of the first drawn end point of the line pattern
reinforcing. [L]
X2
The section designer X coordinate of the second drawn end point of the line
pattern reinforcing. [L]
Y2
The section designer Y coordinate of the second drawn end point of the line
pattern reinforcing. [L]
Remarks
This function retrieves property data for a reference line shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatRebar As String
Dim X1 As Double
Dim Y1 As Double
Dim X2 As Double
Dim Y2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add Line Pattern Reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetRefLine("SD1", "SH1", 5,
5, 2, 2)

'get Reference Line shape property data


ret = SapModel.PropFrame.SDShape.GetRefLine("SD1", "SH1",
X1, Y1, X2, Y2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetRefLine
GetReinfCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfCircle
VB6 Procedure
Function GetReinfCircle(ByVal Name As String, ByVal ShapeName As String,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef Diameter As
Double, ByRef Numberbars As Long, ByRef Rotation As Double, ByRef
RebarSize As String, ByRef MatRebar As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of a circular reinforcing shape in the section designer section.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circular shape. [L]
NumberBars
The number of equally spaced bars for the circular reinforcing.
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Barsize
It is the size of the reinforcing bar.
MatRebar
The material property for the reinforcing steel.
Remarks
This function retrieves property data for a circular reinforcing shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatRebar As String
Dim XCenter As Double
Dim YCenter As Double
Dim Diameter As Double
Dim Numberbars As Long
Dim Rotation As Double
Dim RebarSize As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add circular reinforcing shape to new property


ret =
SapModel.PropFrame.SDShape.SetReinfCircle("SD1", "SH1", 0, 0, 12,
4, 45, "#9", Name)

'get circular reinforcing shape property data


ret = SapModel.PropFrame.SDShape.GetReinfCircle("SD1",
"SH1", Xcenter, Ycenter, Diameter, Numberbars, Rotation,
RebarSize, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfCircle
GetReinfCorner
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfCorner
VB6 Procedure
Function GetReinfCorner(ByVal Name As String, ByVal ShapeName As String,
ByRef NumberItems As Long, ByRef PointNum() As Long, ByRef RebarSize()
As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid rectangle shape in the specified frame section
property.
NumberItems
The number of edges in the shape.
PointNum
This is an array that includes the corner point number in the shape.
RebarSize
This is an array that includes None or the name of a defined rebar, indicating the
rebar assignment to the considered corner point.
Remarks
This function retrieves corner point reinforcing data for solid rectangle, circle
and polygon shapes in a section designer property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfCorner()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim PointNum() As Long
Dim RebarSize() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)

'specify corner reinforcing


ret = SapModel.PropFrame.SDShape.SetReinfCorner("SD1",
"SH1", 1, "#9", True)
ret = SapModel.PropFrame.SDShape.SetReinfCorner("SD1",
"SH1", 1, "#8")
'get corner point reinforcing
ret = SapModel.PropFrame.SDShape.GetReinfCorner("SD1",
"SH1", NumberItems, PointNum, RebarSize)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfCorner
SetReinfEdge
GetReinfEdge
GetReinfEdge
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfEdge
VB6 Procedure
Function GetReinfEdge(ByVal Name As String, ByVal ShapeName As String,
ByRef NumberItems As Long, ByRef EdgeNum() As Long, ByRef RebarSize()
As String, ByRef Spacing() As Double, ByRef Cover() As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid rectangle shape in the specified frame section
property.
NumberItems
The number of edges in the shape.
EdgeNum
This is an array that includes the edge number in the shape.
RebarSize
This is an array that includes None or the name of a defined rebar, indicating the
rebar assignment to the considered edge.
Spacing
This is an array that includes the rebar maximum center-to-center along the
considered edge. [L]
Cover
This is an array that includes the rebar clear cover along the considered edge.
[L]
Remarks
This function retrieves edge reinforcing data for solid rectangle, circle, polygon,
and rectangular reinforcing shapes in a section designer property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfEdge()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim EdgeNum() As Long
Dim RebarSize() As String
Dim Spacing() As Double
Dim Cover() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)

'specify edge reinforcing


ret = SapModel.PropFrame.SDShape.SetReinfEdge("SD1", "SH1",
1, "#7", 8, 1.75, True)
ret = SapModel.PropFrame.SDShape.SetReinfEdge("SD1", "SH1",
1, "#4", 4, 1.5)

'get edge reinforcing


ret = SapModel.PropFrame.SDShape.GetReinfEdge("SD1", "SH1",
NumberItems, EdgeNum, RebarSize, Spacing, Cover)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfEdge
SetReinfCorner
GetReinfCorner
GetReinfLine
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfLine
VB6 Procedure
Function GetReinfLine(ByVal Name As String, ByVal ShapeName As String,
ByRef X1 As Double, ByRef Y1 As Double, ByRef X2 As Double, ByRef Y2 As
Double, ByRef Spacing As Double, ByRef RebarSize As String, ByRef EndBars
As Boolean, ByRef MatRebar As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of a line reinforcing shape in the section designer section.
X1
The section designer X coordinate of the first drawn end point of the line
reinforcing. [L]
Y1
The section designer Y coordinate of the first drawn end point of the line
reinforcing. [L]
X2
The section designer X coordinate of the second drawn end point of the line
reinforcing. [L]
Y2
The section designer Y coordinate of the second drawn end point of the line
reinforcing. [L]
Spacing
The center-to-center spacing of the bars in the line pattern shape. [L]
Bar Size
The size of the reinforcing bars used in the line reinforcing shape.
EndBars
This item is True when there are bars at the end points of the line reinforcing.
MatRebar
The material property for the reinforcing steel.
Remarks
This function retrieves property data for a line reinforcing shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatRebar As String
Dim X1 As Double
Dim Y1 As Double
Dim X2 As Double
Dim Y2 As Double
Dim Spacing As Double
Dim RebarSize As String
Dim EndBars As Boolean
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add line reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfLine("SD1", "SH1",
0, 0, 5, 2, 12, "#9", True, Name)

'get line reinforcing shape property data


ret = SapModel.PropFrame.SDShape.GetReinfLine("SD1", "SH1",
X1, Y1, X2, Y2, Spacing, RebarSize, EndBars, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfLine
GetReinfRectangular
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfRectangular
VB6 Procedure
Function GetReinfRectangular(ByVal Name As String, ByVal ShapeName As
String, ByRef XCenter As Double, ByRef YCenter As Double, ByRef h As
Double, ByRef w As Double, ByRef Rotation As Double, ByRef MatRebar As
String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of a rectangular reinforcing shape in the section designer section.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
w
The top flange width. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
MatRebar
The material property for the reinforcing steel.
Remarks
This function retrieves property data for a rectangular reinforcing shape in a
section designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfRectangular()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatRebar As String
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim w As Double
Dim Rotation As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add rectangular reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfRectangular("SD1",
"SH1", 0, 0, 12, 12, 45, Name)

'get rectangular reinforcing shape property data


ret = SapModel.PropFrame.SDShape.GetReinfRectangular("SD1",
"SH1", Xcenter, Ycenter, h, w, Rotation, MatRebar)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfRectangular
GetReinfSingle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetReinfSingle
VB6 Procedure
Function GetReinfSingle(ByVal Name As String, ByVal ShapeName As String,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef RebarSize As
String, ByRef MatRebar As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of a single bar reinforcing shape in the section designer section.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Barsize
The size of the reinforcing bar.
MatRebar
The material property for the reinforcing steel.
Remarks
This function retrieves property data for a single bar reinforcing shape in a
section designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropReinfSingle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatRebar As String
Dim XCenter As Double
Dim YCenter As Double
Dim RebarSize As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add single bar reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfSingle("SD1",
"SH1", 5, 5, "#9", Name)

'get single bar reinforcing shape property data


ret = SapModel.PropFrame.SDShape.GetReinfSingle("SD1",
"SH1", XCenter, YCenter, RebarSize, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetReinfSingle
GetSolidCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.GetSolidCircle
VB6 Procedure
Function GetSolidCircle(ByVal Name As String, ByValShapeName As String,
ByRefMatProp As String, ByRefSSOverwrite As String, ByRef Color As Long,
ByRefXCenter As Double, ByRefYCenter As Double, Optional ByRefDiameter
As Double, ByRefReinfAs Boolean, ByRefNumberBarsAs Long = 8, ByRef
Rotation As Double, ByRef Cover As Double, ByRefRebarSize As String,
ByRefMatRebar As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid circle shape in the specified frame section
property.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circle.[L]
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape. The MatProp item must refer to a concrete material for this item
to be True.
# Bars
This item is visible only if the Reinforcing item is set to True. It is the number of
equally spaced bars for the circular reinforcing.
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Barcover
This item is visible only if the Reinforcing item is set to True. It is the clear cover
for the specified rebar.
Bar Size
This item is visible only if the Reinforcing item is set to True. It is the size of the
reinforcing bar.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function retrieves property data for a solid circle shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropSolidCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim SSOverwrite As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim Diameter As Long
Dim Reinf As Boolean
Dim NumberBars As Long
Dim Rotation As Double
Dim Cover As Double
Dim RebarSize As String
Dim MatRebar As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'addASTMA706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid circle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidCircle("SD1",
"SH1", "4000psi", "Default", 0, 0, 12, -1, True, 16, 0, 16, "#4",
Name)

'get solid circle shape property data


ret = SapModel.PropFrame.SDShape.GetSolidCircle("SD1",
"SH1", MatProp, SSOverwrite, Color, XCenter, YCenter, Diameter,
Reinf, NumberBars, Rotation, Cover, RebarSize, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetSolidCircle
GetSolidRect
Syntax
SapObject.SapModel.PropFrame.SDShape.GetSolidRect
VB6 Procedure
Function GetSolidRect(ByVal Name As String, ByVal ShapeName As String,
ByRef MatProp As String, ByRef SSOverwrite As String, ByRef Color As Long,
ByRef XCenter As Double, ByRef YCenter As Double, ByRef h As Double,
ByRef w As Double, ByRef Rotation As Double, ByRef Reinf As Boolean, ByRef
MatRebar As String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid rectangle shape in the specified frame section
property.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
w
The section width. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape. The MatProp item must refer to a concrete material for this item
to be True.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function retrieves property data for a solid rectangular shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropSolidRect()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim SSOverwrite As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim w As Double
Dim Rotation As Double
Dim Reinf As Boolean
Dim MatRebar As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)
'get solid rectangle shape property data
ret = SapModel.PropFrame.SDShape.GetSolidRect("SD1", "SH1",
MatProp, SSOverwrite, Color, Xcenter, Ycenter, h, w, Rotation,
Reinf, MatRebar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetSolidRect
GetSolidSector
Syntax
SapObject.SapModel.PropFrame.SDShape.GetSolidSector
VB6 Procedure
Function GetSolidSector(ByVal Name As String, ByValShapeName As String,
ByRefMatProp As String, ByRef Color As Long, ByRefXCenter As Double,
ByRefYCenter As Double, ByRef Angle As Double, ByRefRotation As Double,
ByRef Radius As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid sector shape in the specified frame section
property.
MatProp
The name of the material property for the shape.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Angle
The angle between the two radii that define the circular sector. [deg]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Radius
The radius of the circle defining the Sector. [L]
Remarks
This function retrieves property data for a solid sector shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropSolidSector()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim Angle As Double
Dim Rotation As Double
Dim Radius As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'addASTMA706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid sector shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidSector("SD1",
"SH1", "4000Psi", 0, 0, 95, 0, 10, -1)

'get solid sector shape property data


ret = SapModel.PropFrame.SDShape.GetSolidSector("SD1",
"SH1", MatProp, Color, Xcenter, Ycenter, Angle, Rotation, Radius)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetSolidSector
GetSolidSegment
Syntax
SapObject.SapModel.PropFrame.SDShape.GetSolidSegment
VB6 Procedure
Function GetSolidSegment(ByVal Name As String, ByValShapeName As String,
ByRefMatProp As String, ByRef Color As Long, ByRefXCenter As Double,
ByRefYCenter As Double, ByRef Angle As Double, ByRefRotation As Double,
ByRef Radius As Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid segment shape in the specified frame section
property.
MatProp
The name of the material property for the shape.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Angle
The angle between lines drawn from the center of the circle to the end points of
the chord tat defines the segment. [deg]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Radius
The radius of the circle defining the segment.
Remarks
This function retrieves property data for a solid segment shape in a section
designer section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropSolidSegment()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim Angle As Double
Dim Rotation As Double
Dim Radius As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid segment shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidSegment("SD1",
"SH1", "4000Psi", 0, 0, 95, 0, 10, -1)

'get solid segment shape property data


ret = SapModel.PropFrame.SDShape.GetSolidSegment("SD1",
"SH1", MatProp, Color, Xcenter, Ycenter, Angle, Rotation, Radius)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetSolidSegment
GetTee
Syntax
SapObject.SapModel.PropFrame.SDShape.GetTee
VB6 Procedure
Function GetTee(ByVal Name As String, ByVal ShapeName As String, ByRef
MatProp As String, ByRef PropName As String, ByRef Color As Long, ByRef
XCenter As Double, ByRef YCenter As Double, ByRef h As Double, ByRef bf
As Double, ByRef tf As Double, ByRef tw As Double, ByRef Rotation As
Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Tee shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Tee property that has been
imported from a section property file. If it is the name of a defined Tee property,
the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section depth. [L]
bf
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for a Tee shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropTee()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim bf As Double
Dim tf As Double
Dim tw As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Tee shape to new property


ret = SapModel.PropFrame.SDShape.SetTee("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'get Tee shape property data


ret = SapModel.PropFrame.SDShape.GetTee("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, bf, tf, tw,
Rotation)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetTee
GetTube
Syntax
SapObject.SapModel.PropFrame.SDShape.GetTube
VB6 Procedure
Function GetTube(ByVal Name As String, ByVal ShapeName As String, ByRef
MatProp As String, ByRef PropName As String, ByRef Color As Long, ByRef
XCenter As Double, ByRef YCenter As Double, ByRef h As Double, ByRef w As
Double, ByRef tf As Double, ByRef tw As Double, ByRef Rotation As Double)
As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing Tube shape in the specified frame section property.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Tube property that has been
imported from a section property file. If it is the name of a defined Tube property,
the section dimensions are taken from that property.
Color
The fill color assigned to the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
h
The section height. [L]
w
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Remarks
This function retrieves property data for a Tube shape in a section designer
section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFrameSDPropTube()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim PropName As String
Dim Color As Long
Dim XCenter As Double
Dim YCenter As Double
Dim h As Double
Dim w As Double
Dim tf As Double
Dim tw As Double
Dim Rotation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Tube shape to new property


ret = SapModel.PropFrame.SDShape.SetTube("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'get Tube shape property data


ret = SapModel.PropFrame.SDShape.GetTube("SD1", "SH1",
MatProp, PropName, Color, Xcenter, Ycenter, h, w, tf, tw,
Rotation)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetTube
SetAngle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetAngle
VB6 Procedure
Function SetAngle(ByVal Name As String, ByRef ShapeName As String, ByVal
MatProp As String, ByVal PropName As String, ByVal XCenter As Double, ByVal
YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As Long =
-1, Optional ByVal h As Double = 24, Optional ByVal bf As Double = 24, Optional
ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Angle property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined Angle property that has been imported from
a section property file, the section dimensions are taken from the specified
Angle property.
If this item is not blank, and the specified property name is not an Angle that was
imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
bf
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Remarks
This function adds a new Angle shape or modifies an existing shape to be an
Angle shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Angle shape to new property


ret = SapModel.PropFrame.SDShape.SetAngle("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetAngle
SetChannel
Syntax
SapObject.SapModel.PropFrame.SDShape.SetChannel
VB6 Procedure
Function SetChannel (ByVal Name As String, ByRef ShapeName As String,
ByVal MatProp As String, ByVal PropName As String, ByVal XCenter As Double,
ByVal YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As
Long = -1, Optional ByVal h As Double = 24, Optional ByVal bf As Double = 24,
Optional ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Channel property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined Channel property that has been imported
from a section property file, the section dimensions are taken from the specified
Channel property.
If this item is not blank, and the specified property name is not an Channel that
was imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
bf
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Remarks
This function adds a new Channel shape or modifies an existing shape to be a
Channel shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropChannel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Channel shape to new property


ret = SapModel.PropFrame.SDShape.SetChannel("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetChannel
SetDblAngle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetDblAngle
VB6 Procedure
Function SetDblAngle(ByVal Name As String, ByRef ShapeName As String,
ByVal MatProp As String, ByVal PropName As String, ByVal XCenter As Double,
ByVal YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As
Long = -1, Optional ByVal h As Double = 24, Optional ByVal w As Double = 24,
Optional ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4, Optional
ByVal dis As Double = 1.2) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined DblAngle property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined DblAngle property that has been imported
from a section property file, the section dimensions are taken from the specified
DblAngle property.
If this item is not blank and the specified property name is not an DblAngle that
was imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
w
The flange width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
dis
Separation between the two flanges that are parallel. [L]
Remarks
This function adds a new Double Angle shape or modifies an existing shape to
be an Double Angle shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropDblAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Double Angle shape to new property


ret = SapModel.PropFrame.SDShape.SetDblAngle("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetDblAngle
SetISection
Syntax
SapObject.SapModel.PropFrame.SDShape.SetISection
VB6 Procedure
Function SetISection(ByVal Name As String, ByRef ShapeName As String,
ByVal MatProp As String, ByVal PropName As String, ByVal XCenter As Double,
ByVal YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As
Long = -1, Optional ByVal h As Double = 24, Optional ByVal bf As Double = 24,
Optional ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4, Optional
ByVal bfb As Double = 24, Optional ByVal tfb As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined I-section property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined I-section property that has been imported
from a section property file, the section dimensions are taken from the specified
I-section property.
If this item is not blank, and the specified property name is not an I-section that
was imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
bf
The top flange width. [L]
tf
The top flange thickness. [L]
tw
The web thickness. [L]
bfb
The bottom flange width. [L]
tfb
The bottom flange thickness. [L]
Remarks
This function adds a new I-section shape or modifies an existing shape to be an
I-section shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropISection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add I-section shape to new property


ret = SapModel.PropFrame.SDShape.SetISection("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5, 6, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetISection
SetPipe
Syntax
SapObject.SapModel.PropFrame.SDShape.SetPipe
VB6 Procedure
Function SetPipe(ByVal Name As String, ByRef ShapeName As String, ByVal
MatProp As String, ByVal PropName As String, ByVal XCenter As Double, ByVal
YCenter As Double, Optional ByVal Color As Long = -1, Optional ByVal diameter
As Double = 24, Optional ByVal thickness As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Pipe property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined Pipe property that has been imported from a
section property file, the section dimensions are taken from the specified Pipe
property.
If this item is not blank and the specified property name is not a Pipe that was
imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
diameter
The outer diameter of the Pipe. [L]
thickness
The wall thickness of the Pipe. [L]
Remarks
This function adds a new Pipe shape or modifies an existing shape to be a Pipe
shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropPipe()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Pipe shape to new property


ret = SapModel.PropFrame.SDShape.SetPipe("SD1", "SH1",
"A992Fy50", "", 0, -9, -1, 12, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetPipe
SetPlate
Syntax
SapObject.SapModel.PropFrame.SDShape.SetPlate
VB6 Procedure
Function SetPlate(ByVal Name As String, ByRef ShapeName As String, ByVal
MatProp As String, ByVal XCenter As Double, ByVal YCenter As Double, ByVal
Rotation As Double, Optional ByVal Color As Long = -1, Optional ByVal
thickness As Double = 2.4, Optional ByVal w As Double = 24) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape,n that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
thickness
The thickness of the plate. [L]
w
The width of the Plate. [L]
Remarks
This function adds a new Plate shape or modifies an existing shape to be a
Plate shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropPlate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Plate shape to new property


ret = SapModel.PropFrame.SDShape.SetPlate("SD1", "SH1",
"A992Fy50", 0, -9, 0, -1, 2, 6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetPlate
SetPolygon
Syntax
SapObject.SapModel.PropFrame.SDShape.SetPolygon
VB6 Procedure
Function SetPolygon(ByVal Name As String, ByRef ShapeName As String,
ByVal MatProp As String, ByVal SSOverwrite As String, ByVal NumberPoints As
Long, ByRef X() As Double, ByRef Y() As Double, ByRef Radius() As Double,
Optional ByVal Color As Long = -1, Optional ByVal Reinf As Boolean = False,
Optional ByVal MatRebar As String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
NumberPoints
The number of point coordinates used to define the polygon.
X
This is an array that contains the X-coordinates of the polygon points. [L]
Y
This is an array that contains the Y-coordinates of the polygon points. [L]
Radius
This is an array that contains the radius to be applied at each of the polygon
points. [L]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape.
If the MatProp item is not a concrete material, this item is always assumed to be
False.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function adds a new polygon shape or modifies an existing shape to be a
polygon shape in a section designer property.
The polygon points must be defined in order around the polygon, otherwise the
shape will be created incorrectly or the creation of the shape will fail.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero val .
VBA Example
Sub SetFrameSDPropPolygon()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim X() As Double
Dim Y() As Double
Dim Radius() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name,
eMatType.eMatType_Rebar, , , , ,
eMatTypeRebar.eMatTypeRebar_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add polygon shape to new property


NumberPoints = 5
ReDim X(4)
ReDim Y(4)
ReDim Radius(4)
X(0) = -26
Y(0) = -26
Radius(0) = 0
X(1) = -20
Y(1) = -20
Radius(1) = 5
X(2) = -25
Y(2) = 15
Radius(2) = 0
X(3) = 20
Y(3) = 12
Radius(3) = 3
X(4) = 25
Y(4) = -15
Radius(4) = 0
ret = SapModel.PropFrame.SDShape.SetPolygon("SD1", "SH1",
"4000Psi", "Default", NumberPoints, X, Y, Radius, -1, True, Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
GetPolygon
SetRefCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetRefCircle
VB6 Procedure
Function SetRefCircle(ByVal Name As String, ByRef ShapeName As String,
ByVal XCenter As Double, ByVal YCenter As Double, ByVal Diameter As
Double)As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circular shape. [L]
Remarks
This function adds a new reference circle shape or modifies an existing shape
to be a reference circle shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropRefCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add reference circle shape to new property


ret = SapModel.PropFrame.SDShape.SetRefCircle("SD1", "SH1",
0, 0, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetRefCircle
SetRefLine
Syntax
SapObject.SapModel.PropFrame.SDShape.SetRefLine
VB6 Procedure
Function SetRefLine(ByVal Name As String, ByRef ShapeName As String,
ByVal X1 As Double, ByVal Y1 As Double, ByVal X2 As Double, ByVal Y2 As
Double) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
X1
The section designer X coordinate of the first drawn end point of the line pattern
reinforcing. [L]
Y1
The section designer Y coordinate of the first drawn end point of the line pattern
reinforcing. [L]
X2
The section designer X coordinate of the second drawn end point of the line
pattern reinforcing. [L]
Y2
The section designer Y coordinate of the second drawn end point of the line
pattern reinforcing. [L]
Remarks
This function adds a new reference line shape or modifies an existing shape to
be a reference line shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropRefLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add Line Pattern Reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetRefLine("SD1", "SH1", 5,
5, 2, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetRefLine
SetReinfCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfCircle
VB6 Procedure
Function SetReinfCircle(ByVal Name As String, ByRef ShapeName As String,
ByVal XCenter As Double, ByVal YCenter As Double, ByVal Diameter As
Double, ByVal Numberbars As Long, ByVal Rotation As Double, ByVal
RebarSize As Double, Optional ByVal MatRebar As String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circular shape. [L]
NumberBars
The number of equally spaced bars for the circular reinforcing.
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Barsize
It is the size of the reinforcing bar.
MatRebar
The material property for the reinforcing steel.
Remarks
This function adds a new circular reinforcing shape or modifies an existing
shape to be an circular reinforcing shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add circular reinforcing shape to new property


ret =
SapModel.PropFrame.SDShape.SetReinfCircle("SD1", "SH1", 0, 0, 12,
4, 45, "#9", Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfCircle
SetReinfCorner
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfCorner
VB6 Procedure
Function SetReinfCorner(ByVal Name As String, ByRef ShapeName As String,
ByVal PointNum As Long, ByVal RebarSize As String, Optional ByVal All As
Boolean = False) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid rectangle, circle or polygon shape in the specified
section.
PointNum
An corner point number in the shape. This item is ignored if the All item is True.
RebarSize
This is None or the name of a defined rebar, indicating the rebar assignment to
the specified corner.
All
If this item is True, the specified rebar data applies to all corners in the shape.
Remarks
This function specifies corner reinforcing in solid rectangle, circle and polygon
shapes in a section designer property.
The function returns zero if the reinforcing is successfully specified; otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfCorner()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)

'specify corner reinforcing


ret = SapModel.PropFrame.SDShape.SetReinfCorner("SD1",
"SH1", 1, "#9", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfCorner
SetReinfEdge
GetReinfEdge
SetReinfEdge
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfEdge
VB6 Procedure
Function SetReinfEdge(ByVal Name As String, ByRef ShapeName As String,
ByVal EdgeNum As Long, ByVal RebarSize As String, ByVal Spacing As Double,
ByVal Cover As Double, Optional ByVal All As Boolean = False) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing solid rectangle, circle or polygon shape in the specified
section.
EdgeNum
An edge number in the shape. This item is ignored if the All item is True.
RebarSize
This is None or the name of a defined rebar, indicating the rebar assignment to
the specified edge.
Spacing
This is the rebar maximum center-to-center along the specified edge. [L]
Cover
This is the rebar clear cover along the specified edge. [L]
All
If this item is True, the specified rebar data applies to all edges in the shape.
Remarks
This function specifies edge reinforcing in solid rectangle, circle, polygon and
rectangular reinforcing shapes in a section designer property.
The function returns zero if the reinforcing is successfully specified; otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfEdge()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)

'specify edge reinforcing


ret = SapModel.PropFrame.SDShape.SetReinfEdge("SD1", "SH1",
1, "#7", 8, 1.75, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfEdge
SetReinfCorner
GetReinfCorner
SetReinfLine
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfLine
VB6 Procedure
Function SetReinfLine(ByVal Name As String, ByRef ShapeName As String,
ByVal X1 As Double, ByVal Y1 As Double, ByVal X2 As Double, ByVal Y2 As
Double, Optional ByVal Spacing As Double = 6, Optional ByVal RebarSize As
String = "", Optional ByVal EndBars As Boolean = False, ByVal MatRebar As
String) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
X1
The section designer X coordinate of the first drawn end point of the line
reinforcing. [L]
Y1
The section designer Y coordinate of the first drawn end point of the line
reinforcing. [L]
X2
The section designer X coordinate of the second drawn end point of the line
reinforcing. [L]
Y2
The section designer Y coordinate of the second drawn end point of the line
reinforcing. [L]
Spacing
The center-to-center spacing of the bars in the line pattern shape. [L]
Bar Size
The size of the reinforcing bars used in the line reinforcing shape.
EndBars
This item is True when there are bars at the end points of the line reinforcing.
MatRebar
The material property for the reinforcing steel.
Remarks
This function adds a new line reinforcing shape or modifies an existing shape to
be a line reinforcing shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add Line Pattern Reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfLine("SD1", "SH1",
0, 0, 5, 2, 12, "#9", True, Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfLine
SetReinfRectangular
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfRectangular
VB6 Procedure
Function SetReinfRectangular(ByVal Name As String, ByRef ShapeName As
String, ByVal XCenter As Double, ByVal YCenter As Double, ByVal Rotation As
Double, ByVal h As Double, ByVal w As Double, Optional ByVal MatRebar As
String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
h
The section depth. [L]
w
The top flange width. [L]
MatRebar
The material property for the reinforcing steel.
Remarks
This function adds a new rectangular reinforcing shape or modifies an existing
shape to be a rectangular reinforcing shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfRectangular()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add rectangular reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfRectangular("SD1",
"SH1", 0, 0, 12, 12, 45, Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfRectangular
SetReinfSingle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetReinfSingle
VB6 Procedure
Function SetReinfSingle(ByVal Name As String, ByRef ShapeName As String,
ByVal XCenter As Double, ByVal YCenter As Double, Optional ByVal RebarSize
As String = "", Optional ByRef MatRebar As String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Barsize
It is the size of the reinforcing bar.
MatRebar
The material property for the reinforcing steel.
Remarks
This function adds a new single bar reinforcing shape or modifies an existing
shape to be a single bar reinforcing shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropReinfSingle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000psi")

'add single bar reinforcing shape to new property


ret = SapModel.PropFrame.SDShape.SetReinfSingle("SD1",
"SH1", 5, 5, "#9", Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetReinfSingle
SetSolidCircle
Syntax
SapObject.SapModel.PropFrame.SDShape.SetSolidCircle
VB6 Procedure
Function SetSolidCircle(ByVal Name As String, ByRefShapeNameAs String,
ByValMatProp As String, ByValSSOverwrite As String, ByValXCenter As Double,
ByValYCenter As Double, Optional ByVal diameter As Double = 24, Optional
ByVal color As Long = -1, Optional ByValReinf As Boolean = False, Optional
ByValNumberBars As Long = 8, Option ByVal Rotation As Double = 22.5,
Optional ByVal Cover As Double = 2, Optional ByValRebarSize As String = "",
Optional ByValMatRebar As String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Diameter
The diameter of the circle.[L]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape.
If the MatProp item is not a concrete material, this item is always assumed to be
False.
# Bars
This item is visible only if the Reinforcing item is set to True. It is the number of
equally spaced bars for the circular reinforcing.
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Bar Cover
This item is visible only if the Reinforcing item is set to True. It is the clear cover
for the specified rebar. [L]
Barsize
This item is visible only if the Reinforcing item is set to True. It is the size of the
reinforcing bar.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function adds a new solid circle shape or modifies an existing shape to be a
solid circle shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropSolidCircle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'addASTMA706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid circle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidCircle("SD1",
"SH1", "4000psi", "Default", 0, 0, 12, -1, True, 16, 0, 16, "#4",
Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSolidCircle
SetSolidRect
Syntax
SapObject.SapModel.PropFrame.SDShape.SetSolidRect
VB6 Procedure
Function SetSolidRect(ByVal Name As String, ByRef ShapeName As String,
ByVal MatProp As String, ByVal SSOverwrite As String, ByVal XCenter As
Double, ByVal YCenter As Double, ByVal h As Double, ByVal w As Double, ByVal
Rotation As Double, Optional ByVal color As Long = -1, Optional ByVal Reinf As
Boolean = False, Optional ByVal MatRebar As String = "") As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
SSOverwrite
This is a blank string, Default, or the name of a defined stress-strain curve.
If this item is a blank string or Default, the shape stress-strain curve is based on
the assigned material property.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
w
The section width. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
Reinf
This item is True when there is edge and corner reinforcing steel associated
with the shape.
If the MatProp item is not a concrete material, this item is always assumed to be
False.
MatRebar
The material property for the edge and corner reinforcing steel associated with
the shape. This item applies only when the MatProp item is a concrete material
and the Reinf item is True.
Remarks
This function adds a new solid rectangle shape or modifies an existing shape to
be an solid rectangle shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropSolidRect()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add solid rectangle shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidRect("SD1", "SH1",
"4000Psi", "Default", 0, 0, 24, 16, 0, -1, True, Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSolidRect
SetSolidSector
Syntax
SapObject.SapModel.PropFrame.SDShape.SetSolidSector
VB6 Procedure
Function SetSolidSector(ByVal Name As String, ByRefShapeName As String,
ByValMatProp As String, ByValXCenter As Double, ByValYCenter As Double,
ByVal Angle As Double, ByVal Rotation As Double, ByValRadius As Double,
Optional ByVal Color As Long = -1) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Angle
The angle between the two radii that define the circular sector. [deg]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Radius
The radius of the circle defining the Sector. [L]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
Remarks
This function adds a new solid sector shape or modifies an existing shape to be
a solid sector shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropSolidSector()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'addASTMA706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid sector shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidSector("SD1",
"SH1", "4000Psi", 0, 0, 95, 0, 10, -1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSolidSector
SetSolidSegment
Syntax
SapObject.SapModel.PropFrame.SDShape.SetSolidSegment
VB6 Procedure
Function SetSolidSegment(ByVal Name As String, ByRefShapeName As String,
ByValMatProp As String, ByValXCenter As Double, ByValYCenter As Double,
ByVal Angle As Double, ByVal Rotation As Double, ByValRadius as Double,
Optional ByVal Color As Long = -1) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Angle
The angle between lines drawn from the center of the circle to the end points of
the chord tat defines the segment. [deg]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Radius
The radius of the circle defining the segment.
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
Remarks
This function adds a new solid segment shape or modifies an existing shape to
be a solid segment shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropSolidSegment()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "4000Psi")

'add solid segment shape to new property


ret = SapModel.PropFrame.SDShape.SetSolidSegment("SD1",
"SH1", "4000Psi", 0, 0, 95, 0, 10, -1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSolidSegment
SetTee
Syntax
SapObject.SapModel.PropFrame.SDShape.SetTee
VB6 Procedure
Function SetTee(ByVal Name As String, ByRef ShapeName As String, ByVal
MatProp As String, ByVal PropName As String, ByVal XCenter As Double, ByVal
YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As Long =
-1, Optional ByVal h As Double = 24, Optional ByVal bf As Double = 24, Optional
ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Tee property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined Tee property that has been imported from a
section property file, the section dimensions are taken from the specified Tee
property.
If this item is not blank, and the specified property name is not a Tee that was
imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section depth. [L]
bf
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Remarks
This function adds a new Tee shape or modifies an existing shape to be a Tee
shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropTee()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Tee shape to new property


ret = SapModel.PropFrame.SDShape.SetTee("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetTee
SetTube
Syntax
SapObject.SapModel.PropFrame.SDShape.SetTube
VB6 Procedure
Function SetTube(ByVal Name As String, ByRef ShapeName As String, ByVal
MatProp As String, ByVal PropName As String, ByVal XCenter As Double, ByVal
YCenter As Double, ByVal Rotation As Double, Optional ByVal Color As Long =
-1, Optional ByVal h As Double = 24, Optional ByVal w As Double = 24, Optional
ByVal tf As Double = 2.4, Optional ByVal tw As Double = 2.4) As Long
Parameters
Name
The name of an existing frame section property that is a section designer
section.
ShapeName
The name of an existing or new shape in a section designer property. If this is an
existing shape, that shape is modified; otherwise, a new shape is added.
This item may be input as a blank string, in which case the program will assign a
shape name to the shape and return that name in the ShapeName variable.
MatProp
The name of the material property for the shape.
PropName
This is a blank string or the name of a defined Tube property that has been
imported from a section property file.
If this item is a blank string, the section dimensions are taken from the values
input in this function.
If this item is the name of a defined Tube property that has been imported from a
section property file, the section dimensions are taken from the specified Tube
property.
If this item is not blank and the specified property name is not an Tube that was
imported from a section property file, an error is returned.
XCenter
The X-coordinate of the center of the shape in the section designer coordinate
system. [L]
YCenter
The Y-coordinate of the center of the shape in the section designer coordinate
system. [L]
Rotation
The counter clockwise rotation of the shape from its default orientation. [deg]
Color
The fill color assigned to the shape. If Color is specified as -1, the program will
automatically assign the default fill color.
h
The section height. [L]
w
The section width. [L]
tf
The flange thickness. [L]
tw
The web thickness. [L]
Remarks
This function adds a new Tube shape or modifies an existing shape to be a Tube
shape in a section designer property.
The function returns zero if the shape is successfully added or modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSDPropTube()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new section designer frame section property


ret = SapModel.PropFrame.SetSDSection("SD1", "A992Fy50")

'add Tube shape to new property


ret = SapModel.PropFrame.SDShape.SetTube("SD1", "SH1",
"A992Fy50", "", 0, -9, 0, -1, 18, 6, 1, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetTube
AddMaterial
Syntax
SapObject.SapModel.PropMaterial.AddMaterial
VB6 Procedure
Function AddMaterial(ByRef Name As String, ByVal MatType As eMatType,
ByVal Region As String, ByVal Standard As String, ByVal Grade As String,
Optional ByVal UserName As String = "") As Long
Parameters
Name
This item is returned by the program. It is the name that the program ultimately
assigns for the material property. If no UserName is specified, the program
assigns a default name to the material property. If a UserName is specified and
that name is not used for another material property, the UserName is assigned
to the material property.
MatType
This is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7
Region
The region name of the material property that is user-predefined in the file
"CSiMaterialLibrary*.xml" located in subfolder "Property Libraries" under the
CSiBridge installation.
Standard
The Standard name of the material property with the specified MatType within
the specified region.
Grade
The Grade name of the material property with the specified MatType within the
specified region and Standard.
UserName
This is an optional user specified name for the material property. If a UserName
is specified and that name is already used for another material property, the
program ignores the UserName.
Remarks
This function adds a new material property to the model based on the Code-
specified and other pre-defined material properties defined in the installed file
"CSiMaterialLibrary*.xml" located in subfolder "Property Libraries" under the
CSiBridge installation folder.
The function returns zero if the material property is successfully added,
otherwise it returns a nonzero value.
VBA Example
Sub AddMaterial()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material property in United states Region


ret = SapModel.PropMaterial.AddMaterial(Name,
MATERIAL_REBAR, "United States", "ASTM A706", "Grade 60")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.2.0.
The function supercedes AddQuick as of version 15.2.0.
ChangeName
Syntax
SapObject.SapModel.PropMaterial.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined material property.
NewName
The new name for the material property.
Remarks
This function changes the name of an existing material property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeMaterialName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name of material property


ret = SapModel.PropMaterial.ChangeName("4000Psi", "MatConc")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropMaterial.Count
VB6 Procedure
Function Count(Optional ByVal MatType As eMatType) As Long
Parameters
MatType
This optional value is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7

If no value is input for MatType, a count is returned for all material properties in
the model regardless of type.
Remarks
This function returns the total number of defined material properties in the model.
If desired, counts can be returned for all material properties of a specified type
in the model.
VBA Example
Sub CountMaterials()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of defined materials of all types


Count = SapModel.PropMaterial.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropMaterial.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing material property.
Remarks
The function deletes a specified material property.
The function returns zero if the material property is successfully deleted;
otherwise it returns a nonzero value. It returns an error if the specified material
property can not be deleted, for example, if it is being used in a section property.
VBA Example
Sub DeleteMaterial()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete material
ret = SapModel.PropMaterial.Delete("4000Psi")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetDamping
Syntax
SapObject.SapModel.PropMaterial.GetDamping
VB6 Procedure
Function GetDamping(ByVal Name As String, ByRef ModalRatio As Double,
ByRef ViscousMassCoeff As Double, ByRef ViscousStiffCoeff As Double,
ByRef HystereticMassCoeff As Double, ByRef HystereticStiffCoeff As Double,
Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
ModalRatio
The modal damping ratio.
ViscousMassCoeff
The mass coefficient for viscous proportional damping.
ViscousStiffCoeff
The stiffness coefficient for viscous proportional damping.
HystereticMassCoeff
The mass coefficient for hysteretic proportional damping.
HystereticStiffCoeff
The stiffness coefficient for hysteretic proportional damping.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the additional material damping data for the material.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetMatPropDamping()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModalRatio As Double
Dim ViscousMassCoeff As Double
Dim ViscousStiffCoeff As Double
Dim HystereticMassCoeff As Double
Dim HystereticStiffCoeff As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Conc",
MATERIAL_CONCRETE)

'assign material damping data


ret = SapModel.PropMaterial.SetDamping("Conc", 0.04, 0, 0,
0, 0)

'get material damping data


ret = SapModel.PropMaterial.GetDamping("Conc", ModalRatio,
ViscousMassCoeff, ViscousStiffCoeff, HystereticMassCoeff,
HystereticStiffCoeff)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDamping
GetMaterial
Syntax
SapObject.SapModel.PropMaterial.GetMaterial
VB6 Procedure
Function GetMaterial(ByVal Name As String, ByRef MatType As eMatType,
ByRef Color As Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing material property.
MatType
This is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7
Color
The display color assigned to the material.
Notes
The notes, if any, assigned to the material.
GUID
The GUID (global unique identifier), if any, assigned to the material.
Remarks
This function retrieves some basic material property data.
The function returns zero if the material is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetBasicMatPropData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatType As eMatType
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL, -1, "API example test", "Default")

'get basic material property data


ret = SapModel.PropMaterial.GetMaterial("Steel", MatType,
Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMaterial
GetMPAnisotropic
Syntax
SapObject.SapModel.PropMaterial.GetMPAnisotropic
VB6 Procedure
Function GetMPAnisotropic(ByVal Name As String, ByRef e As Double, ByRef u
As Double, ByRef a As Double, ByRef g As Double, Optional ByVal Temp As
Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
This is an array that includes the modulus of elasticity.
e(0) = E1 [F/L2]
e(1) = E2 [F/L2]
e(2) = E3 [F/L2]
u
This is an array that includes poissons ratio.
u(0) = U12
u(1) = U13
u(2) = U23
u(3) = U14
u(4) = U24
u(5) = U34
u(6) = U15
u(7) = U25
u(8) = U35
u(9) = U45
u(10) = U16
u(11) = U26
u(12) = U36
u(13) = U46
u(14) = U56
a
This is an array that includes the thermal coefficient.
a(0) = A1 [1/T]
a(1) = A2 [1/T]
a(2) = A3 [1/T]
a(3) = A12 [1/T]
a(4) = A13 [1/T]
a(5) = A23 [1/T]
g
This is an array that includes the shear modulus.
g(0) = G12 [F/L2]
g(1) = G13 [F/L2]
g(2) = G23 [F/L2]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the mechanical properties for a material with an
anisotropic directional symmetry type.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the symmetry type of
the specified material is not anisotropic.
VBA Example
Sub GetMatPropAnisotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyE() As Double
Dim MyU() As Double
Dim MyA() As Double
Dim MyG() As Double
Dim e() As Double
Dim u() As Double
Dim a() As Double
Dim g() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign anisotropic mechanical properties


ReDim MyE(2)
ReDim MyU(14)
ReDim MyA(6)
ReDim MyG(2)
MyE(0)=30000
MyE(1)=10000
MyE(2)=2000
MyU(0)=0.2
MyU(1)=0.05
MyU(2)=0.1
MyU(3)=0
MyU(4)=0
MyU(5)=0
MyU(6)=0
MyU(7)=0
MyU(8)=0.01
MyU(9)=0
MyU(10)=0
MyU(11)=0
MyU(12)=0
MyU(13)=0
MyU(14)=0
MyA(0)=6.5E-6
MyA(1)=6.5E-6
MyA(2)=6.5E-6
MyA(3)=6.5E-6
MyA(4)=6.5E-6
MyA(5)=6.5E-6
MyG(0)=1500
MyG(1)=2500
MyG(2)=8700
ret = SapModel.PropMaterial.SetMPAnisotropic("Steel", MyE,
MyU, MyA, MyG)

'get anisotropic mechanical properties


ret = SapModel.PropMaterial.GetMPAnisotropic("Steel", e, u,
a, g)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMPAnisotropic
GetMPIsotropic
Syntax
SapObject.SapModel.PropMaterial.GetMPIsotropic
VB6 Procedure
Function GetMPIsotropic(ByVal Name As String, ByRef e As Double, ByRef u
As Double, ByRef a As Double, ByRef g As Double, Optional ByVal Temp As
Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
The modulus of elasticity. [F/L2]
u
Poissons ratio.
a
The thermal coefficient. [1/T]
g
The shear modulus. For isotropic materials this value is program calculated from
the modulus of elasticity and poissons ratio. [F/L2]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the mechanical properties for a material with an isotropic
directional symmetry type.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the symmetry type of
the specified material is not isotropic.
VBA Example
Sub GetMatPropIsotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim e As Double
Dim u As Double
Dim a As Double
Dim g As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign isotropic mechanical properties


ret = SapModel.PropMaterial.SetMPIsotropic("Steel", 29500,
0.25, 6E-06)

'get isotropic mechanical properties


ret = SapModel.PropMaterial.GetMPIsotropic("Steel", e, u, a,
g)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMPIsotropic
GetMPOrthotropic
Syntax
SapObject.SapModel.PropMaterial.GetMPOrthotropic
VB6 Procedure
Function GetMPOrthotropic(ByVal Name As String, ByRef e As Double, ByRef u
As Double, ByRef a As Double, ByRef g As Double, Optional ByVal Temp As
Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
This is an array that includes the modulus of elasticity.
e(0) = E1 [F/L2]
e(1) = E2 [F/L2]
e(2) = E3 [F/L2]
u
This is an array that includes poissons ratio.
u(0) = U12
u(1) = U13
u(2) = U23
a
This is an array that includes the thermal coefficient.
a(0) = A1 [1/T]
a(1) = A2 [1/T]
a(2) = A3 [1/T]
g
This is an array that includes the shear modulus.
g(0) = G12 [F/L2]
g(1) = G13 [F/L2]
g(2) = G23 [F/L2]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the mechanical properties for a material with an
orthotropic directional symmetry type.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the symmetry type of
the specified material is not orthotropic.
VBA Example
Sub GetMatPropOrthotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyE() As Double
Dim MyU() As Double
Dim MyA() As Double
Dim MyG() As Double
Dim e() As Double
Dim u() As Double
Dim a() As Double
Dim g() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign orthotropic mechanical properties


ReDim MyE(2)
ReDim MyU(2)
ReDim MyA(2)
ReDim MyG(2)
MyE(0)=30000
MyE(1)=10000
MyE(2)=2000
MyU(0)=0.2
MyU(1)=0.05
MyU(2)=0.1
MyA(0)=6.5E-6
MyA(1)=6.5E-6
MyA(2)=6.5E-6
MyG(0)=1500
MyG(1)=2500
MyG(2)=8700
ret = SapModel.PropMaterial.SetMPOrthotropic("Steel", MyE,
MyU, MyA, MyG)

'get orthotropic mechanical properties


ret = SapModel.PropMaterial.GetMPOrthotropic("Steel", e, u,
a, g)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMPOrthotropic
GetMPUniaxial
Syntax
SapObject.SapModel.PropMaterial.GetMPUniaxial
VB6 Procedure
Function GetMPUniaxial(ByVal Name As String, ByRef e As Double, ByRef a As
Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
The modulus of elasticity. [F/L2]
a
The thermal coefficient. [1/T]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the mechanical properties for a material with a uniaxial
directional symmetry type.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the symmetry type of
the specified material is not uniaxial.
VBA Example
Sub GetMatPropUniaxial()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim e As Double
Dim a As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Rebar",
MATERIAL_REBAR)

'assign uniaxial mechanical properties


ret = SapModel.PropMaterial.SetMPUniaxial("Rebar", 28500,
6E-06)

'get uniaxial mechanical properties


ret = SapModel.PropMaterial.GetMPUniaxial("Rebar", e, a)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMPUniaxial
GetNameList
Syntax
SapObject.SapModel.PropMaterial.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal MatType As eMatType) As Long
Parameters
NumberNames
The number of material property names retrieved by the program.
MyName
This is a one-dimensional array of material property names. The MyName array
is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
MatType
This optional value is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7

If no value is input for MatType, names are returned for all material properties in
the model regardless of type.
Remarks
This function retrieves the names of all defined material properties of the
specified type.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetMaterialNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get material property names


ret = SapModel.PropMaterial.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetOAluminum
Syntax
SapObject.SapModel.PropMaterial.GetOAluminum
VB6 Procedure
Function GetOAluminum(ByVal Name As String, ByVal MyType As Long, ByRef
Alloy As String, ByRef Fcy As Double, ByRef Fty As Double, ByRef Ftu As
Double, ByRef Fsu As Double, ByRef SSHysType As Long, Optional ByVal
Temp As Double = 0) As Long
Parameters
Name
The name of an existing aluminum material property.
MyType
This is 1, 2 or 3, indicating the type of aluminum.
1 = Wrought
2 = Cast-Mold
3 = Cast-Sand
Alloy
The Alloy designation for the aluminum, for example, 2014-T6 for wrought or
356.0-T7 for cast (mold or sand) aluminum.
Fcy
The compressive yield strength of aluminum. [F/L2]
Fty
The tensile yield strength of aluminum. [F/L2]
Ftu
The tensile ultimate strength of aluminum. [F/L2]
Fsu
The shear ultimate strength of aluminum. [F/L2]
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for aluminum materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not aluminum.
VBA Example
Sub GetMatPropAluminumData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim Alloy As String
Dim Fcy As Double
Dim Fty As Double
Dim Ftu As Double
Dim Fsu As Double
Dim SSHysType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Aluminum",
MATERIAL_ALUMINUM)

'assign other properties


ret = SapModel.PropMaterial.SetOAluminum("Aluminum", 1,
"2014-T6", 34, 34, 37, 23, 2)

'get other properties


ret = SapModel.PropMaterial.GetOAluminum("Aluminum", MyType,
Alloy, Fcy, Fty, Ftu, Fsu, SSHysType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetOAluminum
GetOColdFormed
Syntax
SapObject.SapModel.PropMaterial.GetOColdFormed
VB6 Procedure
Function GetOColdFormed(ByVal Name As String, ByRef Fy As Double, ByRef
Fu As Double, ByRef SSHysType As Long, Optional ByVal Temp As Double = 0)
As Long
Parameters
Name
The name of an existing cold formed material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for cold formed
materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not cold formed.
VBA Example
Sub GetMatPropColdFormedData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim SSHysType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("ColdFormed",
MATERIAL_COLDFORMED)

'assign other properties


ret = SapModel.PropMaterial.SetOColdFormed("ColdFormed", 52,
67, 1)

'get other properties


ret = SapModel.PropMaterial.GetOColdFormed("ColdFormed", Fy,
Fu, SSHysType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetOColdFormed
GetOConcrete_1
Syntax
SapObject.SapModel.PropMaterial.GetOConcrete_1
VB6 Procedure
Function GetOConcrete_1(ByVal Name As String, ByRef fc As Double, ByRef
IsLightweight As Boolean, ByRef fcsfactor As Double, ByRef SSType As Long,
ByRef SSHysType As Long, ByRef StrainAtfc As Double, ByRef StrainUltimate
As Double, ByRef FinalSlope As Double, ByRef FrictionAngle As Double, ByRef
DilatationalAngle As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
fc
The concrete compressive strength. [F/L2]
IsLightweight
If this item is True, the concrete is assumed to be lightweight concrete.
fcsfactor
The shear strength reduction factor for lightweight concrete.
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
2 = Parametric - Mander
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtfc
This item applies only to parametric stress-strain curves. It is the strain at the
unconfined compressive strength.
StrainUltimate
This item applies only to parametric stress-strain curves. It is the ultimate
unconfined strain capacity.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope on the compression side of the curve.
FrictionAngle
The Drucker-Prager friction angle, 0 <= FrictionAngle < 90. [deg]
DilatationalAngle
The Drucker-Prager dilatational angle, 0 <= DilatationalAngle < 90. [deg]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for concrete materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not concrete.
VBA Example
Sub GetMatPropConcreteData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim fc As Double
Dim IsLightweight As Boolean
Dim fcsfactor As Double
Dim SSType As Long
Dim SSHysType As Long
Dim StrainAtfc As Double
Dim StrainUltimate As Double
Dim FinalSlope As Double
Dim FrictionAngle As Double
Dim DilatationalAngle As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
MATERIAL_CONCRETE)

'assign other properties


ret = SapModel.PropMaterial.SetOConcrete_1("Concrete", 5,
False, 0, 1, 2, 0.0022, 0.0052, -0.1)

'get other properties


ret = SapModel.PropMaterial.GetOConcrete_1("Concrete", fc,
IsLightweight, fcsfactor, SSType, SSHysType, StrainAtfc,
StrainUltimate, FinalSlope, FrictionAngle, DilatationalAngle)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes GetOConcrete.
See Also
SetOConcrete_1
GetONoDesign
Syntax
SapObject.SapModel.PropMaterial.GetONoDesign
VB6 Procedure
Function GetONoDesign(ByVal Name As String, ByRef FrictionAngle As
Double, ByRef DilatationalAngle As Double, Optional ByVal Temp As Double = 0)
As Long
Parameters
Name
The name of an existing concrete material property.
FrictionAngle
The Drucker-Prager friction angle, 0 <= FrictionAngle < 90. [deg]
DilatationalAngle
The Drucker-Prager dilatational angle, 0 <= DilatationalAngle < 90. [deg]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for no design type
materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not concrete.
VBA Example
Sub GetMatPropNoDesignData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FrictionAngle As Double
Dim DilatationalAngle As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("NoDesign",
MATERIAL_NODESIGN)

'assign other properties


ret = SapModel.PropMaterial.SetONoDesign("NoDesign", 10, 15)

'get other properties


ret = SapModel.PropMaterial.GetONoDesign("NoDesign",
FrictionAngle, DilatationalAngle)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetONoDesign
GetORebar_1
Syntax
SapObject.SapModel.PropMaterial.GetORebar_1
VB6 Procedure
Function GetORebar_1(ByVal Name As String, ByRef Fy As Double, ByRef Fu
As Double, ByRef eFy As Double, ByRef eFu As Double, ByRef SSType As
Long, ByRef SSHysType As Long, ByRef StrainAtHardening As Double, ByRef
StrainUltimate As Double, ByRef FinalSlope As Double, ByRef
UseCaltransSSDefaults As Boolean, Optional ByVal Temp As Double = 0) As
Long
Parameters
Name
The name of an existing rebar material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
eFy
The expected yield stress. [F/L2]
eFu
The expected tensile stress. [F/L2]
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
2 = Parametric - Park
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtHardening
This item applies only when parametric stress-strain curves are used and when
UseCaltransSSDefaults is False. It is the strain at the onset of strain hardening.
StrainUltimate
This item applies only when parametric stress-strain curves are used and when
UseCaltransSSDefaults is False. It is the ultimate strain capacity. This item must
be larger than the StrainAtHardening item.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
UseCaltransSSDefaults
If this item is True, the program uses Caltrans default controlling strain values,
which are bar size dependent.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for rebar materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not rebar.
VBA Example
Sub GetMatPropRebarData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim eFy As Double
Dim eFu As Double
Dim SSType As Long
Dim SSHysType As Long
Dim StrainAtHardening As Double
Dim StrainUltimate As Double
Dim FinalSlope As Double
Dim UseCaltransSSDefaults As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Rebar",
MATERIAL_REBAR)

'assign other properties


ret = SapModel.PropMaterial.SetORebar_1("Rebar", 62, 93, 70,
102, 2, 2, 0.02, 0.1, -0.1, False)

'get other properties


ret = SapModel.PropMaterial.GetORebar_1("Rebar", Fy, Fu,
eFy, eFu, SSType, SSHysType, StrainAtHardening, StrainUltimate,
FinalSlope, UseCaltransSSDefaults)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes GetORebar.
See Also
SetORebar_1
GetOSteel_1
Syntax
SapObject.SapModel.PropMaterial.GetOSteel_1
VB6 Procedure
Function GetOSteel_1(ByVal Name As String, ByRef Fy As Double, ByRef Fu
As Double, ByRef eFy As Double, ByRef eFu As Double, ByRef SSType As
Long, ByRef SSHysType As Long, ByRef StrainAtHardening As Double, ByRef
StrainAtMaxStress As Double, ByRef StrainAtRupture As Double, ByRef
FinalSlope As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing steel material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
eFy
The expected yield stress. [F/L2]
eFu
The expected tensile stress. [F/L2]
SSType
This is 0 or 1. indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtHardening
This item applies only to parametric stress-strain curves. It is the strain at the
onset of strain hardening.
StrainAtMaxStress
This item applies only to parametric stress-strain curves. It is the strain at
maximum stress.
StrainAtRupture
This item applies only to parametric stress-strain curves. It is the strain at
rupture.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for steel materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not steel.
VBA Example
Sub GetMatPropSteelData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim eFy As Double
Dim eFu As Double
Dim SSType As Long
Dim SSHysType As Long
Dim StrainAtHardening As Double
Dim StrainAtMaxStress As Double
Dim StrainAtRupture As Double
Dim FinalSlope As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign other properties


ret = SapModel.PropMaterial.SetOSteel_1("Steel", 55, 68, 60,
70, 1, 2, 0.02, 0.1, 0.2, -0.1)

'get other properties


ret = SapModel.PropMaterial.GetOSteel_1("Steel", Fy, Fu,
eFy, eFu, SSType, SSHysType, StrainAtHardening, StrainAtMaxStress,
StrainAtRupture, FinalSlope)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes GetOSteel.
See Also
SetOSteel_1
GetOTendon_1
Syntax
SapObject.SapModel.PropMaterial.GetOTendon_1
VB6 Procedure
Function GetOTendon_1(ByVal Name As String, ByRef Fy As Double, ByRef Fu
As Double, ByRef SSType As Long, ByRef SSHysType As Long, ByRef
FinalSlope As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric 250 ksi strand
2 = Parametric 270 ksi strand
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for tendon materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not tendon.
VBA Example
Sub GetMatPropTendonData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim SSType As Long
Dim SSHysType As Long
Dim FinalSlope As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
MATERIAL_TENDON)

'assign other properties


ret = SapModel.PropMaterial.SetOTendon_1("Tendon", 230, 255,
1, 1, -0.1)

'get other properties


ret = SapModel.PropMaterial.GetOTendon_1("Tendon", Fy, Fu,
SSType, SSHysType, FinalSlope)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes GetOTendon.
See Also
SetOTendon_1
GetSSCurve
Syntax
SapObject.SapModel.PropMaterial.GetSSCurve
VB6 Procedure
Function GetMPIsotropic(ByVal Name As String, ByRef NumberPoints As Long,
ByRef PointID() As Long, ByRef Strain() As Double, ByRef Stress() As Double,
Optional ByVal SectName As String = "", Optional ByVal RebarArea As Double =
0, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
NumberPoints
The number of points in the stress-strain curve.
PointID
This is one of the following integers which sets the point ID. The point ID controls
the color that will be displayed for hinges in a deformed shape plot.
-5 = -E
-4 = -D
-3 = -C
-2 = -B
0 = None
1=A
2=B
3=C
4=D
5=E

Strain
This is an array that includes the strain at each point on the stress strain curve.
Stress
This is an array that includes the stress at each point on the stress strain curve.
[F/L2]
SectName
This item applies only if the specified material is concrete with a Mander
concrete type.
This is the frame section property for which the Mander stress-strain curve is
retrieved.
The section must be round or rectangular.
RebarArea
This item applies only if the specified material is rebar, which does not have a
user-defined stress-strain curve and is specified to use Caltrans default
controlling strain values, which are bar size dependent.
This is the area of the rebar for which the stress-strain curve is retrieved.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the material stress-strain curve.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetMatPropSSCurve()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim PointID() As Long
Dim Strain() As Double
Dim Stress() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'get stress strain curve


ret = SapModel.PropMaterial.GetSSCurve("A992Fy50",
NumberPoints, PointID, Strain, Stress)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetSSCurve
GetTemp
Syntax
SapObject.SapModel.PropMaterial.GetTemp
VB6 Procedure
Function GetTemp(ByVal Name As String, ByRef NumberItems as long, ByRef
Temp() As Double) As Long
Parameters
Name
The name of a material property.
NumberItems
The number of different temperatures at which properties are specified for the
material.
Temp
This is an array that includes the different temperatures at which properties are
specified for the material.
Remarks
This function retrieves the temperatures at which properties are specified for a
material.
The function returns zero if the temperatures are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetMatPropTemps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyTemp() As Double
Dim Temp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'specify temps at which properties will be provided


ReDim MyTemp(2)
MyTemp(0) = 0
MyTemp(1) = 50
MyTemp(2) = 100
ret = SapModel.PropMaterial.SetTemp("Steel", 3, MyTemp)

'get temps at which properties are provided


ret = SapModel.PropMaterial.GetTemp("Steel", NumberItems,
Temp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTemp
GetTypeOAPI
Syntax
SapObject.SapModel.PropMaterial.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef MatType As eMatType,
ByRef SymType As Long) As Long
Parameters
Name
The name of an existing material property.
MatType
This is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7
SymType
This is 0, 1, 2 or 3, indicating the material directional symmetry type.
0= Isotropic
1= Orthotropic
2= Anisotropic
3= Uniaxial
Remarks
This function retrieves the material type for the specified material.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetMaterialType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatType As eMatType
Dim SymType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get material type


ret = SapModel.PropMaterial.GetTypeOAPI("4000Psi", MatType,
SymType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
GetWeightAndMass
Syntax
SapObject.SapModel.PropMaterial.GetWeightAndMass
VB6 Procedure
Function GetWeightAndMass(ByVal Name As String, ByRef w As Double,
ByRef m As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
w
The weight per unit volume for the material. [F/L3]
m
The mass per unit volume for the material. [M/L3]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the weight per unit volume and mass per unit volume of
the material.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetMatPropWeightAndMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim w As Double
Dim m As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign material property weight per unit volume


ret = SapModel.PropMaterial.SetWeightAndMass("Steel", 1,
0.00029)

'get material weight and mass per unit volume


ret = SapModel.PropMaterial.GetWeightAndMass("Steel", w, m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetWeightAndMass
SetDamping
Syntax
SapObject.SapModel.PropMaterial.SetDamping
VB6 Procedure
Function SetDamping(ByVal Name As String, ByVal ModalRatio As Double,
ByVal ViscousMassCoeff As Double, ByVal ViscousStiffCoeff As Double, ByVal
HystereticMassCoeff As Double, ByVal HystereticStiffCoeff As Double,
Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
ModalRatio
The modal damping ratio.
ViscousMassCoeff
The mass coefficient for viscous proportional damping.
ViscousStiffCoeff
The stiffness coefficient for viscous proportional damping.
HystereticMassCoeff
The mass coefficient for hysteretic proportional damping.
HystereticStiffCoeff
The stiffness coefficient for hysteretic proportional damping.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been previously defined for the material.
Remarks
This function sets the additional material damping data for the material.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropDamping()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Conc",
MATERIAL_CONCRETE)

'assign material damping data


ret = SapModel.PropMaterial.SetDamping("Conc", 0.04, 0, 0,
0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDamping
SetMaterial
Syntax
SapObject.SapModel.PropMaterial.SetMaterial
VB6 Procedure
Function SetMaterial(ByVal Name As String, ByVal MatType As eMatType,
Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new material property. If this is an existing property,
that property is modified; otherwise, a new property is added.
MatType
This is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7
Color
The display color assigned to the material. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the material.
GUID
The GUID (global unique identifier), if any, assigned to the material. If this item is
input as Default, the program assigns a GUID to the material.
Remarks
This function initializes a material property. If this function is called for an existing
material property, all items for the material are reset to their default value.
The function returns zero if the material is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub InitializeMatProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMaterial
SetMPAnisotropic
Syntax
SapObject.SapModel.PropMaterial.SetMPAnisotropic
VB6 Procedure
Function SetMPAnisotropic(ByVal Name As String, ByRef e() As Double, ByRef
u() As Double, ByRef a() As Double, ByRef g() As Double, Optional ByVal Temp
As Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
This is an array that includes the modulus of elasticity.
e(0) = E1 [F/L2]
e(1) = E2 [F/L2]
e(2) = E3 [F/L2]
u
This is an array that includes poissons ratio.
u(0) = U12
u(1) = U13
u(2) = U23
u(3) = U14
u(4) = U24
u(5) = U34
u(6) = U15
u(7) = U25
u(8) = U35
u(9) = U45
u(10) = U16
u(11) = U26
u(12) = U36
u(13) = U46
u(14) = U56
a
This is an array that includes the thermal coefficient.
a(0) = A1 [1/T]
a(1) = A2 [1/T]
a(2) = A3 [1/T]
a(3) = A12 [1/T]
a(4) = A13 [1/T]
a(5) = A23 [1/T]
g
This is an array that includes the shear modulus.
g(0) = G12 [F/L2]
g(1) = G13 [F/L2]
g(2) = G23 [F/L2]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the material directional symmetry type to anisotropic, and
assigns the anisotropic mechanical properties.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropAnisotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyE() As Double
Dim MyU() As Double
Dim MyA() As Double
Dim MyG() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign anisotropic mechanical properties


ReDim MyE(2)
ReDim MyU(14)
ReDim MyA(6)
ReDim MyG(2)
MyE(0)=30000
MyE(1)=10000
MyE(2)=2000
MyU(0)=0.2
MyU(1)=0.05
MyU(2)=0.1
MyU(3)=0
MyU(4)=0
MyU(5)=0
MyU(6)=0
MyU(7)=0
MyU(8)=0.01
MyU(9)=0
MyU(10)=0
MyU(11)=0
MyU(12)=0
MyU(13)=0
MyU(14)=0
MyA(0)=6.5E-6
MyA(1)=6.5E-6
MyA(2)=6.5E-6
MyA(3)=6.5E-6
MyA(4)=6.5E-6
MyA(5)=6.5E-6
MyG(0)=1500
MyG(1)=2500
MyG(2)=8700
ret = SapModel.PropMaterial.SetMPAnisotropic("Steel", MyE,
MyU, MyA, MyG)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMPAnisotropic
SetMPIsotropic
Syntax
SapObject.SapModel.PropMaterial.SetMPIsotropic
VB6 Procedure
Function SetMPIsotropic(ByVal Name As String, ByVal e As Double, ByVal u As
Double, ByVal a As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
The modulus of elasticity. [F/L2]
u
Poissons ratio.
a
The thermal coefficient. [1/T]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the material directional symmetry type to isotropic, and
assigns the isotropic mechanical properties.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropIsotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign isotropic mechanical properties


ret = SapModel.PropMaterial.SetMPIsotropic("Steel", 29500,
0.25, 6E-06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMPIsotropic
SetMPOrthotropic
Syntax
SapObject.SapModel.PropMaterial.SetMPOrthotropic
VB6 Procedure
Function SetMPOrthotropic(ByVal Name As String, ByRef e() As Double, ByRef
u() As Double, ByRef a() As Double, ByRef g() As Double, Optional ByVal Temp
As Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
This is an array that includes the modulus of elasticity.
e(0) = E1 [F/L2]
e(1) = E2 [F/L2]
e(2) = E3 [F/L2]
u
This is an array that includes poissons ratio.
u(0) = U12
u(1) = U13
u(2) = U23
a
This is an array that includes the thermal coefficient.
a(0) = A1 [1/T]
a(1) = A2 [1/T]
a(2) = A3 [1/T]
g
This is an array that includes the shear modulus.
g(0) = G12 [F/L2]
g(1) = G13 [F/L2]
g(2) = G23 [F/L2]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the material directional symmetry type to orthotropic, and
assigns the orthotropic mechanical properties.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropOrthotropic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyE() As Double
Dim MyU() As Double
Dim MyA() As Double
Dim MyG() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign orthotropic mechanical properties


ReDim MyE(2)
ReDim MyU(2)
ReDim MyA(2)
ReDim MyG(2)
MyE(0)=30000
MyE(1)=10000
MyE(2)=2000
MyU(0)=0.2
MyU(1)=0.05
MyU(2)=0.1
MyA(0)=6.5E-6
MyA(1)=6.5E-6
MyA(2)=6.5E-6
MyG(0)=1500
MyG(1)=2500
MyG(2)=8700
ret = SapModel.PropMaterial.SetMPOrthotropic("Steel", MyE,
MyU, MyA, MyG)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMPOrthotropic
SetMPUniaxial
Syntax
SapObject.SapModel.PropMaterial.SetMPUniaxial
VB6 Procedure
Function SetMPUniaxial(ByVal Name As String, ByVal e As Double, ByVal a As
Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
e
The modulus of elasticity. [F/L2]
a
The thermal coefficient. [1/T]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the material directional symmetry type to uniaxial, and assigns
the uniaxial mechanical properties.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropUniaxial()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Rebar",
MATERIAL_REBAR)

'assign uniaxial mechanical properties


ret = SapModel.PropMaterial.SetMPUniaxial("Rebar", 28500,
6E-06)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMPUniaxial
SetOAluminum
Syntax
SapObject.SapModel.PropMaterial.SetOAluminum
VB6 Procedure
Function SetOAluminum(ByVal Name As String, ByVal MyType As Long, ByVal
Alloy As String, ByVal Fcy As Double, ByVal Fty As Double, ByVal Ftu As Double,
ByVal Fsu As Double, ByVal SSHysType As Long, Optional ByVal Temp As
Double = 0) As Long
Parameters
Name
The name of an existing aluminum material property.
MyType
This is 1, 2 or 3, indicating the type of aluminum.
1 = Wrought
2 = Cast-Mold
3 = Cast-Sand
Alloy
The Alloy designation for the aluminum, for example, 2014-T6 for wrought or
356.0-T7 for cast (mold or sand) aluminum.
Fcy
The compressive yield strength of aluminum. [F/L2]
Fty
The tensile yield strength of aluminum. [F/L2]
Ftu
The tensile ultimate strength of aluminum. [F/L2]
Fsu
The shear ultimate strength of aluminum. [F/L2]
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for aluminum materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropAluminumData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Aluminum",
MATERIAL_ALUMINUM)

'assign other properties


ret = SapModel.PropMaterial.SetOAluminum("Aluminum", 1,
"2014-T6", 34, 34, 37, 23, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetOAluminum
SetOColdFormed
Syntax
SapObject.SapModel.PropMaterial.SetOColdFormed
VB6 Procedure
Function SetOColdFormed(ByVal Name As String, ByVal Fy As Double, ByVal
Fu As Double, ByVal SSHysType As Long, Optional ByVal Temp As Double = 0)
As Long
Parameters
Name
The name of an existing cold formed material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for cold formed materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropColdFormedData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("ColdFormed",
MATERIAL_COLDFORMED)

'assign other properties


ret = SapModel.PropMaterial.SetOColdFormed("ColdFormed", 52,
67, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetOColdFormed
SetOConcrete_1
Syntax
SapObject.SapModel.PropMaterial.SetOConcrete_1
VB6 Procedure
Function SetOConcrete_1(ByVal Name As String, ByVal fc As Double, ByVal
IsLightweight As Boolean, ByVal fcsfactor As Double, ByVal sstype As Long,
ByVal SSHysType As Long, ByVal StrainAtfc As Double, ByVal StrainUltimate As
Double, ByVal FinalSlope As Double, Optional ByVal FrictionAngle As Double =
0, Optional ByVal DilatationalAngle As Double = 0, Optional ByVal Temp As
Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
fc
The concrete compressive strength. [F/L2]
IsLightweight
If this item is True, the concrete is assumed to be lightweight concrete.
fcsfactor
The shear strength reduction factor for lightweight concrete.
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
2 = Parametric - Mander
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtfc
This item applies only to parametric stress-strain curves. It is the strain at the
unconfined compressive strength.
StrainUltimate
This item applies only to parametric stress-strain curves. It is the ultimate
unconfined strain capacity. This item must be larger than the StrainAtfc item.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope on the compression side of the curve.
FrictionAngle
The Drucker-Prager friction angle, 0 <= FrictionAngle < 90. [deg]
DilatationalAngle
The Drucker-Prager dilatational angle, 0 <= DilatationalAngle < 90. [deg]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for concrete materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropConcreteData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
MATERIAL_CONCRETE)

'assign other properties


ret = SapModel.PropMaterial.SetOConcrete_1("Concrete", 5,
False, 0, 1, 2, 0.0022, 0.0052, -0.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes SetOConcrete.
See Also
GetOConcrete_1
SetONoDesign
Syntax
SapObject.SapModel.PropMaterial.SetONoDesign
VB6 Procedure
Function SetONoDesign(ByVal Name As String, Optional ByVal FrictionAngle As
Double = 0, Optional ByVal DilatationalAngle As Double = 0, Optional ByVal
Temp As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
FrictionAngle
The Drucker-Prager friction angle, 0 <= FrictionAngle < 90. [deg]
DilatationalAngle
The Drucker-Prager dilatational angle, 0 <= DilatationalAngle < 90. [deg]
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for no design type materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropNoDesignData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("NoDesign",
MATERIAL_NODESIGN)

'assign other properties


ret = SapModel.PropMaterial.SetONoDesign("NoDesign", 10, 15)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetONoDesign
SetORebar_1
Syntax
SapObject.SapModel.PropMaterial.SetORebar_1
VB6 Procedure
Function SetORebar_1(ByVal Name As String, ByVal Fy As Double, ByVal Fu As
Double, ByVal eFy As Double, ByVal eFu As Double, ByVal SSType As Long,
ByVal SSHysType As Long, ByVal StrainAtHardening As Double, ByVal
StrainUltimate As Double, ByVal FinalSlope As Double, ByVal
UseCaltransSSDefaults As Boolean, Optional ByVal Temp As Double = 0) As
Long
Parameters
Name
The name of an existing rebar material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
eFy
The expected yield stress. [F/L2]
eFu
The expected tensile stress. [F/L2]
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
2 = Parametric - Park
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtHardening
This item applies only when parametric stress-strain curves are used and when
UseCaltransSSDefaults is False. It is the strain at the onset of strain hardening.
StrainUltimate
This item applies only when parametric stress-strain curves are used and when
UseCaltransSSDefaults is False. It is the ultimate strain capacity. This item must
be larger than the StrainAtHardening item.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
UseCaltransSSDefaults
If this item is True, the program uses Caltrans default controlling strain values,
which are bar size dependent.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for rebar materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropRebarData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Rebar",
MATERIAL_REBAR)

'assign other properties


ret = SapModel.PropMaterial.SetORebar_1("Rebar", 62, 93, 70,
102, 2, 2, 0.02, 0.1, -0.1, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes SetORebar.
See Also
GetORebar_1
SetOSteel_1
Syntax
SapObject.SapModel.PropMaterial.SetOSteel_1
VB6 Procedure
Function SetOSteel_1(ByVal Name As String, ByVal Fy As Double, ByVal Fu As
Double, ByVal eFy As Double, ByVal eFu As Double, ByVal SSType As Long,
ByVal SSHysType As Long, ByVal StrainAtHardening As Double, ByVal
StrainAtMaxStress As Double, ByVal StrainAtRupture As Double, ByVal
FinalSlope As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing steel material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
eFy
The expected yield stress. [F/L2]
eFu
The expected tensile stress. [F/L2]
SSType
This is 0 or 1, indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtHardening
This item applies only to parametric stress-strain curves. It is the strain at the
onset of strain hardening.
StrainAtMaxStress
This item applies only to parametric stress-strain curves. It is the strain at
maximum stress. This item must be larger than the StrainAtHardening item.
StrainAtRupture
This item applies only to parametric stress-strain curves. It is the strain at
rupture. This item must be larger than the StrainAtMaxStress item.
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for steel materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropSteelData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign other properties


ret = SapModel.PropMaterial.SetOSteel_1("Steel", 55, 68, 60,
70, 1, 2, 0.02, 0.1, 0.2, -0.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes SetOSteel.
See Also
GetOSteel_1
SetSSCurve
Syntax
SapObject.SapModel.PropMaterial.SetSSCurve
VB6 Procedure
Function SetSSCurve(ByVal Name As String, ByVal NumberPoints As Long,
ByRef PointID() As Long, ByRef Strain() As Double, ByRef Stress() As Double,
Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
NumberPoints
The number of points in the stress-strain curve. This item must be at least 3.
PointID
This is one of the following integers which sets the point ID. The point ID controls
the color that will be displayed for hinges in a deformed shape plot.
-5 = -E
-4 = -D
-3 = -C
-2 = -B
0 = None
1=A
2=B
3=C
4=D
5=E

The point IDs must be input in numerically increasing order, except that 0 (None)
values are allowed anywhere. No duplicate values are allowed excepth for 0
(None).
Strain
This is an array that includes the strain at each point on the stress strain curve.
The strains must increase monotonically.
Stress
This is an array that includes the stress at each point on the stress strain curve.
[F/L2]
Points that have a negative strain must have a zero or negative stress. Similarly,
points that have a positive strain must have a zero or positive stress.
There must be one point defined that has zero strain and zero stress.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the material stress-strain curve for materials that are
specified to have user-defined stress-strain curves.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropUserSS()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PointID() As Long
Dim Strain() As Double
Dim Stress() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign other properties


ret = SapModel.PropMaterial.SetOSteel("Steel", 55, 68, 60,
70, 0, 1, 0, 0, 0)

'assign user SS curve


ReDim PointID(4)
ReDim Strain(4)
ReDim Stress(4)
Strain(0) = -0.003: Stress(0) = -50: PointID(0) = -3
Strain(1) = -0.001: Stress(1) = -25: PointID(1) = 0
Strain(2) = 0: Stress(2) = -0: PointID(2) = 1
Strain(3) = 0.003: Stress(3) = 40: PointID(3) = 0
Strain(4) = 0.008: Stress(4) = 80: PointID(4) = 5
ret = SapModel.PropMaterial.SetSSCurve("Steel", 5, PointID,
Strain, Stress)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetSSCurve
SetOTendon_1
Syntax
SapObject.SapModel.PropMaterial.SetOTendon_1
VB6 Procedure
Function SetOTendon_1(ByVal Name As String, ByVal Fy As Double, ByVal Fu
As Double, ByVal SSType As Long, ByVal SSHysType As Long, ByVal
FinalSlope As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric 250 ksi strand
2 = Parametric 270 ksi strand
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
FinalSlope
This item applies only to parametric stress-strain curves. It is a multiplier on the
material modulus of elasticity, E. This value multiplied times E gives the final
slope of the curve.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been defined previously for the material.
Remarks
This function sets the other material property data for tendon materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropTendonData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
MATERIAL_TENDON)

'assign other properties


ret = SapModel.PropMaterial.SetOTendon_1("Tendon", 230, 255,
1, 1, -0.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes SetOTendon.
See Also
GetOTendon_1
SetTemp
Syntax
SapObject.SapModel.PropMaterial.SetTemp
VB6 Procedure
Function SetTemp(ByVal Name As String, ByVal NumberItems as long, ByRef
Temp() As Double) As Long
Parameters
Name
The name of an existing material property.
NumberItems
The number of different temperatures at which properties are specified for the
material.
Temp
This is an array that includes the different temperatures at which properties are
specified for the material.
Remarks
This function assigns the temperatures at which properties are specified for a
material. This data is required only for materials whose properties are
temperature dependent.
The function returns zero if the temperatures are successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetMatPropTemps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyTemp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'specify temps at which properties will be provided


ReDim MyTemp(2)
MyTemp(0) = 0
MyTemp(1) = 50
MyTemp(2) = 100
ret = SapModel.PropMaterial.SetTemp("Steel", 3, MyTemp)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTemp
SetWeightAndMass
Syntax
SapObject.SapModel.PropMaterial.SetWeightAndMass
VB6 Procedure
Function SetWeightAndMass(ByVal Name As String, ByVal MyOption As Long,
ByVal Value As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing material property.
MyOption
This is either 1 or 2, indicating what is specified by the Value item.
1 = Weight per unit volume is specified
2 = Mass per unit volume is specified
If the weight is specified, the corresponding mass is program calculated based
on the specified weight. Similarly, if the mass is specified, the corresponding
weight is program calculated based on the specified mass.
Value
This is either the weight per unit volume or the mass per unit volume, depending
on the value of the MyOption item. [F/L3] for MyOption = 1 (weight), and [M/L3]
for MyOption = 2 (mass)
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been define previously for the material.
Remarks
This function assigns weight per unit volume or mass per unit volume to a
material property.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropWeight()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign material property weight per unit volume


ret = SapModel.PropMaterial.SetWeightAndMass("Steel", 1,
0.00029)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetWeightAndMass
GetConcreteCEBFIP90
Syntax
SapObject.SapModel.PropMaterial.GetConcreteCEBFIP90
VB6 Procedure
Function GetConcreteCEBFIP90(ByVal Name As String, ByRef
ConsiderConcreteAge As Boolean, ByRef ConsiderConcreteCreep As
Boolean, ByRef ConsiderConcreteShrinkage As Boolean, ByRef
CEBFIPsCoefficient As Double, ByRef RelativeHumidity As Double, ByRef
NotionalSize As Double, ByRef ShrinkageCoefficient As Double, ByRef
ShrinkageStartAge As Double, ByRef UseSeries As Long, ByRef
NumberSeriesTerms As Long, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
ConsiderConcreteAge
If this item is True, time dependence is considered for concrete compressive
strength and stiffness (modulus of elasticity).
ConsiderConcreteCreep
If this item is True, time dependence is considered for concrete creep.
ConsiderConcreteShrinkage
If this item is True, time dependence is considered for concrete shrinkage.
CEBFIPsCoefficient
This is the cement type coefficient. This item applies only when
ConsiderConcreteAge = True.
RelativeHumidity
This is relative humidity. This item applies only when ConsiderConcreteCreep =
True or ConsiderConcreteShrinkage = True.
NotionalSize
This is notional size of the member. This item applies only when
ConsiderConcreteCreep = True or ConsiderConcreteShrinkage = True.
As defined in Equation 2.1-69 of CEB_FIP Model Code 1990 the notional size is
equal to two times the cross-sectional area of the member divided by the
perimeter of the member in contact with the atmosphere.
ShrinkageCoefficient
This is the shrinkage coefficient as defined in Equation 2.1-76 of CEB_FIP
Model Code 1990. This item applies only when ConsiderConcreteShrinkage =
True.
ShrinkageStartAge
This is the shrinkage start age in days as used in Section 2.1.6.4.4 of CEB_FIP
Model Code 1990. This item applies only when ConsiderConcreteShrinkage =
True.
UseSeries
This is either 0 or 1, indicating the creep integration type.
0 = Full integration
1 = Dirichlet series
This item applies only when ConsiderConcreteCreep = True.
NumberSeriesTerms
This is the number of series terms used when integrating based on a Dirichlet
series. This item applies only when ConsiderConcreteCreep = True and
UseSeries = 1.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the time dependent CEB FIP-90 material property data
for concrete materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not concrete.
VBA Example
Sub GetMatPropConcreteTimeDepCEBFIP90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConsiderConcreteAge As Boolean
Dim ConsiderConcreteCreep As Boolean
Dim ConsiderConcreteShrinkage As Boolean
Dim CEBFIPsCoefficient As Double
Dim RelativeHumidity As Double
Dim NotionalSize As Double
Dim ShrinkageCoefficient As Double
Dim ShrinkageStartAge As Double
Dim UseSeries As Long
Dim NumberSeriesTerms As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
MATERIAL_CONCRETE)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetConcreteCEBFIP90("Concrete",
True, True, True, 0.2, 40, 4, 4.9, 2, 1, 12)

'get CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.GetConcreteCEBFIP90("Concrete",
ConsiderConcreteAge, ConsiderConcreteCreep,
ConsiderConcreteShrinkage, CEBFIPsCoefficient, RelativeHumidity,
NotionalSize, ShrinkageCoefficient, ShrinkageStartAge, UseSeries,
NumberSeriesTerms)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetConcreteCEBFIP90
GetTendonScaleFactors
Syntax
SapObject.SapModel.PropMaterial.TimeDep.GetTendonScaleFactors
VB6 Procedure
Function GetTendonScaleFactors(ByVal Name As String, ByRef
ScaleFactorRelaxation As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
ScaleFactorRelaxation
This value multiplies the relaxation coefficient, and hence the relaxation strain,
computed for the material during a time-dependent analysis. It has no effect for
load cases that do not consider time-dependent effects, or for materials that do
not consider relaxation effects. The default value is unity, and the specified value
must be positive.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the scale factors for the time-dependent material
property data for tendon materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not tendon.
VBA Example
Sub GetMatPropTendonTimeDepScaleFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ScaleFactorRelaxation As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
eMatType,Tendon)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetTendonCEBFIP90("Tendon", True, 2,
1, 12)

'assign time dependent scale factors


ret =
SapModel.PropMaterial.TimeDep.SetTendonScaleFactors("Tendon",
1.15)
'get time dependent scale factors
ret =
SapModel.PropMaterial.TimeDep.GetTendonScaleFactors("Tendon",
ScaleFactorRelaxation)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
SetTendonScaleFactors
GetTendonCEBFIP90
Syntax
SapObject.SapModel.PropMaterial.GetTendonCEBFIP90
VB6 Procedure
Function GetTendonCEBFIP90(ByVal Name As String, ByRef
ConsiderSteelRelaxation As Boolean, ByRef CEBFIPClass As Long, ByRef
UseSeries As Long, ByRef NumberSeriesTerms As Long, Optional ByVal Temp
As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
ConsiderSteelRelaxation
If this item is True, time dependence is considered for tendon steel relaxation.
CEBFIPClass
This is either 1 or 2, indicating the CEB FIP-90 class. This item applies only
when ConsiderSteelRelaxation = True.
UseSeries
This is either 0 or 1, indicating the steel relaxation integration type.
0 = Full integration
1 = Dirichlet series

This item applies only when ConsiderSteelRelaxation = True.


NumberSeriesTerms
This is the number of series terms used when integrating based on a Dirichlet
series. This item applies only when ConsiderSteelRelaxation = True and
UseSeries = 1.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the time dependent CEB FIP-90 material property data
for tendon materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not tendon.
VBA Example
Sub GetMatPropTendonTimeDepCEBFIP90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConsiderSteelRelaxation As Boolean
Dim CEBFIPClass As Long
Dim UseSeries As Long
Dim NumberSeriesTerms As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
MATERIAL_TENDON)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetTendonCEBFIP90("Tendon", True, 2,
1, 12)

'get CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.GetTendonCEBFIP90("Tendon",
ConsiderSteelRelaxation, CEBFIPClass, UseSeries,
NumberSeriesTerms)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTendonCEBFIP90
GetConcreteScaleFactors
Syntax
SapObject.SapModel.PropMaterial.TimeDep.GetConcreteScaleFactors
VB6 Procedure
Function GetConcreteScaleFactors(ByVal Name As String, ByVal
ScaleFactorAge As Double, ByVal ScaleFactorCreep As Double, ByVal
ScaleFactorShrinkage As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
ScaleFactorAge
This value multiplies the stiffness (modulus of elasticity) computed with age for
the material during a time-dependent analysis. It has no effect for load cases
that do not consider time-dependent effects, or for materials that do not
consider time-dependent age effects. The default value is unity, and the
specified value must be positive.
ScaleFactorCreep
This value multiplies the creep coefficient, and hence the creep strain, computed
for the material during a time-dependent analysis. It has no effect for load cases
that do not consider time-dependent effects, or for materials that do not
consider creep effects. The default value is unity, and the specified value must
be positive.
ScaleFactorShrinkage
This value multiplies the shrinkage strain computed for the material during a
time-dependent analysis. It has no effect for load cases that do not consider
time-dependent effects, or for materials that do not consider shrinkage effects.
The default value is unity, and the specified value must be positive.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function retrieves the scale factors for the time-dependent material
property data for concrete materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not concrete.
VBA Example
Sub GetMatPropConcreteTimeDepScaleFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ScaleFactorAge As Double
Dim ScaleFactorCreep As Double
Dim ScaleFactorShrinkage As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
eMatType,Concrete)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetConcreteCEBFIP90("Concrete",
True, True, True, 0.2, 40, 4, 4.9, 2, 1, 12)

'assign time dependent scale factors


ret =
SapModel.PropMaterial.TimeDep.SetConcreteScaleFactors("Concrete",
1.0, 1.2, 1.1)
'get time dependent scale factors
ret =
SapModel.PropMaterial.TimeDep.GetConcreteScaleFactors("Concrete",
ScaleFactorAge, ScaleFactorCreep, ScaleFactorShrinkage)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
SetConcreteCEBFIP90
SetConcreteCEBFIP90
Syntax
SapObject.SapModel.PropMaterial.TimeDep.SetConcreteCEBFIP90
VB6 Procedure
Function SetConcreteCEBFIP90(ByVal Name As String, ByVal
ConsiderConcreteAge As Boolean, ByVal ConsiderConcreteCreep As Boolean,
ByVal ConsiderConcreteShrinkage As Boolean, ByVal CEBFIPsCoefficient As
Double, ByVal RelativeHumidity As Double, ByVal NotionalSize As Double, ByVal
ShrinkageCoefficient As Double, ByVal ShrinkageStartAge As Double, ByVal
UseSeries As Long, ByVal NumberSeriesTerms As Long, Optional ByVal Temp
As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
ConsiderConcreteAge
If this item is True, time dependence is considered for concrete compressive
strength and stiffness (modulus of elasticity).
ConsiderConcreteCreep
If this item is True, time dependence is considered for concrete creep.
ConsiderConcreteShrinkage
If this item is True, time dependence is considered for concrete shrinkage.
CEBFIPsCoefficient
This is the cement type coefficient. This item applies only when
ConsiderConcreteAge = True.
RelativeHumidity
This is relative humidity. This item applies only when ConsiderConcreteCreep =
True or ConsiderConcreteShrinkage = True.
NotionalSize
This is notional size of the member. This item applies only when
ConsiderConcreteCreep = True or ConsiderConcreteShrinkage = True.
As defined in Equation 2.1-69 of CEB_FIP Model Code 1990 the notional size is
equal to two times the cross-sectional area of the member divided by the
perimeter of the member in contact with the atmosphere.
ShrinkageCoefficient
This is the shrinkage coefficient as defined in Equation 2.1-76 of CEB_FIP
Model Code 1990. This item applies only when ConsiderConcreteShrinkage =
True.
ShrinkageStartAge
This is the shrinkage start age in days as used in Section 2.1.6.4.4 of CEB_FIP
Model Code 1990. This item applies only when ConsiderConcreteShrinkage =
True.
UseSeries
This is either 0 or 1, indicating the creep integration type.
0 = Full integration
1 = Dirichlet series
This item applies only when ConsiderConcreteCreep = True.
NumberSeriesTerms
This is the number of series terms used when integrating based on a Dirichlet
series. This item applies only when ConsiderConcreteCreep = True and
UseSeries = 1.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been previously defined for the material.
Remarks
This function sets the time dependent CEB FIP-90 material property data for
concrete materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropConcreteTimeDepCEBFIP90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
MATERIAL_CONCRETE)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetConcreteCEBFIP90("Concrete",
True, True, True, 0.2, 40, 4, 4.9, 2, 1, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetConcreteCEBFIP90
SetConcreteScaleFactors
Syntax
SapObject.SapModel.PropMaterial.TimeDep.SetConcreteScaleFactors
VB6 Procedure
Function SetConcreteScaleFactors(ByVal Name As String, ByVal
ScaleFactorAge As Double, ByVal ScaleFactorCreep As Double, ByVal
ScaleFactorShrinkage As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing concrete material property.
ScaleFactorAge
This value multiplies the stiffness (modulus of elasticity) computed with age for
the material during a time-dependent analysis. It has no effect for load cases
that do not consider time-dependent effects, or for materials that do not
consider time-dependent age effects. The default value is unity, and the
specified value must be positive.
ScaleFactorCreep
This value multiplies the creep coefficient, and hence the creep strain, computed
for the material during a time-dependent analysis. It has no effect for load cases
that do not consider time-dependent effects, or for materials that do not
consider creep effects. The default value is unity, and the specified value must
be positive.
ScaleFactorShrinkage
This value multiplies the shrinkage strain computed for the material during a
time-dependent analysis. It has no effect for load cases that do not consider
time-dependent effects, or for materials that do not consider shrinkage effects.
The default value is unity, and the specified value must be positive.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function sets scale factors for the time-dependent material property data
for concrete materials. If this function is not called, default values of unity are
assumed for all scale factors.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropConcreteTimeDepScaleFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Concrete",
eMatType,Concrete)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetConcreteCEBFIP90("Concrete",
True, True, True, 0.2, 40, 4, 4.9, 2, 1, 12)

'assign time dependent scale factors


ret =
SapModel.PropMaterial.TimeDep.SetConcreteScaleFactors("Concrete",
1.0, 1.2, 1.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
GetConcreteScaleFactors
SetTendonCEBFIP90
Syntax
SapObject.SapModel.PropMaterial.TimeDep.SetTendonCEBFIP90
VB6 Procedure
Function SetTendonCEBFIP90(ByVal Name As String, ByVal
ConsiderSteelRelaxation As Boolean, ByVal CEBFIPClass As Long, ByVal
UseSeries As Long, ByVal NumberSeriesTerms As Long, Optional ByVal Temp
As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
ConsiderSteelRelaxation
If this item is True, time dependence is considered for tendon steel relaxation.
CEBFIPClass
This is either 1 or 2, indicating the CEB FIP-90 class. This item applies only
when ConsiderSteelRelaxation = True.
UseSeries
This is either 0 or 1, indicating the steel relaxation integration type.
0 = Full integration
1 = Dirichlet series

This item applies only when ConsiderSteelRelaxation = True.


NumberSeriesTerms
This is the number of series terms used when integrating based on a Dirichlet
series. This item applies only when ConsiderSteelRelaxation = True and
UseSeries = 1.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data applies. The
temperature must have been previously defined for the material.
Remarks
This function sets the time dependent CEB FIP-90 material property data for
tendon materials.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropTendonTimeDepCEBFIP90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
MATERIAL_TENDON)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetTendonCEBFIP90("Tendon", True, 2,
1, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTendonCEBFIP90
SetTendonScaleFactors
Syntax
SapObject.SapModel.PropMaterial.TimeDep.SetTendonScaleFactors
VB6 Procedure
Function SetTendonScaleFactors(ByVal Name As String, ByRef
ScaleFactorRelaxtion As Double, Optional ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
ScaleFactorRelaxation
This value multiplies the relaxation coefficient, and hence the relaxation strain,
computed for the material during a time-dependent analysis. It has no effect for
load cases that do not consider time-dependent effects, or for materials that do
not consider relaxation effects. The default value is unity, and the specified value
must be positive.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been previously defined for the material.
Remarks
This function sets scale factors for the time-dependent material property data
for tendon materials. If this function is not called, default values of unity are
assumed for all scale factors.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub AssignMatPropTendonTimeDepCEBIFP90
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
eMatType,Tendon)

'assign CEB FIP-90 time dependent data


ret =
SapModel.PropMaterial.TimeDep.SetTendonCEBFIP90("Tendon", True, 2,
1, 12)

'assign time dependent scale factors


ret =
SapModel.PropMaterial.TimeDep.SetTendonScaleFactors("Tendon",
1.15)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
See Also
GetTendonScaleFactors
ChangeName
Syntax
SapObject.SapModel.PropLink.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined link property.
NewName
The new name for the link property.
Remarks
This function changes the name of an existing link property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeLinkPropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'change name of link property


ret = SapModel.PropLink.ChangeName("L1", "MyLink")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropLink.Count
VB6 Procedure
Function Count(Optional ByVal PropType As eLinkPropType) As Long
Parameters
PropType
This optional value is one of the following items in the eLinkPropType
enumeration.
NLPROP_LINEAR = 1
NLPROP_DAMPER = 2
NLPROP_GAP = 3
NLPROP_HOOK = 4
NLPROP_PLASTIC_WEN = 5
NLPROP_ISOLATOR1 = 6 (Rubber isolator)
NLPROP_ISOLATOR2 = 7 (Friction isolator)
NLPROP_MULTILINEAR_ELASTIC = 8
NLPROP_MULTILINEAR_PLASTIC = 9
NLPROP_ISOLATOR3 = 10 (T/C Friction isolator)

If no value is input for PropType, a count is returned for all link properties in the
model regardless of type.
Remarks
This function returns the total number of defined link properties in the model. If
desired, counts can be returned for all link properties of a specified type in the
model.
VBA Example
Sub CountLinkProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'return number of defined links of all types


Count = SapModel.PropLink.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropLink.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing link property.
Remarks
The function deletes a specified link property.
The function returns zero if the link property is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified link property can not
be deleted, for example, if it is being used by an existing link object.
VBA Example
Sub DeleteLinkProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add link properties


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)
ret = SapModel.PropLink.SetLinear("L2", DOF, Fixed, Ke, Ce,
0, 0)

'delete link property


ret = SapModel.PropLink.Delete("L1")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetDamper
Syntax
SapObject.SapModel.PropLink.GetDamper
VB6 Procedure
Function GetDamper(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef c() As Double, ByRef
cexp() As Double, ByRef dj2 As Double, ByRef dj3 As Double, ByRef Notes As
String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing exponential damper-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear damping coefficient terms for the link property. The
nonlinear damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/(L^cexp)]
c(1) = U2 [F/(L^cexp)]
c(2) = U3 [F/(L^cexp)]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]

The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cexp
This is an array of the nonlinear damping exponent terms. The nonlinear
damping exponent applies for nonlinear analyses. It is applied to the velocity
across the damper in the equation of motion.
cexp(0) = U1
cexp(1) = U2
cexp(2) = U3
cexp(3) = R1
cexp(4) = R2
cexp(5) = R3

The term cexp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for an exponential damper-type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropDamper()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCexp() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim c() As Double
Dim cexp() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject =
CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144,
2, 288)
'add link property
ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCexp(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCexp(1) = 1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamper("D1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp, 1, 0)

'get link property data


ret = SapModel.PropLink.GetDamper ("D1", DOF, Fixed,
NonLinear, Ke, Ce, k, c, cexp, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Clarification that damper type is exponential added in version 16.0.2.
See Also
SetDamper
GetDamperBilinear
Syntax
SapObject.SapModel.PropLink.GetDamperBilinear
VB6 Procedure
Function GetDamperBilinear (ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef c() As Double,
ByRef cy() As Double, ByRef ForceLimit() As Double, ByVal dj2 As Double,
ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional ByVal GUID
As String = "") As Long
Parameters
Name
The name of an existing bilinear damper-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear initial damping coefficient terms for the link property.
The nonlinear initial damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/L]
c(1) = U2 [F/L]
c(2) = U3 [F/L]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]
The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cy
This is an array of nonlinear yielded damping coefficient terms for the link
property. The nonlinear yielded damping coefficient applies for nonlinear
analyses.
cy(0) = U1 [F/L]
cy(1) = U2 [F/L]
cy(2) = U3 [F/L]
cy(3) = R1 [FL]
cy(4) = R2 [FL]
cy(5) = R3 [FL]
The term cy(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
ForceLimit
This is an array of nonlinear linear force limit terms for the link property. The
linear force limit applies for nonlinear analyses.
ForceLimit(0) = U1 [F]
ForceLimit(1) = U2 [F]
ForceLimit(2) = U3 [F]
ForceLimit(3) = R1 [FL]
ForceLimit(4) = R2 [FL]
ForceLimit(5) = R3 [FL]
The term ForceLimit(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function retrieves link property data for a bilinear damper-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropDamperBilinear ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCy() As Double
Dim MyForceLimit() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim NonLinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim K() As Double
Dim C() As Double
Dim Cy() As Double
Dim ForceLimit() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCy(5)
ReDim MyForceLimit(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCy(1) = 0.008
MyForceLimit(1) = 50

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperBilinear("D1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCy,
MyForceLimit, 1, 0)

'get link property data


ret = SapModel.PropLink.GetDamperBilinear ("D1", DOF,
Fixed, NonLinear, Ke, Ce, k, c, cy, ForceLimit, dj2, dj3,
Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
SetDamperBilinear
GetDamperFrictionSpring
Syntax
SapObject.SapModel.PropLink.GetDamperFrictionSpring
VB6 Procedure
Function GetDamperFrictionSpring(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef k1() As
Double, ByRef k2() As Double, ByRef u0() As Double, ByRef us() As Double,
ByRef dir() As Long, ByRef dj2 As Double, ByRef dj3 As Double, ByRef Notes
As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing friction spring damper-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial (nonslipping) stiffness terms for the link property. The
initial stiffness applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
k1
This is an array of slipping stiffness when loading terms for the link property. The
slipping stiffness when loading applies for nonlinear analyses.
k1(0) = U1 [F/L]
k1(1) = U2 [F/L]
k1(2) = U3 [F/L]
k1(3) = R1 [FL]
k1(4) = R2 [FL]
k1(5) = R3 [FL]
The term k1(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
k2
This is an array of slipping stiffness when unloading terms for the link property.
The slipping stiffness when unloading applies for nonlinear analyses.
k2(0) = U1 [F/L]
k2(1) = U2 [F/L]
k2(2) = U3 [F/L]
k2(3) = R1 [FL]
k2(4) = R2 [FL]
k2(5) = R3 [FL]
The term k2(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
u0
This is an array of precompression displacement terms for the link property. The
nonlinear precompression displacement applies for nonlinear analyses.
u0(0) = U1 [L]
u0(1) = U2 [L]
u0(2) = U3 [L]
u0(3) = R1
u0(4) = R2
u0(5) = R3
The term u0(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
us
This is an array of stop displacement terms for the link property. The nonlinear
stop displacement applies for nonlinear analyses.
us(0) = U1 [L]
us(1) = U2 [L]
us(2) = U3 [L]
us(3) = R1
us(4) = R2
us(5) = R3
The term us(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function retrieves link property data for a friction spring damper-type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropDamperFrictionSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyK1() As Double
Dim MyK2() As Double
Dim MyU0() As Double
Dim MyUs() As Double
Dim MyDir() As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim NonLinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim K() As Double
Dim K1() As Double
Dim K2() As Double
Dim U0() As Double
Dim Us() As Double
Dim Dir() As Long
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyK1(5)
ReDim MyK2(5)
ReDim MyU0(5)
ReDim MyUs(5)
ReDim MyDir(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyK1(1)=2
MyK2(1) = 1
MyU0(1) = -.2
MyUs(1) = 1
MyDir(1) = 2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperFrictionSpring("D1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyK1, MyK2,
MyU0, MyUs, MyDir, 1, 0)

'get link property data


ret = SapModel.PropLink.GetDamperFrictionSpring ("D1",
DOF, Fixed, NonLinear, Ke, Ce, k, K1, K2, U0, Us, Dir,
dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
SetDamperFrictionSpring
GetDamperLinearExponential
Syntax
SapObject.SapModel.PropLink.GetDamperLinearExponential
VB6 Procedure
Function GetDamperLinearExponential(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef c() As
Double, ByRef cexp() As Double, ByRef ForceLimit() As Double, ByRef dj2 As
Double, ByRef dj3 As Double, ByRef Notes As String, ByRef GUID As String)
As Long
Parameters
Name
The name of an existing linear exponential damper-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear damping coefficient terms for the link property. The
nonlinear damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/(L^cexp)]
c(1) = U2 [F/(L^cexp)]
c(2) = U3 [F/(L^cexp)]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]
The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cexp
This is an array of the nonlinear damping exponent terms. The nonlinear
damping exponent applies for nonlinear analyses. It is applied to the velocity
across the damper in the equation of motion.
cexp(0) = U1
cexp(1) = U2
cexp(2) = U3
cexp(3) = R1
cexp(4) = R2
cexp(5) = R3
The term cexp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
ForceLimit
This is an array of nonlinear linear force limit terms for the link property. The
linear force limit applies for nonlinear analyses.
ForceLimit(0) = U1 [F]
ForceLimit(1) = U2 [F]
ForceLimit(2) = U3 [F]
ForceLimit(3) = R1 [FL]
ForceLimit(4) = R2 [FL]
ForceLimit(5) = R3 [FL]
The term ForceLimit(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function retrieves link property data for a linear exponential damper-type
link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropDamperLinearExponential()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCexp() As Double
Dim MyForceLimit() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim NonLinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim K() As Double
Dim C() As Double
Dim Cexp() As Double
Dim ForceLimit() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)
'add link property
ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCexp(5)
ReDim MyForceLimit(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCexp(1) = 1.2
MyForceLimit(1) = 50

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperLinearExponential("D1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp,
MyForceLimit, 1, 0)

'get link property data


ret = SapModel.PropLink.GetDamperLinearExponential ("D1",
DOF, Fixed, NonLinear, Ke, Ce, k, c, cexp, ForceLimit,
dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
SetDamperLinearExponential
GetFrictionIsolator
Syntax
SapObject.SapModel.PropLink.GetFrictionIsolator
VB6 Procedure
Function GetFrictionIsolator(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Slow() As Double,
ByRef Fast() As Double, ByRef Rate() As Double, ByRef Radius() As Double,
ByRef Damping As Double, ByRef dj2 As Double, ByRef dj3 As Double, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing friction isolator-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array of the friction coefficient at zero velocity terms for the link
property. This coefficient applies for nonlinear analyses.
Slow(0) = U1, Not Used
Slow(1) = U2
Slow(2) = U3
Slow(3) = R1, Not Used
Slow(4) = R2, Not Used
Slow(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Slow(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array of the friction coefficient at fast velocity terms for the link
property. This coefficient applies for nonlinear analyses.
Fast(0) = U1, Not Used
Fast(1) = U2
Fast(2) = U3
Fast(3) = R1, Not Used
Fast(4) = R2, Not Used
Fast(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Fast(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array of the inverse of the characteristic sliding velocity terms for the
link property. This item applies for nonlinear analyses.
Rate(0) = U1, Not Used
Rate(1) = U2 [s/L]
Rate(2) = U3 [s/L]
Rate(3) = R1, Not Used
Rate(4) = R2, Not Used
Rate(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array of the radius of the sliding contact surface terms for the link
property. Inputting 0 means there is an infinite radius, that is, the slider is flat.
This item applies for nonlinear analyses.
Radius(0) = U1, Not Used
Radius(1) = U2 [L]
Radius(2) = U3 [L]
Radius(3) = R1, Not Used
Radius(4) = R2, Not Used
Radius(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Damping
This is the nonlinear damping coefficient used for the axial translational degree
of freedom, U1. This item applies for nonlinear analyses. [F/L]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a friction isolator-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropFrictionIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim Slow() As Double
Dim Fast() As Double
Dim Rate() As Double
Dim Radius() As Double
Dim Damping As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MySlow(5)
ReDim MyFast(5)
ReDim MyRate(5)
ReDim MyRadius(5)

MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01
MyK(0) = 1000

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MySlow(1)= 0.6
MyFast(1)= 0.5
MyRate(1)= 10
MyRadius(1)= 80

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 14
MyCe(2) = 0.008
MyK(2) = 22
MySlow(2)= 0.66
MyFast(2)= 0.55
MyRate(2)= 12
MyRadius(2)= 75

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0

MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetFrictionIsolator("FI1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MySlow, MyFast, MyRate,
MyRadius, 0.1, 2, 3)

'get link property data


ret = SapModel.PropLink.GetFrictionIsolator("FI1", DOF,
Fixed, NonLinear, Ke, Ce, k, Slow, Fast, Rate, Radius, Damping,
dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetFrictionIsolator
GetGap
Syntax
SapObject.SapModel.PropLink.GetGap
VB6 Procedure
Function GetGap(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef dis() As Double, ByRef dj2
As Double, ByRef dj3 As Double, ByRef Notes As String, ByRef GUID As
String) As Long
Parameters
Name
The name of an existing gap-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dis
This is an array of initial gap opening terms for the link property. The initial gap
opening applies for nonlinear analyses.
dis(0) = U1 [L]
dis(1) = U2 [L]
dis(2) = U3 [L]
dis(3) = R1 [rad]
dis(4) = R2 [rad]
dis(5) = R3 [rad]

The term dis(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a gap-type link property.
The function returns zero if the property data is retrieved successfully; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropGap()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyDis() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim dis() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyDis(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyDis(1)=1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetGap("G1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyDis, 2, 0)

'get link property data


ret = SapModel.PropLink.GetGap("G1", DOF, Fixed, NonLinear,
Ke, Ce, k, dis, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetGap
GetHook
Syntax
SapObject.SapModel.PropLink.GetHook
VB6 Procedure
Function GetHook(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef dis() As Double, ByRef dj2
As Double, ByRef dj3 As Double, ByRef Notes As String, ByRef GUID As
String) As Long
Parameters
Name
The name of an existing hook-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dis
This is an array of initial hook opening terms for the link property. The initial hook
opening applies for nonlinear analyses.
c(0) = U1 [L]
c(1) = U2 [L]
c(2) = U3 [L]
c(3) = R1 [rad]
c(4) = R2 [rad]
c(5) = R3 [rad]

The term dis(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a hook-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropHook()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyDis() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim dis() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyDis(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyDis(1)=1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetHook("H1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyDis, 2, 0)

'get link property data


ret = SapModel.PropLink.GetHook("H1", DOF, Fixed, NonLinear,
Ke, Ce, k, dis, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetHook
GetLinear
Syntax
SapObject.SapModel.PropLink.GetLinear
VB6 Procedure
Function GetLinear(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef Ke() As Double, ByRef Ce() As Double, ByRef dj2
As Double, ByRef dj3 As Double, ByRef KeCoupled As Boolean, ByRef
CeCoupled As Boolean, ByRef Notes As String, ByRef GUID As String) As
Long
Parameters
Name
The name of an existing linear-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity if DOF(0) = True
Fixed(1) = U2 fixity if DOF(1) = True
Fixed(2) = U3 fixity if DOF(2) = True
Fixed(3) = R1 fixity if DOF(3) = True
Fixed(4) = R2 fixity if DOF(4) = True
Fixed(5) = R3 fixity if DOF(5) = True
Ke
This is an array of stiffness terms for the link property. There are 6 terms in the
array if the stiffness is uncoupled and 21 if it is coupled. The KeCoupled item
indicates if the stiffness is coupled.
If the stiffness is uncoupled:
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

If the stiffness is coupled:


Ke(0) = U1U1 [F/L]
Ke(1) = U1U2 [F/L]
Ke(2) = U2U2 [F/L]
Ke(3) = U1U3 [F/L]
Ke(4) = U2U3 [F/L]
Ke(5) = U3U3 [F/L]
Ke(6) = U1R1 [F]
Ke(7) = U2R1 [F]
Ke(8) = U3R1 [F]
Ke(9) = R1R1 [FL]
Ke(10) = U1R2 [F]
Ke(11) = U2R2 [F]
Ke(12) = U3R2 [F]
Ke(13) = R1R2 [FL]
Ke(14) = R2R2 [FL]
Ke(15) = U1R3 [F]
Ke(16) = U2R3 [F]
Ke(17) = U3R3 [F]
Ke(18) = R1R3 [FL]
Ke(19) = R2R3 [FL]
Ke(20) = R3R3 [FL]
Ce
This is an array of damping terms for the link property. There are 6 terms in the
array if the damping is uncoupled and 21 if it is coupled. The CeCoupled item
indicates if the damping is coupled.
If the damping is uncoupled:
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

If the damping is coupled:


Ce(0) = U1U1 [F/L]
Ce(1) = U1U2 [F/L]
Ce(2) = U2U2 [F/L]
Ce(3) = U1U3 [F/L]
Ce(4) = U2U3 [F/L]
Ce(5) = U3U3 [F/L]
Ce(6) = U1R1 [F]
Ce(7) = U2R1 [F]
Ce(8) = U3R1 [F]
Ce(9) = R1R1 [FL]
Ce(10) = U1R2 [F]
Ce(11) = U2R2 [F]
Ce(12) = U3R2 [F]
Ce(13) = R1R2 [FL]
Ce(14) = R2R2 [FL]
Ce(15) = U1R3 [F]
Ce(16) = U2R3 [F]
Ce(17) = U3R3 [F]
Ce(18) = R1R3 [FL]
Ce(19) = R2R3 [FL]
Ce(20) = R3R3 [FL]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
KeCoupled
This item is True if the link stiffness, Ke, is coupled. There are 21 terms in the
Ke array if Ke is coupled; otherwise there are 6 terms.
CeCoupled
This item is True if the link damping, Ce, is coupled. There are 21 terms in the
Ce array if Ce is coupled; otherwise there are 6 terms.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a linear-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropLinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim KeCoupled As Boolean
Dim CeCoupled As Boolean
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyKe(5)
ReDim MyCe(5)
MyDOF(0) = True
MyKe(0) = 12
ret = SapModel.PropLink.SetLinear("L1", MyDOF, MyFixed,
MyKe, MyCe, 0, 0)

'get link property data


ret = SapModel.PropLink.GetLinear("L1", DOF, Fixed, Ke, Ce,
dj2, dj3, KeCoupled, CeCoupled, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetLinear
GetMultiLinearElastic
Syntax
SapObject.SapModel.PropLink.GetMultiLinearElastic
VB6 Procedure
Function GetMultiLinearElastic(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef dj2 As Double, ByRef dj3 As
Double, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing multilinear elastic-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies pnly when DOF(n) = True and Fixed(n) = False.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a multilinear elastic-type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropMultiLinearElastic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearElastic("MLE1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'get link property data


ret = SapModel.PropLink.GetMultiLinearElastic("MLE1", DOF,
Fixed, NonLinear, Ke, Ce, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMultiLinearElastic
GetMultiLinearPoints
SetMultiLinearPoints
GetMultiLinearPlastic
Syntax
SapObject.SapModel.PropLink.GetMultiLinearPlastic
VB6 Procedure
Function GetMultiLinearPlastic(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef dj2 As Double, ByRef dj3 As
Double, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing multilinear plastic-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a multilinear plastic-type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropMultiLinearPlastic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearPlastic("MLP1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'get link property data


ret = SapModel.PropLink.GetMultiLinearPlastic("MLP1", DOF,
Fixed, NonLinear, Ke, Ce, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMultiLinearPlastic
GetMultiLinearPoints
SetMultiLinearPoints
GetMultiLinearPoints
Syntax
SapObject.SapModel.PropLink.GetMultiLinearPoints
VB6 Procedure
Function GetMultiLinearPoints(ByVal Name As String, ByVal DOF As Long,
ByRef NumberPoints As Long, ByRef F() As Double, ByRef D() As Double,
ByRef MyType As Long, ByRef a1 As Double, ByRef a2 As Double, ByRef b1
As Double, ByRef b2 As Double, ByRef eta As Double) As Long
Parameters
Name
The name of an existing multilinear elastic or multilinear plastic link property.
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom to which the multilinear
points apply.
1= U1
2= U2
3= U3
4= R1
5= R2
6= R3
NumberPoints
The number of foce-defomation points for the specified degree of freedom.
F
This is an array, dimensioned to NumberPoints - 1, that includes the force at
each point. When DOF is U1, U2 or U3, this is a force. When DOF is R1, R2 or
R3, this is a moment. [F] if DOF <= 3, and [FL} if DOF > 3
D
This is an array, dimensioned to NumberPoints - 1, that includes the
displacement at each point. When DOF is U1, U2 or U3, this is a translation.
When DOF is R1, R2 or R3, this is a rotation. [L] if DOF <= 3, and [rad] if DOF >
3
MyType
This item applies only to multilinear plastic link properties. It is 1, 2 or 3,
indicating the hysteresis type.
1 = Kinematic
2 = Takeda
3 = Pivot
a1
This item only applies to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Alpha1 hysteresis parameter.
a2
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Alpha2 hysteresis parameter.
b1
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Beta1 hysteresis parameter.
b2
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Beta2 hysteresis parameter.
eta
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Eta hysteresis parameter.
Remarks
This function retrieves the force-deformation data for a specified degree of
freedom in multilinear elastic and multilinear plastic link properties.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
To successfully retrieve this data from the indicated link property, the following
conditions must be met:
1. The link property must be multilinear elastic or multilinear plastic.
2. The specified DOF must be active.
3. The specified DOF must not be fixed.
4. The specified DOF must be nonlinear.
VBA Example
Sub GetLinkPropMultiLinearPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyF() As Double
Dim MyD() As Double
Dim NumberPoints As Long
Dim F() As Double
Dim D() As Double
Dim MyType As Long
Dim a1 As Double
Dim a2 As Double
Dim b1 As Double
Dim b2 As Double
Dim eta As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearPlastic("MLP1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'set multilinear force-defomation data


ReDim MyF(4)
ReDim MyD(4)

MyF(0) = -12
MyF(1) = -10
MyF(2) = 0
MyF(3) = 8
MyF(4) = 9

MyD(0) = -8
MyD(1) = -0.6
MyD(2) = 0
MyD(3) = 0.2
MyD(4) = 6

ret = SapModel.PropLink.SetMultiLinearPoints("MLP1", 2, 5,
MyF, MyD, 3, 9, 12, 0.75, 0.8, .1)

'get multilinear force-defomation data


ret = SapModel.PropLink.GetMultiLinearPoints("MLP1", 2,
NumberPoints, F, D, MyType, a1, a2, b1, b2, eta)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetMultiLinearPoints
SetMultiLinearElastic
GetMultiLinearElastic
SetMultiLinearPlastic
GetMultiLinearPlastic
GetNameList
Syntax
SapObject.SapModel.PropLink.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String, Optional ByVal PropType As eLinkPropType) As Long
Parameters
NumberNames
The number of link property names retrieved by the program.
MyName
This is a one-dimensional array of link property names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
PropType
This optional value is one of the following items in the eLinkPropType
enumeration.
NLPROP_LINEAR = 1
NLPROP_DAMPER = 2
NLPROP_GAP = 3
NLPROP_HOOK = 4
NLPROP_PLASTIC_WEN = 5
NLPROP_ISOLATOR1 = 6 (Rubber isolator)
NLPROP_ISOLATOR2 = 7 (Friction isolator)
NLPROP_MULTILINEAR_ELASTIC = 8
NLPROP_MULTILINEAR_PLASTIC = 9
NLPROP_ISOLATOR3 = 10 (T/C Friction isolator)

If no value is input for PropType, names are returned for all link properties in the
model regardless of type.
Remarks
This function retrieves the names of all defined link properties of the specified
type.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetLinkPropNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link properties


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)
ret = SapModel.PropLink.SetLinear("L2", DOF, Fixed, Ke, Ce,
0, 0)

'get link property names


ret = SapModel.PropLink.GetNameList(NumberNames, MyName)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPDelta
Syntax
SapObject.SapModel.PropLink.GetPDelta
VB6 Procedure
Function GetPDelta(ByVal Name As String, ByRef DefinedForThisLength As
Double, ByRef DefinedForThisArea As Double) As Long
Parameters
Name
The name of an existing link property.
Value
This is an array of P-delta parameters.
Value(0) = M2 P-delta to I-end of link as moment, M2I
Value(1) = M2 P-delta to J-end of link as moment, M2J
Value(2) = M3 P-delta to I-end of link as moment, M3I
Value(3) = M3 P-delta to J-end of link as moment, M3J
Remarks
This function retrieves P-delta parameters for a link property.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkPropPDelta()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim MyValue() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property P-delta parameters


ReDim MyValue(3)
MyValue(0) = 0.6
MyValue(1) = 0.4
MyValue(2) = 0.3
MyValue(3) = 0.2
ret = SapModel.PropLink.SetPDelta("L1", MyValue)

'get link property P-delta parameters


ret = SapModel.PropLink.GetPDelta("L1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetPDelta
GetPlasticWen
Syntax
SapObject.SapModel.PropLink.GetPlasticWen
VB6 Procedure
Function GetPlasticWen(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Yield() As Double,
ByRef Ratio() As Double, ByRef exp() As Double, ByRef dj2 As Double, ByRef
dj3 As Double, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing plastic Wen-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Yield
This is an array of yield force terms for the link property. The yield force applies
for nonlinear analyses.
Yield(0) = U1 [F]
Yield(1) = U2 [F]
Yield(2) = U3 [F]
Yield(3) = R1 [FL]
Yield(4) = R2 [FL]
Yield(5) = R3 [FL]

The term Yield(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Ratio
This is an array of post-yield stiffness ratio terms for the link property. The post-
yield stiffness ratio applies for nonlinear analyses. It is the post-yield stiffness
divided by the initial stiffness.
Ratio(0) = U1
Ratio(1) = U2
Ratio(2) = U3
Ratio(3) = R1
Ratio(4) = R2
Ratio(5) = R3

The term Ratio(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
exp
This is an array of yield exponent terms for the link property. The yield exponent
applies for nonlinear analyses. The yielding exponent that controls the
sharpness of the transition from the initial stiffness to the yielded stiffness.
exp(0) = U1
exp(1) = U2
exp(2) = U3
exp(3) = R1
exp(4) = R2
exp(5) = R3

The term exp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a plastic Wen-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropPlasticWen()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyYield() As Double
Dim MyRatio() As Double
Dim MyExp() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim Yield() As Double
Dim Ratio() As Double
Dim exp() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)
'add link property
ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyYield(5)
ReDim MyRatio(5)
ReDim MyExp(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyYield(1)= 50
MyRatio(1)= 0.1
MyExp(1)= 3

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetPlasticWen("PW1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyYield, MyRatio, MyExp, 2, 0)

'get link property data


ret = SapModel.PropLink.GetPlasticWen("PW1", DOF, Fixed,
NonLinear, Ke, Ce, k, Yield, Ratio, exp, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetPlasticWen
GetRubberIsolator
Syntax
SapObject.SapModel.PropLink.GetRubberIsolator
VB6 Procedure
Function GetRubberIsolator(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Yield() As Double,
ByRef Ratio() As Double, ByRef dj2 As Double, ByRef dj3 As Double, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing rubber isolator-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1, Not Used
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1, Not Used
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Yield
This is an array of yield force terms for the link property. The yield force applies
for nonlinear analyses.
Yield(0) = U1, Not Used
Yield(1) = U2 [F]
Yield(2) = U3 [F]
Yield(3) = R1, Not Used
Yield(4) = R2, Not Used
Yield(5) = R3, Not Used

The term Yield(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Ratio
This is an array of post-yield stiffness ratio terms for the link property. The post-
yield stiffness ratio applies for nonlinear analyses. It is the post-yield stiffness
divided by the initial stiffness.
Ratio(0) = U1, Not Used
Ratio(1) = U2
Ratio(2) = U3
Ratio(3) = R1, Not Used
Ratio(4) = R2, Not Used
Ratio(5) = R3, Not Used

The term Ratio(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
pnly when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a rubber isolator-type link property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropRubberIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyYield() As Double
Dim MyRatio() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim Yield() As Double
Dim Ratio() As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyYield(5)
ReDim MyRatio(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyYield(1)= 50
MyRatio(1)= 0.1

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 15
MyCe(2) = 0.008
MyK(2) = 22
MyYield(2)= 60
MyRatio(2)= 0.15

MyDOF(3) = True
MyFixed(3) = True

ret = SapModel.PropLink.SetRubberIsolator("RI1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyYield, MyRatio, 2, 3)

'get link property data


ret = SapModel.PropLink.GetRubberIsolator("RI1", DOF, Fixed,
NonLinear, Ke, Ce, k, Yield, Ratio, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetRubberIsolator
GetSpringData
Syntax
SapObject.SapModel.PropLink.GetSpringData
VB6 Procedure
Function GetSpringData(ByVal Name As String, ByRef DefinedForThisLength
As Double, ByRef DefinedForThisArea As Double) As Long
Parameters
Name
The name of an existing link property.
DefinedForThisLength
The link property is defined for this length in a line (frame) spring. [L]
DefinedForThisArea
The link property is defined for this area in an area spring. [L2]
Remarks
This function retrieves length and area values for a link property that are used if
the link property is specified in line and area spring assignments.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkPropSpringData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim DefinedForThisLength As Double
Dim DefinedForThisArea As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property spring data


ret = SapModel.PropLink.SetSpringData("L1", 12, 2)

'get link property spring data


ret = SapModel.PropLink.GetSpringData("L1",
DefinedForThisLength, DefinedForThisArea)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetSpringData
GetTCFrictionIsolator
Syntax
SapObject.SapModel.PropLink.GetTCFrictionIsolator
VB6 Procedure
Function GetTCFrictionIsolator(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Slow() As
Double, ByRef Fast() As Double, ByRef Rate() As Double, ByRef Radius() As
Double, ByRef SlowT() As Double, ByRef FastT() As Double, ByRef RateT() As
Double, ByRef kt As Double, ByRef dis As Double, ByRef dist As Double, ByRef
Damping As Double, ByRef dj2 As Double, ByRef dj3 As Double, ByRef Notes
As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing T/C friction isolator-type link property.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies pnly when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array of the friction coefficient at zero velocity terms when U1 is in
compression for the link property. This coefficient applies for nonlinear analyses.
Slow(0) = U1, Not Used
Slow(1) = U2
Slow(2) = U3
Slow(3) = R1, Not Used
Slow(4) = R2, Not Used
Slow(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Slow(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array of the friction coefficient at fast velocity terms when U1 is in
compression for the link property. This coefficient applies for nonlinear analyses.
Fast(0) = U1, Not Used
Fast(1) = U2
Fast(2) = U3
Fast(3) = R1, Not Used
Fast(4) = R2, Not Used
Fast(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Fast(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array of the inverse of the characteristic sliding velocity terms when
U1 is in compression for the link property. This item applies for nonlinear
analyses.
Rate(0) = U1, Not Used
Rate(1) = U2 [s/L]
Rate(2) = U3 [s/L]
Rate(3) = R1, Not Used
Rate(4) = R2, Not Used
Rate(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array of the radius of the sliding contact surface terms for the link
property. Inputting 0 means there is an infinite radius, that is, the slider is flat.
This item applies for nonlinear analyses.
Radius(0) = U1, Not Used
Radius(1) = U2 [L]
Radius(2) = U3 [L]
Radius(3) = R1, Not Used
Radius(4) = R2, Not Used
Radius(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
SlowT
This is an array of the friction coefficient at zero velocity terms when U1 is in
tension for the link property. This coefficient applies for nonlinear analyses.
SlowT(0) = U1, Not Used
SlowT(1) = U2
SlowT(2) = U3
SlowT(3) = R1, Not Used
SlowT(4) = R2, Not Used
SlowT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term SlowT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
FastT
This is an array of the friction coefficient at fast velocity terms when U1 is in
tension for the link property. This coefficient applies for nonlinear analyses.
FastT(0) = U1, Not Used
FastT(1) = U2
FastT(2) = U3
FastT(3) = R1, Not Used
FastT(4) = R2, Not Used
FastT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term FastT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
RateT
This is an array of the inverse of the characteristic sliding velocity terms when
U1 is in tension for the link property. This item applies for nonlinear analyses.
RateT(0) = U1, Not Used
RateT(1) = U2 [s/L]
RateT(2) = U3 [s/L]
RateT(3) = R1, Not Used
RateT(4) = R2, Not Used
RateT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term RateT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
kt
The axial translational tension stiffness for the U1 degree of freedom. This item
applies for nonlinear analyses. [F/L]
dis
The U1 degree of freedom gap opening for compression. This item applies for
nonlinear analyses. [L]
dist
The U1 degree of freedom gap opening for tension. This item applies for
nonlinear analyses. [L]
Damping
The nonlinear damping coefficient used for the axial translational degree of
freedom, U1. This item applies for nonlinear analyses. [F/L]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a T/C friction isolator-type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropTCFrictionIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double
Dim MySlowT() As Double
Dim MyFastT() As Double
Dim MyRateT() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim k() As Double
Dim Slow() As Double
Dim Fast() As Double
Dim Rate() As Double
Dim Radius() As Double
Dim SlowT() As Double
Dim FastT() As Double
Dim RateT() As Double
Dim kt As Double
Dim dis As Double
Dim dist As Double
Dim Damping As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")
'start Sap2000 application
SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MySlow(5)
ReDim MyFast(5)
ReDim MyRate(5)
ReDim MyRadius(5)
ReDim MySlowT(5)
ReDim MyFastT(5)
ReDim MyRateT(5)

MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01
MyK(0) = 1000

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MySlow(1)= 0.6
MyFast(1)= 0.5
MyRate(1)= 10
MyRadius(1)= 80
MySlowT(1)= 0.61
MyFastT(1)= 0.51
MyRateT(1)= 10.1

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 14
MyCe(2) = 0.008
MyK(2) = 22
MySlow(2)= 0.66
MyFast(2)= 0.55
MyRate(2)= 12
MyRadius(2)= 75
MySlowT(2)= 0.67
MyFastT(2)= 0.56
MyRateT(2)= 12.1

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0

MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetTCFrictionIsolator("TCFI1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MySlow, MyFast,
MyRate, MyRadius, MySlowT, MyFastT, MyRateT, 18, 2, 3, 0.1, 2, 3)

'get link property data


ret = SapModel.PropLink.GetTCFrictionIsolator("TCFI1", DOF,
Fixed, NonLinear, Ke, Ce, k, Slow, Fast, Rate, Radius, SlowT,
FastT, RateT, kt, dis, dist, Damping, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetTCFrictionIsolator
GetTriplePendulumIsolator
Syntax
SapObject.SapModel.PropLink.GetTriplePendulumIsolator
VB6 Procedure
Function GetTriplePendulumIsolator(ByVal Name As String, ByRef dof() As
Boolean, ByRef Fixed() As Boolean, ByRef Nonlinear() As Boolean, ByRef Ke()
As Double, ByRef Ce() As Double, ByRef K1 As Double, ByRef Damping As
Double, ByRef K() As Double, ByRef Slow() As Double, ByRef Fast() As
Double, ByRef Rate() As Double, ByRef Radius() As Double, ByRef StopDist()
As Double, ByRef HeightOut As Double, ByRef HeightIn As Double, ByRef dj2
As Double, ByRef dj3 As Double, ByRef Notes As String, ByRef GUID As
String) As Long
Parameters
Name
The name of an existing Triple Pendulum Isolator type link property.
DOF
This is a Boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3

Fixed
This is a Boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) only applies when DOF(n) = True.


NonLinear
This is a Boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable for degrees of freedom U1, U2 and U3 only. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses, and also for nonlinear analysis for those
DOF for which NonLinear(n) = False.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
K1
This is the axial compression stiffness for the U1 degree of freedom. This item
applies for nonlinear analyses. [F/L]
Damping
This is the nonlinear damping coefficient for the axial degree of freedom, U1,
when it is in compression. This item applies for nonlinear analyses. [F/L]
K
This is an array, dimensioned to 3, of initial nonlinear stiffness (before sliding)
for each sliding surface.
K(0) = for the outer top sliding surface [F/L]
K(1) = for the outer bottom sliding surface [F/L]
K(2) = for the inner top sliding surface [F/L]
K(3) = for the inner bottom sliding surface [F/L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array, dimensioned to 3, of the friction coefficient at zero velocity for
each sliding surface when U1 is in compression.
Slow(0) = for the outer top sliding surface
Slow(1) = for the outer bottom sliding surface
Slow(2) = for the inner top sliding surface
Slow(3) = for the inner bottom sliding surface

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Slow(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array, dimensioned to 3, of the friction coefficient at fast velocity for
each sliding surface when U1 is in compression.
Fast(0) = for the outer top sliding surface
Fast(1) = for the outer bottom sliding surface
Fast(2) = for the inner top sliding surface
Fast(3) = for the inner bottom sliding surface

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Fast(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array, dimensioned to 3, of the inverse of the characteristic sliding
velocity for the Slow and Fast friction coefficients for each sliding surface. This
item applies for nonlinear analyses.
Rate(0) = for the outer top sliding surface [s/L]
Rate(1) = for the outer bottom sliding surface [s/L]
Rate(2) = for the inner top sliding surface [s/L]
Rate(3) = for the inner bottom sliding surface [s/L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array, dimensioned to 3, of the radius for each sliding surface.
Inputting 0 means there is an infinite radius, that is, the slider is flat. This item
applies for nonlinear analyses.
Radius(0) = for the outer top sliding surface [L]
Radius(1) = for the outer bottom sliding surface [L]
Radius(2) = for the inner top sliding surface [L]
Radius(3) = for the inner bottom sliding surface [L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
StopDist
This is an array, dimensioned to 3, of the amount of displacement allowed before
hitting a stiff limit for each sliding surface. Inputting 0 means there is no stop.
This item applies for nonlinear analyses.
StopDist(0) = for the outer top sliding surface [L]
StopDist(1) = for the outer bottom sliding surface [L]
StopDist(2) = for the inner top sliding surface [L]
StopDist(3) = for the inner bottom sliding surface [L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term StopDist(n) applies only when DOF(n) =
True, Fixed(n) = False and NonLinear(n) = True.
HeightOut
This is the height (distance) between the outer sliding surfaces at zero
displacement. [L]
Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term applies only when DOF(n) = True, Fixed(n)
= False and NonLinear(n) = True.
HeightIn
This is the height (distance) between the inner sliding surfaces. [L]
Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term applies only when DOF(n) = True, Fixed(n)
= False and NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring, that is, the center
of the isolator. This item applies only when DOF(2) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring, that is, the center
of the isolator. This item applies only when DOF(3) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves link property data for a Triple Pendulum Isolator type link
property.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetLinkPropTriplePendulumIsolator()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double
Dim MyStopDist() As Double
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Nonlinear() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim K() As Double
Dim Slow() As Double
Dim Fast() As Double
Dim Rate() As Double
Dim Radius() As Double
Dim StopDist() As Double
Dim K1 As Double
Dim Damping As Double
Dim Hout As Double
Dim Hin As Double
Dim dj2 As Double
Dim dj3 As Double
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = New SAP2000.SapObject

'start Sap2000 application


SapObject.ApplicationStart
'create SapModel object
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(3)
ReDim MySlow(3)
ReDim MyFast(3)
ReDim MyRate(3)
ReDim MyRadius(3)
ReDim MyStopDist(3)

MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 14
MyCe(2) = 0.008

MyK(0) = 20
MySlow(0)= 0.6
MyFast(0)= 0.5
MyRate(0)= 10
MyRadius(0)= 80
MyStopDist(0)= 8
MyK(1) = 22
MySlow(1)= 0.66
MyFast(1)= 0.55
MyRate(1)= 12
MyRadius(1)= 75
MyStopDist(1)= 8

MyK(2) = 20
MySlow(2)= 0.6
MyFast(2)= 0.5
MyRate(2)= 10
MyRadius(2)= 80
MyStopDist(2)= 8

MyK(3) = 20
MySlow(3)= 0.6
MyFast(3)= 0.5
MyRate(3)= 10
MyRadius(3)= 80
MyStopDist(3)= 8

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0

MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetTriplePendulumIsolator("TPI1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, 1000, 0.1, MyK, MySlow,
MyFast, MyRate, MyRadius, MyStopDist, 6, 3, 3, 3)

'get link property data


ret = SapModel.PropLink.GetTriplePendulumIsolator("TPI1",
DOF, Fixed, NonLinear, Ke, Ce, K1, Damping, K, Slow, Fast, Rate,
Radius, StopDist, Hout, Hin, dj2, dj3, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.00.
See Also
SetTriplePendulumIsolator
GetTypeOAPI
Syntax
SapObject.SapModel.PropLink.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef PropType As
eLinkPropType) As Long
Parameters
Name
The name of an existing link property.
PropType
This is one of the following items in the eLinkPropType enumeration.
NLPROP_LINEAR = 1
NLPROP_DAMPER = 2
NLPROP_GAP = 3
NLPROP_HOOK = 4
NLPROP_PLASTIC_WEN = 5
NLPROP_ISOLATOR1 = 6 (Rubber isolator)
NLPROP_ISOLATOR2 = 7 (Friction isolator)
NLPROP_MULTILINEAR_ELASTIC = 8
NLPROP_MULTILINEAR_PLASTIC = 9
NLPROP_ISOLATOR3 = 10 (T/C Friction isolator)
Remarks
This function retrieves the property type for the specified link property.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetLinkPropType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim PropType As eLinkPropType

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'get link property type


ret = SapModel.PropLink.GetTypeOAPI("L1", PropType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
GetWeightAndMass
Syntax
SapObject.SapModel.PropLink.GetWeightAndMass
VB6 Procedure
Function GetWeightAndMass(ByVal Name As String, ByRef w As Double,
ByRef m As Double, ByRef R1 As Double, ByRef R2 As Double, ByRef R3 As
Double) As Long
Parameters
Name
The name of an existing link property.
w
The weight of the link. [F]
m
The translational mass of the link. [M]
R1
The rotational inertia of the link about its local 1 axis. [ML2]
R2
The rotational inertia of the link about its local 2 axis. [ML2]
R3
The rotational inertia of the link about its local 3 axis. [ML2]
Remarks
This function retrieves weight and mass data for a link property.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkPropWeightAndMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim w As Double
Dim m As Double
Dim R1 As Double
Dim R2 As Double
Dim R3 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property weight and mass


ret = SapModel.PropLink.SetWeightAndMass("L1", 10, 0.26,
0.0012, 0.0014, 0.0016)

'get link property weight and mass


ret = SapModel.PropLink.GetWeightAndMass("L1", w, m, R1, R2,
R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetWeightAndMass
SetDamper
Syntax
SapObject.SapModel.PropLink.SetDamper
VB6 Procedure
Function SetDamper(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef c() As Double, ByRef
cexp() As Double, ByVal dj2 As Double, ByVal dj3 As Double, Optional ByVal
Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear damping coefficient terms for the link property. The
nonlinear damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/(L^cexp)]
c(1) = U2 [F/(L^cexp)]
c(2) = U3 [F/(L^cexp)]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]

The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cexp
This is an array of the nonlinear damping exponent terms. The nonlinear
damping exponent applies for nonlinear analyses. It is applied to the velocity
across the damper in the equation of motion.
cexp(0) = U1
cexp(1) = U2
cexp(2) = U3
cexp(3) = R1
cexp(4) = R2
cexp(5) = R3

The term cexp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes an exponential damper-type link property. If this function
is called for an existing link property, all items for the property are reset to their
default values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropDamper()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCexp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCexp(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01
MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCexp(1) = 1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamper("D1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp, 1, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Clarification that damper type is exponential added in version 16.0.2.
See Also
GetDamper
SetDamperBilinear
Syntax
SapObject.SapModel.PropLink.SetDamperBilinear
VB6 Procedure
Function SetDamperBilinear (ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef c() As Double,
ByRef cy() As Double, ByRef ForceLimit() As Double, ByVal dj2 As Double,
ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional ByVal GUID
As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear initial damping coefficient terms for the link property.
The nonlinear initial damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/L]
c(1) = U2 [F/L]
c(2) = U3 [F/L]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]
The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cy
This is an array of nonlinear yielded damping coefficient terms for the link
property. The nonlinear yielded damping coefficient applies for nonlinear
analyses.
cy(0) = U1 [F/L]
cy(1) = U2 [F/L]
cy(2) = U3 [F/L]
cy(3) = R1 [FL]
cy(4) = R2 [FL]
cy(5) = R3 [FL]
The term cy(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
ForceLimit
This is an array of nonlinear linear force limit terms for the link property. The
linear force limit applies for nonlinear analyses.
ForceLimit(0) = U1 [F]
ForceLimit(1) = U2 [F]
ForceLimit(2) = U3 [F]
ForceLimit(3) = R1 [FL]
ForceLimit(4) = R2 [FL]
ForceLimit(5) = R3 [FL]
The term ForceLimit(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a bilinear damper-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropDamperBilinear ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCy() As Double
Dim MyForceLimit() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCy(5)
ReDim MyForceLimit(5)
MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCy(1) = 0.008
MyForceLimit(1) = 50

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperBilinear("D1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCy,
MyForceLimit, 1, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
GetDamperBilinear
SetDamperFrictionSpring
Syntax
SapObject.SapModel.PropLink.SetDamperFrictionSpring
VB6 Procedure
Function SetDamperFrictionSpring(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef k1() As
Double, ByRef k2() As Double, ByRef u0() As Double, ByRef us() As Double,
ByRef dir() As Long, ByVal dj2 As Double, ByVal dj3 As Double, Optional ByVal
Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial (nonslipping) stiffness terms for the link property. The
initial stiffness applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
k1
This is an array of slipping stiffness when loading terms for the link property. The
slipping stiffness when loading applies for nonlinear analyses.
k1(0) = U1 [F/L]
k1(1) = U2 [F/L]
k1(2) = U3 [F/L]
k1(3) = R1 [FL]
k1(4) = R2 [FL]
k1(5) = R3 [FL]
The term k1(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
k2
This is an array of slipping stiffness when unloading terms for the link property.
The slipping stiffness when unloading applies for nonlinear analyses.
k2(0) = U1 [F/L]
k2(1) = U2 [F/L]
k2(2) = U3 [F/L]
k2(3) = R1 [FL]
k2(4) = R2 [FL]
k2(5) = R3 [FL]
The term k2(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
u0
This is an array of precompression displacement terms for the link property. The
nonlinear precompression displacement applies for nonlinear analyses.
u0(0) = U1 [L]
u0(1) = U2 [L]
u0(2) = U3 [L]
u0(3) = R1
u0(4) = R2
u0(5) = R3
The term u0(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
us
This is an array of stop displacement terms for the link property. The nonlinear
stop displacement applies for nonlinear analyses.
us(0) = U1 [L]
us(1) = U2 [L]
us(2) = U3 [L]
us(3) = R1
us(4) = R2
us(5) = R3
The term us(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a friction spring damper-type link property. If this function
is called for an existing link property, all items for the property are reset to their
default values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropDamperFrictionSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyK1() As Double
Dim MyK2() As Double
Dim MyU0() As Double
Dim MyUs() As Double
Dim MyDir() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyK1(5)
ReDim MyK2(5)
ReDim MyU0(5)
ReDim MyUs(5)
ReDim MyDir(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyK1(1)=2
MyK2(1) = 1
MyU0(1) = -.2
MyUs(1) = 1
MyDir(1) = 2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperFrictionSpring("D1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyK1, MyK2,
MyU0, MyUs, MyDir, 1, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
GetDamperFrictionSpring
SetDamperLinearExponential
Syntax
SapObject.SapModel.PropLink.SetDamperLinearExponential
VB6 Procedure
Function SetDamperLinearExponential(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef c() As
Double, ByRef cexp() As Double, ByRef ForceLimit() As Double, ByVal dj2 As
Double, ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained.)
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity
The term Fixed(n) applies only when DOF(n) = True.
NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties
The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]
The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]
The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]
The term k(n) only applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
c
This is an array of nonlinear damping coefficient terms for the link property. The
nonlinear damping coefficient applies for nonlinear analyses.
c(0) = U1 [F/(L^cexp)]
c(1) = U2 [F/(L^cexp)]
c(2) = U3 [F/(L^cexp)]
c(3) = R1 [FL]
c(4) = R2 [FL]
c(5) = R3 [FL]
The term c(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
cexp
This is an array of the nonlinear damping exponent terms. The nonlinear
damping exponent applies for nonlinear analyses. It is applied to the velocity
across the damper in the equation of motion.
cexp(0) = U1
cexp(1) = U2
cexp(2) = U3
cexp(3) = R1
cexp(4) = R2
cexp(5) = R3
The term cexp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
ForceLimit
This is an array of nonlinear linear force limit terms for the link property. The
linear force limit applies for nonlinear analyses.
ForceLimit(0) = U1 [F]
ForceLimit(1) = U2 [F]
ForceLimit(2) = U3 [F]
ForceLimit(3) = R1 [FL]
ForceLimit(4) = R2 [FL]
ForceLimit(5) = R3 [FL]
The term ForceLimit(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a linear exponential damper-type link property. If this
function is called for an existing link property, all items for the property are reset
to their default values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropDamperLinearExponential()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyC() As Double
Dim MyCexp() As Double
Dim MyForceLimit() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyC(5)
ReDim MyCexp(5)
ReDim MyForceLimit(5)
MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyC(1)=0.08
MyCexp(1) = 1.2
MyForceLimit(1) = 50

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetDamperLinearExponential("D1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyC, MyCexp,
MyForceLimit, 1, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
GetDamperLinearExponential
SetFrictionIsolator
Syntax
SapObject.SapModel.PropLink.SetFrictionIsolator
VB6 Procedure
Function SetFrictionIsolator(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Slow() As Double,
ByRef Fast() As Double, ByRef Rate() As Double, ByRef Radius() As Double,
ByVal Damping As Double, ByVal dj2 As Double, ByVal dj3 As Double, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array of the friction coefficient at zero velocity terms for the link
property. This coefficient applies for nonlinear analyses.
Slow(0) = U1, Not Used
Slow(1) = U2
Slow(2) = U3
Slow(3) = R1, Not Used
Slow(4) = R2, Not Used
Slow(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Slow(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array of the friction coefficient at fast velocity terms for the link
property. This coefficient applies for nonlinear analyses.
Fast(0) = U1, Not Used
Fast(1) = U2
Fast(2) = U3
Fast(3) = R1, Not Used
Fast(4) = R2, Not Used
Fast(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Fast(n) applies pnly when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array of the inverse of the characteristic sliding velocity terms for the
link property. This item applies for nonlinear analyses.
Rate(0) = U1, Not Used
Rate(1) = U2 [s/L]
Rate(2) = U3 [s/L]
Rate(3) = R1, Not Used
Rate(4) = R2, Not Used
Rate(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array of the radius of the sliding contact surface terms for the link
property. Inputting 0 means there is an infinite radius, that is, the slider is flat.
This item applies for nonlinear analyses.
Radius(0) = U1, Not Used
Radius(1) = U2 [L]
Radius(2) = U3 [L]
Radius(3) = R1, Not Used
Radius(4) = R2, Not Used
Radius(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Damping
This is the nonlinear damping coefficient used for the axial translational degree
of freedom, U1. This item applies for nonlinear analyses. [F/L]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a friction isolator-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropFrictionIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MySlow(5)
ReDim MyFast(5)
ReDim MyRate(5)
ReDim MyRadius(5)
MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01
MyK(0) = 1000

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MySlow(1)= 0.6
MyFast(1)= 0.5
MyRate(1)= 10
MyRadius(1)= 80

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 14
MyCe(2) = 0.008
MyK(2) = 22
MySlow(2)= 0.66
MyFast(2)= 0.55
MyRate(2)= 12
MyRadius(2)= 75

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0

MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetFrictionIsolator("FI1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MySlow, MyFast, MyRate,
MyRadius, 0.1, 2, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetFrictionIsolator
SetGap
Syntax
SapObject.SapModel.PropLink.SetGap
VB6 Procedure
Function SetGap(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef dis() As Double, ByVal dj2
As Double, ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property then
that property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dis
This is an array of initial gap opening terms for the link property. The initial gap
opening applies for nonlinear analyses.
dis(0) = U1 [L]
dis(1) = U2 [L]
dis(2) = U3 [L]
dis(3) = R1 [rad]
dis(4) = R2 [rad]
dis(5) = R3 [rad]

The term dis(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a gap-type link property. If this function is called for an
existing link property, all items for the property are reset to their default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropGap()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyDis() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyDis(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyDis(1)=1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetGap("G1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyDis, 2, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetGap
SetHook
Syntax
SapObject.SapModel.PropLink.SetHook
VB6 Procedure
Function SetHook(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As Double,
ByRef Ce() As Double, ByRef k() As Double, ByRef dis() As Double, ByVal dj2
As Double, ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property then
that property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dis
This is an array of initial hook opening terms for the link property. The initial hook
opening applies for nonlinear analyses.
c(0) = U1 [L]
c(1) = U2 [L]
c(2) = U3 [L]
c(3) = R1 [rad]
c(4) = R2 [rad]
c(5) = R3 [rad]

The term dis(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a hook-type link property. If this function is called for an
existing link property, all items for the property are reset to their default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropHook()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyDis() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyDis(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyDis(1)=1.2

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetHook("H1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyDis, 2, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetHook
SetLinear
Syntax
SapObject.SapModel.PropLink.SetLinear
VB6 Procedure
Function SetLinear(ByVal Name As String, ByRef DOF() As Boolean, ByRef
Fixed() As Boolean, ByRef Ke() As Double, ByRef Ce() As Double, ByVal dj2 As
Double, ByVal dj3 As Double, Optional ByVal KeCoupled As Boolean = False,
Optional ByVal CeCoupled As Boolean = False, Optional ByVal Notes As String
= "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity if DOF(0) = True
Fixed(1) = U2 fixity if DOF(1) = True
Fixed(2) = U3 fixity if DOF(2) = True
Fixed(3) = R1 fixity if DOF(3) = True
Fixed(4) = R2 fixity if DOF(4) = True
Fixed(5) = R3 fixity if DOF(5) = True
Ke
This is an array of stiffness terms for the link property. There are 6 terms in the
array if the stiffness is uncoupled and 21 if it is coupled. The KeCoupled item
indicates if the stiffness is coupled.
If the stiffness is uncoupled:
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

If the stiffness is coupled:


Ke(0) = U1U1 [F/L]
Ke(1) = U1U2 [F/L]
Ke(2) = U2U2 [F/L]
Ke(3) = U1U3 [F/L]
Ke(4) = U2U3 [F/L]
Ke(5) = U3U3 [F/L]
Ke(6) = U1R1 [F]
Ke(7) = U2R1 [F]
Ke(8) = U3R1 [F]
Ke(9) = R1R1 [FL]
Ke(10) = U1R2 [F]
Ke(11) = U2R2 [F]
Ke(12) = U3R2 [F]
Ke(13) = R1R2 [FL]
Ke(14) = R2R2 [FL]
Ke(15) = U1R3 [F]
Ke(16) = U2R3 [F]
Ke(17) = U3R3 [F]
Ke(18) = R1R3 [FL]
Ke(19) = R2R3 [FL]
Ke(20) = R3R3 [FL]
Ce
This is an array of damping terms for the link property. There are 6 terms in the
array if the damping is uncoupled and 21 if it is coupled. The CeCoupled item
indicates if the damping is coupled.
If the damping is uncoupled:
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

If the damping is coupled:


Ce(0) = U1U1 [F/L]
Ce(1) = U1U2 [F/L]
Ce(2) = U2U2 [F/L]
Ce(3) = U1U3 [F/L]
Ce(4) = U2U3 [F/L]
Ce(5) = U3U3 [F/L]
Ce(6) = U1R1 [F]
Ce(7) = U2R1 [F]
Ce(8) = U3R1 [F]
Ce(9) = R1R1 [FL]
Ce(10) = U1R2 [F]
Ce(11) = U2R2 [F]
Ce(12) = U3R2 [F]
Ce(13) = R1R2 [FL]
Ce(14) = R2R2 [FL]
Ce(15) = U1R3 [F]
Ce(16) = U2R3 [F]
Ce(17) = U3R3 [F]
Ce(18) = R1R3 [FL]
Ce(19) = R2R3 [FL]
Ce(20) = R3R3 [FL]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
KeCoupled
This item is True if the link stiffness, Ke, is coupled. There are 21 terms in the
Ke array if Ke is coupled; otherwise there are 6 terms.
CeCoupled
This item is True if the link damping, Ce, is coupled. There are 21 terms in the
Ce array if Ce is coupled; otherwise there are 6 terms.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a linear-type link property. If this function is called for an
existing link property, all items for the property are reset to their default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropLinear()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetLinear
SetMultiLinearElastic
Syntax
SapObject.SapModel.PropLink.SetMultiLinearElastic
VB6 Procedure
Function SetMultiLinearElastic(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByVal dj2 As Double, ByVal dj3 As
Double, Optional ByVal Notes As String = "", Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property then.
that property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a multilinear elastic-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropMultiLinearElastic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearElastic("MLE1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMultiLinearElastic
GetMultiLinearPoints
SetMultiLinearPoints
SetMultiLinearPlastic
Syntax
SapObject.SapModel.PropLink.SetMultiLinearPlastic
VB6 Procedure
Function SetMultiLinearPlastic(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByVal dj2 As Double, ByVal dj3 As
Double, Optional ByVal Notes As String = "", Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a multilinear plastic-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropMultiLinearPlastic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearPlastic("MLP1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMultiLinearPlastic
GetMultiLinearPoints
SetMultiLinearPoints
SetMultiLinearPoints
Syntax
SapObject.SapModel.PropLink.SetMultiLinearPoints
VB6 Procedure
Function SetMultiLinearPoints(ByVal Name As String, ByVal DOF As Long,
ByVal NumberPoints As Long, ByRef F() As Double, ByRef D() As Double,
Optional ByVal MyType As Long = 1, Optional ByVal a1 As Double = 0, Optional
ByVal a2 As Double = 0, Optional ByVal b1 As Double = 0, Optional ByVal b2 As
Double = 0, Optional ByVal eta As Double = 0) As Long
Parameters
Name
The name of an existing multilinear elastic or multilinear plastic link property.
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom to which the multilinear
points apply.
1= U1
2= U2
3= U3
4= R1
5= R2
6= R3
NumberPoints
The number of foce-defomation points for the specified degree of freedom.
F
This is an array, dimensioned to NumberPoints - 1, that includes the force at
each point. When DOF is U1, U2 or U3, this is a force. When DOF is R1, R2 or
R3. this is a moment. [F] if DOF <= 3, and [FL} if DOF > 3
D
This is an array, dimensioned to NumberPoints - 1, that includes the
displacement at each point. When DOF is U1, U2 or U3, this is a translation.
When DOF is R1, R2 or R3, this is a rotation. [L] if DOF <= 3, and [rad] if DOF >
3
MyType
This item applies only to multilinear plastic link properties. It is 1, 2 or 3,
indicating the hysteresis type.
1 = Kinematic
2 = Takeda
3 = Pivot
a1
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Alpha1 hysteresis parameter.
a2
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Alpha2 hysteresis parameter.
b1
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Beta1 hysteresis parameter.
b2
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Beta2 hysteresis parameter.
eta
This item applies only to multilinear plastic link properties that have a pivot
hysteresis type (MyType = 3). It is the Eta hysteresis parameter.
Remarks
This function sets the force-deformation data for a specified degree of freedom
in multilinear elastic and multilinear plastic link properties.
The function returns zero if the data is successfully assigned; otherwise it
returns a nonzero value.
To successfully apply this data to the indicated link property, the following
conditions must be met:
1. The link property must be multilinear elastic or multilinear plastic.
2. The specified DOF must be active.
3. The specified DOF must not be fixed.
4. The specified DOF must be nonlinear.
VBA Example
Sub SetLinkPropMultiLinearPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyF() As Double
Dim MyD() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetMultiLinearPlastic("MLP1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, 2, 0)

'set multilinear force-defomation data


ReDim MyF(4)
ReDim MyD(4)

MyF(0) = -12
MyF(1) = -10
MyF(2) = 0
MyF(3) = 8
MyF(4) = 9

MyD(0) = -8
MyD(1) = -0.6
MyD(2) = 0
MyD(3) = 0.2
MyD(4) = 6

ret = SapModel.PropLink.SetMultiLinearPoints("MLP1", 2, 5,
MyF, MyD, 3, 9, 12, 0.75, 0.8, .1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetMultiLinearPoints
SetMultiLinearElastic
GetMultiLinearElastic
SetMultiLinearPlastic
GetMultiLinearPlastic
SetPDelta
Syntax
SapObject.SapModel.PropLink.SetPDelta
VB6 Procedure
Function SetPDelta(ByVal Name As String, ByRef Value() As Double) As Long
Parameters
Name
The name of an existing link property.
Value
This is an array of P-delta parameters.
Value(0) = M2 P-delta to I-end of link as moment, M2I
Value(1) = M2 P-delta to J-end of link as moment, M2J
Value(2) = M3 P-delta to I-end of link as moment, M3I
Value(3) = M3 P-delta to J-end of link as moment, M3J
Remarks
This function assigns P-delta parameters to a link property.
The function returns zero if the values are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropPDelta()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double
Dim MyValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property P-delta parameters


ReDim MyValue(3)
MyValue(0) = 0.6
MyValue(1) = 0.4
MyValue(2) = 0.3
MyValue(3) = 0.2
ret = SapModel.PropLink.SetPDelta("L1", MyValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPDelta
SetPlasticWen
Syntax
SapObject.SapModel.PropLink.SetPlasticWen
VB6 Procedure
Function SetPlasticWen(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Yield() As Double,
ByRef Ratio() As Double, ByRef exp() As Double, ByVal dj2 As Double, ByVal
dj3 As Double, Optional ByVal Notes As String = "", Optional ByVal GUID As
String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1 has nonlinear properties
NonLinear(4) = R2 has nonlinear properties
NonLinear(5) = R3 has nonlinear properties

The term NonLinear(n) applies only when DOF(n) = True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1 [FL]
k(4) = R2 [FL]
k(5) = R3 [FL]

The term k(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Yield
This is an array of yield force terms for the link property. The yield force applies
for nonlinear analyses.
Yield(0) = U1 [F]
Yield(1) = U2 [F]
Yield(2) = U3 [F]
Yield(3) = R1 [FL]
Yield(4) = R2 [FL]
Yield(5) = R3 [FL]

The term Yield(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Ratio
This is an array of post-yield stiffness ratio terms for the link property. The post-
yield stiffness ratio applies for nonlinear analyses. It is the post-yield stiffness
divided by the initial stiffness.
Ratio(0) = U1
Ratio(1) = U2
Ratio(2) = U3
Ratio(3) = R1
Ratio(4) = R2
Ratio(5) = R3

The term Ratio(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
exp
This is an array of yield exponent terms for the link property. The yield exponent
applies for nonlinear analyses. The yielding exponent that controls the
sharpness of the transition from the initial stiffness to the yielded stiffness.
exp(0) = U1
exp(1) = U2
exp(2) = U3
exp(3) = R1
exp(4) = R2
exp(5) = R3

The term exp(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a plastic Wen-type link property. If this function is called
for an existing link property, all items for the property are reset to their default
values.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropPlasticWen()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyYield() As Double
Dim MyRatio() As Double
Dim MyExp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyYield(5)
ReDim MyRatio(5)
ReDim MyExp(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyYield(1)= 50
MyRatio(1)= 0.1
MyExp(1)= 3

MyDOF(2) = True
MyFixed(2) = True

ret = SapModel.PropLink.SetPlasticWen("PW1", MyDOF, MyFixed,


MyNonLinear, MyKe, MyCe, MyK, MyYield, MyRatio, MyExp, 2, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetPlasticWen
SetRubberIsolator
Syntax
SapObject.SapModel.PropLink.SetRubberIsolator
VB6 Procedure
Function SetRubberIsolator(ByVal Name As String, ByRef DOF() As Boolean,
ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef Ke() As
Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Yield() As Double,
ByRef Ratio() As Double, ByVal dj2 As Double, ByVal dj3 As Double, Optional
ByVal Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1, Not Used
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1, Not Used
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Yield
This is an array of yield force terms for the link property. The yield force applies
for nonlinear analyses.
Yield(0) = U1, Not Used
Yield(1) = U2 [F]
Yield(2) = U3 [F]
Yield(3) = R1, Not Used
Yield(4) = R2, Not Used
Yield(5) = R3, Not Used

The term Yield(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
Ratio
This is an array of post-yield stiffness ratio terms for the link property. The post-
yield stiffness ratio applies for nonlinear analyses. It is the post-yield stiffness
divided by the initial stiffness.
Ratio(0) = U1, Not Used
Ratio(1) = U2
Ratio(2) = U3
Ratio(3) = R1, Not Used
Ratio(4) = R2, Not Used
Ratio(5) = R3, Not Used

The term Ratio(n) applies only when DOF(n) = True, Fixed(n) = False and
NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a rubber isolator-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropRubberIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MyYield() As Double
Dim MyRatio() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MyYield(5)
ReDim MyRatio(5)
ReDim MyExp(5)

MyDOF(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MyYield(1)= 50
MyRatio(1)= 0.1

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 15
MyCe(2) = 0.008
MyK(2) = 22
MyYield(2)= 60
MyRatio(2)= 0.15

MyDOF(3) = True
MyFixed(3) = True

ret = SapModel.PropLink.SetRubberIsolator("RI1", MyDOF,


MyFixed, MyNonLinear, MyKe, MyCe, MyK, MyYield, MyRatio, 2, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetRubberIsolator
SetSpringData
Syntax
SapObject.SapModel.PropLink.SetSpringData
VB6 Procedure
Function SetSpringData(ByVal Name As String, ByVal DefinedForThisLength As
Double, ByVal DefinedForThisArea As Double) As Long
Parameters
Name
The name of an existing link property.
DefinedForThisLength
The link property is defined for this length in a line (frame) spring. [L]
DefinedForThisArea
The link property is defined for this area in an area spring. [L2]
Remarks
This function assigns length and area values to a link property that are used if
the link property is specified in line and area spring assignments.
The function returns zero if the values are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropSpringData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property spring data


ret = SapModel.PropLink.SetSpringData("L1", 12, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetSpringData
SetTCFrictionIsolator
Syntax
SapObject.SapModel.PropLink.SetTCFrictionIsolator
VB6 Procedure
Function SetTCFrictionIsolator(ByVal Name As String, ByRef DOF() As
Boolean, ByRef Fixed() As Boolean, ByRef NonLinear() As Boolean, ByRef
Ke() As Double, ByRef Ce() As Double, ByRef k() As Double, ByRef Slow() As
Double, ByRef Fast() As Double, ByRef Rate() As Double, ByRef Radius() As
Double, ByRef SlowT() As Double, ByRef FastT() As Double, ByRef RateT() As
Double, ByVal kt As Double, ByVal dis As Double, ByVal dist As Double, ByVal
Damping As Double, ByVal dj2 As Double, ByVal dj3 As Double, Optional ByVal
Notes As String = "", Optional ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
Fixed
This is a boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
k
This is an array of initial stiffness terms for the link property. The initial stiffness
applies for nonlinear analyses.
k(0) = U1 [F/L]
k(1) = U2 [F/L]
k(2) = U3 [F/L]
k(3) = R1, Not Used
k(4) = R2, Not Used
k(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U1, U2 and U3. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array of the friction coefficient at zero velocity terms when U1 is in
compression for the link property. This coefficient applies for nonlinear analyses.
Slow(0) = U1, Not Used
Slow(1) = U2
Slow(2) = U3
Slow(3) = R1, Not Used
Slow(4) = R2, Not Used
Slow(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Slow(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array of the friction coefficient at fast velocity terms when U1 is in
compression for the link property. This coefficient applies for nonlinear analyses.
Fast(0) = U1, Not Used
Fast(1) = U2
Fast(2) = U3
Fast(3) = R1, Not Used
Fast(4) = R2, Not Used
Fast(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Fast(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array of the inverse of the characteristic sliding velocity terms when
U1 is in compression for the link property. This item applies for nonlinear
analyses.
Rate(0) = U1, Not Used
Rate(1) = U2 [s/L]
Rate(2) = U3 [s/L]
Rate(3) = R1, Not Used
Rate(4) = R2, Not Used
Rate(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array of the radius of the sliding contact surface terms for the link
property. Inputting 0 means there is an infinite radius, that is, the slider is flat.
This item applies for nonlinear analyses.
Radius(0) = U1, Not Used
Radius(1) = U2 [L]
Radius(2) = U3 [L]
Radius(3) = R1, Not Used
Radius(4) = R2, Not Used
Radius(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
SlowT
This is an array of the friction coefficient at zero velocity terms when U1 is in
tension for the link property. This coefficient applies for nonlinear analyses.
SlowT(0) = U1, Not Used
SlowT(1) = U2
SlowT(2) = U3
SlowT(3) = R1, Not Used
SlowT(4) = R2, Not Used
SlowT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term SlowT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
FastT
This is an array of the friction coefficient at fast velocity terms when U1 is in
tension for the link property. This coefficient applies for nonlinear analyses.
FastT(0) = U1, Not Used
FastT(1) = U2
FastT(2) = U3
FastT(3) = R1, Not Used
FastT(4) = R2, Not Used
FastT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term FastT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
RateT
This is an array of the inverse of the characteristic sliding velocity terms when
U1 is in tension for the link property. This item applies for nonlinear analyses.
RateT(0) = U1, Not Used
RateT(1) = U2 [s/L]
RateT(2) = U3 [s/L]
RateT(3) = R1, Not Used
RateT(4) = R2, Not Used
RateT(5) = R3, Not Used

Note that this item is applicable only for degrees of freedom U2 and U3. For
those degrees of freedom, the term RateT(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
kt
The axial translational tension stiffness for the U1 degree of freedom. This item
applies for nonlinear analyses. [F/L]
dis
The U1 degree of freedom gap opening for compression. This item applies for
nonlinear analyses. [L]
dist
The U1 degree of freedom gap opening for tension. This item applies for
nonlinear analyses. [L]
Damping
The nonlinear damping coefficient used for the axial translational degree of
freedom, U1. This item applies for nonlinear analyses. [F/L]
dj2
The distance from the J-End of the link to the U2 shear spring. This item applies
only when DOF(1) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring. This item applies
only when DOF(2) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function initializes a T/C friction isolator-type link property. If this function is
called for an existing link property, all items for the property are reset to their
default value.
The function returns zero if the property is successfully initialized; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropTCFrictionIsolator()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double
Dim MySlowT() As Double
Dim MyFastT() As Double
Dim MyRateT() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(5)
ReDim MySlow(5)
ReDim MyFast(5)
ReDim MyRate(5)
ReDim MyRadius(5)
ReDim MySlowT(5)
ReDim MyFastT(5)
ReDim MyRateT(5)

MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01
MyK(0) = 1000

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01
MyK(1) = 20
MySlow(1)= 0.6
MyFast(1)= 0.5
MyRate(1)= 10
MyRadius(1)= 80
MySlowT(1)= 0.61
MyFastT(1)= 0.51
MyRateT(1)= 10.1

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 14
MyCe(2) = 0.008
MyK(2) = 22
MySlow(2)= 0.66
MyFast(2)= 0.55
MyRate(2)= 12
MyRadius(2)= 75
MySlowT(2)= 0.67
MyFastT(2)= 0.56
MyRateT(2)= 12.1

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0
MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetTCFrictionIsolator("TCFI1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, MyK, MySlow, MyFast,
MyRate, MyRadius, MySlowT, MyFastT, MyRateT, 18, 2, 3, 0.1, 2, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetTCFrictionIsolator
SSetTriplePendulumIsolator
Syntax
SapObject.SapModel.PropLink.SetTriplePendulumIsolator
VB6 Procedure
Function SetTriplePendulumIsolator(ByVal Name As String, ByRef dof() As
Boolean, ByRef Fixed() As Boolean, ByRef Nonlinear() As Boolean, ByRef Ke()
As Double, ByRef Ce() As Double, ByVal K1 As Double, ByVal Damping As
Double, ByRef K() As Double, ByRef Slow() As Double, ByRef Fast() As
Double, ByRef Rate() As Double, ByRef Radius() As Double, ByRef StopDist()
As Double, ByVal HeightOut As Double, ByVal HeightIn As Double, ByVal dj2 As
Double, ByVal dj3 As Double, Optional ByVal Notes As String = "", Optional ByVal
GUID As String = "") As Long
Parameters
Name
The name of an existing or new link property. If this is an existing property, that
property is modified; otherwise, a new property is added.
DOF
This is a Boolean array, dimensioned to 5, indicating if properties exist for a
specified degree of freedom.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3

Fixed
This is a Boolean array, dimensioned to 5, indicating if the specified degree of
freedom is fixed (restrained).
Fixed(0) = U1 fixity
Fixed(1) = U2 fixity
Fixed(2) = U3 fixity
Fixed(3) = R1 fixity
Fixed(4) = R2 fixity
Fixed(5) = R3 fixity

The term Fixed(n) applies only when DOF(n) = True.


NonLinear
This is a Boolean array, dimensioned to 5, indicating if nonlinear properties exist
for a specified degree of freedom.
NonLinear(0) = U1 has nonlinear properties
NonLinear(1) = U2 has nonlinear properties
NonLinear(2) = U3 has nonlinear properties
NonLinear(3) = R1, Not Used
NonLinear(4) = R2, Not Used
NonLinear(5) = R3, Not Used

Note that this item is applicable for degrees of freedom U1, U2 and U3 only. For
those degrees of freedom, the term NonLinear(n) applies only when DOF(n) =
True and Fixed(n) = False.
Ke
This is an array of effective stiffness terms for the link property. The effective
stiffness applies for linear analyses, and also for nonlinear analysis for those
DOF for which NonLinear(n) = False.
Ke(0) = U1 [F/L]
Ke(1) = U2 [F/L]
Ke(2) = U3 [F/L]
Ke(3) = R1 [FL]
Ke(4) = R2 [FL]
Ke(5) = R3 [FL]

The term Ke(n) applies only when DOF(n) = True and Fixed(n) = False.
Ce
This is an array of effective damping terms for the link property. The effective
damping applies for linear analyses.
Ce(0) = U1 [F/L]
Ce(1) = U2 [F/L]
Ce(2) = U3 [F/L]
Ce(3) = R1 [FL]
Ce(4) = R2 [FL]
Ce(5) = R3 [FL]

The term Ce(n) applies only when DOF(n) = True and Fixed(n) = False.
K1
This is the axial compression stiffness for the U1 degree of freedom. This item
applies for nonlinear analyses. [F/L]
Damping
This is the nonlinear damping coefficient for the axial degree of freedom, U1,
when it is in compression. This item applies for nonlinear analyses. [F/L]
K
This is an array, dimensioned to 3, of initial nonlinear stiffness (before sliding)
for each sliding surface.
K(0) = for the outer top sliding surface [F/L]
K(1) = for the outer bottom sliding surface [F/L]
K(2) = for the inner top sliding surface [F/L]
K(3) = for the inner bottom sliding surface [F/L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term k(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Slow
This is an array, dimensioned to 3, of the friction coefficient at zero velocity for
each sliding surface when U1 is in compression.
Slow(0) = for the outer top sliding surface
Slow(1) = for the outer bottom sliding surface
Slow(2) = for the inner top sliding surface
Slow(3) = for the inner bottom sliding surface

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Slow(n) only applies when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Fast
This is an array, dimensioned to 3, of the friction coefficient at fast velocity for
each sliding surface when U1 is in compression.
Fast(0) = for the outer top sliding surface
Fast(1) = for the outer bottom sliding surface
Fast(2) = for the inner top sliding surface
Fast(3) = for the inner bottom sliding surface

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Fast(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Rate
This is an array, dimensioned to 3, of the inverse of the characteristic sliding
velocity for the Slow and Fast friction coefficients for each sliding surface. This
item applies for nonlinear analyses.
Rate(0) = for the outer top sliding surface [s/L]
Rate(1) = for the outer bottom sliding surface [s/L]
Rate(2) = for the inner top sliding surface [s/L]
Rate(3) = for the inner bottom sliding surface [s/L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Rate(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
Radius
This is an array, dimensioned to 3, of the radius for each sliding surface.
Inputting 0 means there is an infinite radius, that is, the slider is flat. This item
applies for nonlinear analyses.
Radius(0) = for the outer top sliding surface [L]
Radius(1) = for the outer bottom sliding surface [L]
Radius(2) = for the inner top sliding surface [L]
Radius(3) = for the inner bottom sliding surface [L]

Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term Radius(n) applies only when DOF(n) = True,
Fixed(n) = False and NonLinear(n) = True.
StopDist
This is an array, dimensioned to 3, of the amount of displacement allowed before
hitting a stiff limit for each sliding surface. Inputting 0 means there is no stop.
This item applies for nonlinear analyses.
StopDist(0) = for the outer top sliding surface [L]
StopDist(1) = for the outer bottom sliding surface [L]
StopDist(2) = for the inner top sliding surface [L]
StopDist(3) = for the inner bottom sliding surface [L]

Note that this item is applicable for degrees of freedom U2 and U3 only . For
those degrees of freedom, the term StopDist(n) applies only when DOF(n) =
True, Fixed(n) = False and NonLinear(n) = True.
HeightOut
This is the height (distance) between the outer sliding surfaces at zero
displacement. [L]
Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term applies only when DOF(n) = True, Fixed(n)
= False and NonLinear(n) = True.
HeightIn
This is the height (distance) between the inner sliding surfaces. [L]
Note that this item is applicable for degrees of freedom U2 and U3 only. For
those degrees of freedom, the term applies only when DOF(n) = True, Fixed(n)
= False and NonLinear(n) = True.
dj2
The distance from the J-End of the link to the U2 shear spring, that is, the center
of the isolator. This item applies only when DOF(2) = True. [L]
dj3
The distance from the J-End of the link to the U3 shear spring, that is, the center
of the isolator. This item applies only when DOF(3) = True. [L]
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, then the program assigns a GUID to the property.
Remarks
This function initializes a Triple Pendulum Isolator type link property. If this
function is called for an existing link property, then all items for the property are
reset to their default value.
The function returns zero if the property is successfully initialized, otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropTriplePendulumIsolator()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDOF() As Boolean
Dim MyFixed() As Boolean
Dim MyNonLinear() As Boolean
Dim MyKe() As Double
Dim MyCe() As Double
Dim MyK() As Double
Dim MySlow() As Double
Dim MyFast() As Double
Dim MyRate() As Double
Dim MyRadius() As Double
Dim MyStopDist () As Double

'create Sap2000 object


Set SapObject = New SAP2000.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim MyDOF(5)
ReDim MyFixed(5)
ReDim MyNonLinear(5)
ReDim MyKe(5)
ReDim MyCe(5)
ReDim MyK(3)
ReDim MySlow(3)
ReDim MyFast(3)
ReDim MyRate(3)
ReDim MyRadius(3)
ReDim MyStopDist(3)

MyDOF(0) = True
MyNonLinear(0) = True
MyKe(0) = 12
MyCe(0) = 0.01

MyDOF(1) = True
MyNonLinear(1) = True
MyKe(1) = 12
MyCe(1) = 0.01

MyDOF(2) = True
MyNonLinear(2) = True
MyKe(2) = 1
MyCe(2) = 0.008

MyK(0) = 20
MySlow(0)= 0.6
MyFast(0)= 0.5
MyRate(0)= 10
MyRadius(0)= 80
MyStopDist(0)= 8

MyK(1) = 22
MySlow(1)= 0.66
MyFast(1)= 0.55
MyRate(1)= 12
MyRadius(1)= 75
MyStopDist(1)= 8

MyK(2) = 20
MySlow(2)= 0.6
MyFast(2)= 0.5
MyRate(2)= 10
MyRadius(2)= 80
MyStopDist(2)= 8

MyK(3) = 20
MySlow(3)= 0.6
MyFast(3)= 0.5
MyRate(3)= 10
MyRadius(3)= 80
MyStopDist(3)= 8

MyDOF(3) = True
MyKe(3) = 15
MyCe(3) = 0

MyDOF(4) = True
MyFixed(4) = True

ret = SapModel.PropLink.SetTriplePendulumIsolator("TPI1",
MyDOF, MyFixed, MyNonLinear, MyKe, MyCe, 1000, 0.1, MyK, MySlow,
MyFast, MyRate, MyRadius, MyStopDist, 6, 3, 3, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.00.
See Also
GetTriplePendulumIsolator
SetWeightAndMass
Syntax
SapObject.SapModel.PropLink.SetWeightAndMass
VB6 Procedure
Function SetWeightAndMass(ByVal Name As String, ByVal w As Double, ByVal
m As Double, ByVal R1 As Double, ByVal R2 As Double, ByVal R3 As Double)
As Long
Parameters
Name
The name of an existing link property.
w
The weight of the link. [F]
m
The translational mass of the link. [M]
R1
The rotational inertia of the link about its local 1 axis. [ML2]
R2
The rotational inertia of the link about its local 2 axis. [ML2]
R3
The rotational inertia of the link about its local 3 axis. [ML2]
Remarks
This function assigns weight and mass values to a link property.
The function returns zero if the values are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkPropWeightAndMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim Fixed() As Boolean
Dim Ke() As Double
Dim Ce() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link property


ReDim DOF(5)
ReDim Fixed(5)
ReDim Ke(5)
ReDim Ce(5)
DOF(0) = True
Ke(0) = 12
ret = SapModel.PropLink.SetLinear("L1", DOF, Fixed, Ke, Ce,
0, 0)

'set link property weight and mass


ret = SapModel.PropLink.SetWeightAndMass("L1", 10, 0.26,
0.0012, 0.0014, 0.0016)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetWeightAndMass
ChangeName
Syntax
SapObject.SapModel.PropSolid.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined solid property.
NewName
The new name for the solid property.
Remarks
This function changes the name of an existing solid property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeSolidPropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'change name of solid property


ret = SapModel.PropSolid.ChangeName("SOLID1", "MySolid")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropSolid.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined solid properties in the model.
VBA Example
Sub CountSolidProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'return number of defined solid properties


Count = SapModel.PropSolid.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropSolid.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing solid property.
Remarks
The function deletes a specified solid property.
The function returns zero if the property is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified property can not be
deleted, for example, if it is assigned to an existing object.
VBA Example
Sub DeleteSolidProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'set new solid property


ret = SapModel.PropSolid.SetProp("S1", "4000Psi", 0, 10, 20,
True)

'get solid object names


ret = SapModel.SolidObj.GetNameList(NumberNames, MyName)

'set solid property


For i = 1 to NumberNames
ret = SapModel.SolidObj.SetProperty(MyName(i - 1), "S1")
Next i

'delete solid property


ret = SapModel.PropSolid.Delete("SOLID1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNameList
Syntax
SapObject.SapModel.PropSolid.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of solid property names retrieved by the program.
MyName
This is a one-dimensional array of solid property names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined solid properties in the model.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetSolidNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'get solid property names


ret = SapModel.PropSolid.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
Syntax
SapObject.SapModel.PropSolid.GetProp
VB6 Procedure
Function GetProp(ByVal Name As String, ByRef MatProp As String, ByRef a As
Double, ByRef B As Double, ByRef c As Double, ByRef Incompatible As
Boolean, ByRef Color As Long, ByRef Notes As String, ByRef GUID As String)
As Long
Parameters
Name
The name of an existing solid property.
MatProp
The name of the material property assigned to the solid property.
a
The material angle A. [deg]
b
The material angle B. [deg]
c
The material angle C. [deg]
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves solid property definition data.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSolidProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MatProp As String
Dim a As Double
Dim b As Double
Dim c As Double
Dim Incompatible As Boolean
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'get solid property data


ret = SapModel.PropSolid.GetProp("SOLID1", MatProp, a, b, c,
Incompatible, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetProp
SetProp
Syntax
SapObject.SapModel.PropSolid.SetProp
VB6 Procedure
Function SetProp(ByVal Name As String, ByVal MatProp As String, ByVal a As
Double, ByVal B As Double, ByVal c As Double, ByVal Incompatible As Boolean,
Optional ByVal Color As Long = -1, Optional ByVal Notes As String = "", Optional
ByVal GUID As String = "") As Long
Parameters
Name
The name of an existing or new solid property. If this is an existing property, that
property is modified; otherwise, a new property is added.
MatProp
The name of the material property assigned to the solid property.
a
The material angle A. [deg]
b
The material angle B. [deg]
c
The material angle C. [deg]
Incompatible
If this item is True, incompatible bending modes are included in the stiffness
formulation. In general, incompatible modes significantly improve the bending
behavior of the object.
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function defines a solid property.
The function returns zero if the property is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetSolidProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'set new solid property


ret = SapModel.PropSolid.SetProp("S1", "4000Psi", 0, 10, 20,
True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
ChangeName
Syntax
SapObject.SapModel.PropTendon.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined tendon property.
NewName
The new name for the tendon property.
Remarks
This function changes the name of an existing tendon property.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeTendonPropName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon property


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)

'change name of tendon property


ret = SapModel.PropTendon.ChangeName("T1", "MyTendon")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Count
Syntax
SapObject.SapModel.PropTendon.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of defined tendon properties in the model.
VBA Example
Sub CountTendonProps()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon property


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)

'return number of defined tendon properties


Count = SapModel.PropTendon.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
Delete
Syntax
SapObject.SapModel.PropTendon.Delete
VB6 Procedure
Function Delete(ByVal Name As String) As Long
Parameters
Name
The name of an existing tendon property.
Remarks
The function deletes a specified tendon property.
The function returns zero if the property is successfully deleted; otherwise it
returns a nonzero value. It returns an error if the specified property can not be
deleted, for example, if it is assigned to an existing object.
VBA Example
Sub DeleteTendonProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon properties


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)
ret = SapModel.PropTendon.SetProp("T2", Name, 1, 3.25)

'delete tendon property


ret = SapModel.PropTendon.Delete("T1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetNameList
Syntax
SapObject.SapModel.PropTendon.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of tendon property names retrieved by the program.
MyName
This is a one-dimensional array of tendon property names. The MyName array
is created as a dynamic, zero-based, array by the API user:
Dim MyName() as String
The array is dimensioned to (NumberNames - 1) inside the SAP2000 program,
filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined tendon properties in the model.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetTendonNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon properties


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)
ret = SapModel.PropTendon.SetProp("T2", Name, 1, 3.25)

'get tendon property names


ret = SapModel.PropTendon.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
Syntax
SapObject.SapModel.PropTendon.GetProp
VB6 Procedure
Function GetProp(ByVal Name As String, ByRef MatProp As String, ByRef
ModelingOption As Long, ByRef Area As Double, ByRef Color As Long, ByRef
Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing tendon property.
MatProp
The name of the material property assigned to the tendon property.
ModelingOption
This is either 1 or 2, indicating the tendon modeling option.
1 = Model tendon as loads
2 = Model tendon as elements
Area
The cross-sectional area of the tendon. [L2]
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves tendon property definition data.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetTendonProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MatProp As String
Dim ModelingOption As Long
Dim Area As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon property


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)

'get tendon property data


ret = SapModel.PropTendon.GetProp("T1", MatProp,
ModelingOption, Area, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetProp
SetProp
Syntax
SapObject.SapModel.PropTendon.SetProp
VB6 Procedure
Function SetProp(ByVal Name As String, ByVal MatProp As String, ByVal
ModelingOption As Long, ByVal Area As Double, Optional ByVal Color As Long
= -1, Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new tendon property. If this is an existing property,
that property is modified; otherwise, a new property is added.
MatProp
The name of the material property assigned to the tendon property.
ModelingOption
This is either 1 or 2, indicating the tendon modeling option.
1 = Model tendon as loads
2 = Model tendon as elements
Area
The cross-sectional area of the tendon. [L2]
Color
The display color assigned to the property. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property. If this item is
input as Default, the program assigns a GUID to the property.
Remarks
This function defines a tendon property.
The function returns zero if the property is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTendonProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_TENDON,
, , , , , MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270)

'set new tendon property


ret = SapModel.PropTendon.SetProp("T1", Name, 1, 2.25)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetProp
AddQuad
Syntax
SapObject.SapModel.SectCut.AddQuad
VB6 Procedure
Function AddQuad(ByVal Name As String, ByRef X() As Double, ByRef Y() As
Double, ByRef Z() As Double) As Long
Parameters
Name
The name of an existing section cut.
GroupName

X
This is an array of four X coordinates, one for each of the four points defining
the quadrilateral.
Y
This is an array of four Y coordinates, one for each of the four points defining
the quadrilateral.
Z
This is an array of four Z coordinates, one for each of the four points defining
the quadrilateral.
Remarks
This function adds a new quadrilateral to a section cut defined by quadrilaterals.
The function returns zero if the quadrilateral is successfully, otherwise it returns
a nonzero value.
VBA Example
Sub AddSectionCutQuad()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim X(3) As Double
Dim Y(3) As Double
Dim Z(3) As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("2", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("3", "Group1")

'define section cut


X(0) = -300
X(1) = -270
X(2) = -270
X(3) = -300
Y(0) = 10
Y(1) = 10
Y(2) = -10
Y(3) = -10
Z(0) = 10
Z(1) = 10
Z(2) = 10
Z(3) = 10
ret = SapModel.SectCut.SetByQuad("SCut1", "Group1", 1, X,
Y, Z)

'add a second quadrilateral


X(0) = 270
X(1) = 300
X(2) = 300
X(3) = 270
Y(0) = 10
Y(1) = 10
Y(2) = -10
Y(3) = -10
Z(0) = 10
Z(1) = 10
Z(2) = 10
Z(3) = 10
ret = SapModel.SectCut.AddQuad("SCut1", X, Y, Z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetByQuad
GetCutInfo
Syntax
SapObject.SapModel.SectCut.GetCutInfo
VB6 Procedure
Function GetCutInfo(ByVal Name As String, ByRef GroupName As String,
ByRef MyType As Long , ByRef Num As Long) As Long
Parameters

Name
The name of an existing section cut.
GroupName
The name of the group associated with the section cut.
MyType
This is either 1, 2, 3 or 4 indicating the result type of the section cut.
1= Analysis
2= Design Wall
3= Design Spandrel
4= Design Slab

Num
The number of quadrilateral cutting planes defined for the section cut. If this
number is zero then the section cut is defined by the associated group.
Remarks
This function gets basic information about an existing section cut.
The function returns zero if the section cut information is successfully obtained,
otherwise it returns a nonzero value.
VBA Example
Sub GetSectionCutInfo()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim GroupName As String
Dim MyType As Long
Dim Num As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)
'get basic section cut information
ret = SapModel.SectCut.GetCutInfo ("SCut1", GroupName,
MyType, Num)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetLocalAxisAdvancedAnalysis
Syntax
SapObject.SapModel.SectCut.GetLocalAxesAdvancedAnalysis
VB6 Procedure
Function GetLocalAxesAdvancedAnalysis(ByVal Name As String, ByRef Active
As Boolean, ByRef AxVectOpt As Long, ByRef AxCSys As String, ByRef axdir()
As Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByRef Plane2 As
Long, ByRef PlVectOpt As Long, ByRef PlCSys As String, ByRef PlDir() As
Long, ByRef PlPt() As String, ByRef PlVect() As Double) As Long
Parameters

Name
The name of an existing section cut.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2 or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector

AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB

AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, 0r 3-2 plane. This item
applies only when the Active item is True.
Remarks
This function gets the advanced local axes data for an existing section cut
whose result type is Analysis.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSectionCutLocalAxesAdvancedAnalysis()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Active As Boolean
Dim AxVectOpt As Long
Dim AxCSys As String
Dim MyAxDir() As Long
Dim MyAxPt() As String
Dim MyAxVect() As Double
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim MyPlDir() As Long
Dim MyPlPt() As String
Dim MyPlVect() As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")
'add objects to group
ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'set section cut advanced local axes data


Redim MyAxDir(1)
Redim MyAxPt(1)
Redim MyAxVect(2)
Redim MyPlDir(1)
Redim MyPlPt(1)
Redim MyPlVect(2)
MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret =
SapModel.SectCut.SetLocalAxesAdvancedAnalysis("SCut1",
True, 3, "Global", MyAxDir, MyAxPt, MyAxVect, 12, 1,
"Global", MyPlDir, MyPlPt, MyPlVect)

'get section cut advanced local axes data


ret =
SapModel.SectCut.GetLocalAxesAdvancedAnalysis("SCut1",
Active, AxVectOpt, AxCSys, MyAxDir, MyAxPt, MyAxVect,
Plane2, PlVectOpt, PlCSys, MyPlDir, MyPlPt, MyPlVect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetLocalAxesAnalysis
GetLocalAxesAnalysys
Syntax
SapObject.SapModel.SectCut.GetLocalAxesAnalysis
VB6 Procedure
Function GetLocalAxesAnalysis(ByVal Name As String, ByRef Z As Double,
ByRef Y As Double, ByRef X As Double, ByRef IsAdvanced As Boolean) As
Long
Parameters
Name
The name of an existing section cut.
Z
The Rotation about the Z axis.
Y
The rotation about the Y' axis where Y' is the orientation of the Y axis after
rotation about the Z axis.
X
The rotation about the X'' axis where X'' is the orientation of the X axis after
rotation about the Z axis and about the Y' axis.
IsAdvanced
Indicates if advanced local axes are specified.
Remarks
This function gets the local axes angles for an existing section cut whose result
type is Analysis.
The function returns zero if the angles are successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSectionCutLocalAxesAnalysis()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Z As Double
Dim Y As Double
Dim X As Double
Dim IsAdvanced As Boolean

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)
'set section cut local axes angles
ret = SapModel.SectCut.SetLocalAxesAnalysis ("SCut1", 10,
20, 30)

'get section cut local axes data


ret = SapModel.SectCut.GetLocalAxesAnalysis ("SCut1",Z,
Y, X, IsAdvanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetLocalAxesAdvancedAnalysis
GetLocalAxesAngleDesign
Syntax
SapObject.SapModel.SectCut.GetLocalAxesAngleDesign
VB6 Procedure
Function GetLocalAxesAngleDesign(ByVal Name As String, ByRef Angle As
Double) As Long
Parameters
Name
The name of an existing section cut.
Angle
For design local axes orientation type wall this is the angle from the global X to
the local 2 axis. For orientation types spandrel and slab it is the angle from the
global X to the local 1 axis.
Remarks
This function gets the local axes angle for section cuts whose result type is
Design (Wall, Spandrel or Slab).
The function returns zero if the angle is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSectionCutLocalAxesAngleDesign ()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Angle As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut with result type of Design -


Wall
ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 2)

'set section cut local axes angle


ret = SapModel.SectCut.SetLocalAxesAngleDesign("SCut1",
24)

'get section cut local axes angle


ret = SapModel.SectCut.GetLocalAxesAngleDesign("SCut1",
Angle)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetNameList
Syntax
SapObject.SapModel.SectCut. GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of section cut names retrieved by the program.
MyName
This is a one-dimensional array of section cut names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined section cuts.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetSectionCutNames()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'get section cut names


ret = SapModel.SectCut.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetQuad
Syntax
SapObject.SapModel.SectCut.GetQuad
VB6 Procedure
Function AddQuad(ByVal Name As String, ByVal Num As Long, ByRef X() As
Double, ByRef Y() As Double, ByRef Z() As Double) As Long
Parameters
Name
The name of an existing section cut defined using quadrilateral cutting planes.
Num
The number of a quadirilateral cutting plane in the section cut.
GroupName
X
This is an array of four X coordinates, one for each of the four points defining
the quadrilateral.
Y
This is an array of four Y coordinates, one for each of the four points defining
the quadrilateral.
Z
This is an array of four Z coordinates, one for each of the four points defining
the quadrilateral.
Remarks
This function returns the coordinates of a quadrilateral cutting plane in a section
cut defined by quadrilaterals.
The function returns zero if the coordinates are successfully returned, otherwise
it returns a nonzero value.
VBA Example
Sub GetSectionCutQuad()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim X() As Double
Dim Y() As Double
Dim Z() As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("2", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("3", "Group1")

'define section cut


Redim X(3)
Redim Y(3)
Redim Z(3)
X(0) = -300
X(1) = -270
X(2) = -270
X(3) = -300
Y(0) = 10
Y(1) = 10
Y(2) = -10
Y(3) = -10
Z(0) = 10
Z(1) = 10
Z(2) = 10
Z(3) = 10
ret = SapModel.SectCut.SetByQuad("SCut1", "Group1", 1, X,
Y, Z)

'add a second quadrilateral


X(0) = 270
X(1) = 300
X(2) = 300
X(3) = 270
Y(0) = 10
Y(1) = 10
Y(2) = -10
Y(3) = -10
Z(0) = 10
Z(1) = 10
Z(2) = 10
Z(3) = 10
ret = SapModel.SectCut.AddQuad("SCut1", X, Y, Z)

'get coordinates of quadrilateral 2


ret = SapModel.SectCut.GetQuad("SCut1", 2, X, Y, Z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetResultLocation
Syntax
SapObject.SapModel.SectCut.GetResultLocation
VB6 Procedure
Function GetResultLocation(ByVal Name As String, ByRef IsDefault As
Boolean, ByRef X As Double, ByRef Y As Double, ByRef Z As Double) As Long
Parameters
Name
The name of an existing section cut.
IsDefault
Indicates if the section cut results are reported at the default location. If so, the
X, Y and Z items are ignored.
X
The X coordinate of the section cut result location when it is not default
Y
The Y coordinate of the section cut result location when it is not default
Z
The Z coordinate of the section cut result location when it is not default
Remarks
This function gets the results location for an existing section cut.
The function returns zero if the result location is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetSectionCutResultsLocation()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim IsDefault As Boolean
Dim X As Double
Dim Y As Double
Dim Z As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'set section cut result location


ret = SapModel.SectCut.SetResultLocation("SCut1", False,
-288, 0, 10)
'get section cut result location
ret = SapModel.SectCut.GetResultLocation("SCut1",
IsDefault, X, Y, Z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetResultsSide
Syntax
SapObject.SapModel.SectCut.GetResultsSide
VB6 Procedure
Function GetResultsSide(ByVal Name As String, ByRef Side As Long) As Long
Parameters
Name
The name of an existing section cut.
Side
This item is either 1 or 2 and indicates the side of the elements from which
section cut results are obtained.
For section cuts defined from quadrilaterals with an Analysis result type:
1 = Positive 3-axis side of quadrilateral
2 = Negative 3-axis side of quadrilateral

For section cuts with a Design Wall result type:


1 = Top
2 = Bottom

For section cuts with a Design Spandrel or Design Slab result type:
1 = Right
2 = Left
Remarks
This function gets the side of the elements from which results are obtained.
The function returns zero if the side is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSectionCutResultsSide()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Side As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut with result type of Design -


Wall
ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 2)

'set section cut results side


ret = SapModel.SectCut.SetResultsSide ("SCut1", 2)

'get section cut results side


ret = SapModel.SectCut.GetResultsSide ("SCut1", Side)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetByGroup
Syntax
SapObject.SapModel.SectCut.SetByGroup
VB6 Procedure
Function SetByGroup(ByVal Name As String, ByVal GroupName As String,
ByVal MyType As Long) As Long
Parameters
Name
The section cut name. If a section cut with this name already exists then the
section cut is reinitialized with the new data. All previous data assigned to the
section cut is lost. If a section cut with this name does not exist then a new
section cut is added.
GroupName
The name of the group on which the section cut is based.
MyType
This is either 1, 2, 3 or 4 indicating the result type of the section cut.
1= Analysis
2= Design Wall
3= Design Spandrel
4= Design Slab
Remarks
This function adds a new section cut defined by a group to the model or
reinitializes an existing section cut to be defined by a group.
The function returns zero if the section cut is successfully added or initialized,
otherwise it returns a nonzero value.
VBA Example
Sub SetSectionCutByGroup()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetByQuad
SetByQuad
Syntax
SapObject.SapModel.SectCut.SetByQuad
VB6 Procedure
Function SetByQuad(ByVal Name As String, ByVal GroupName As String, ByVal
MyType As Long, ByRef X() As Double, ByRef Y() As Double, ByRef Z() As
Double) As Long
Parameters
Name
The section cut name. If a section cut with this name already exists then the
section cut is reinitialized with the new data. All previous data assigned to the
section cut is lost. If a section cut with this name does not exist then a new
section cut is added.
GroupName
The name of the group associated with the section cut.
MyType
This is either 1, 2, 3 or 4 indicating the result type of the section cut.
1= Analysis
2= Design Wall
3= Design Spandrel
4= Design Slab
X
This is an array of four X coordinates, one for each of the four points defining
the quadrilateral.
Y
This is an array of four Y coordinates, one for each of the four points defining
the quadrilateral.
Z
This is an array of four Z coordinates, one for each of the four points defining
the quadrilateral.
Remarks
This function adds a new section cut defined by a quadrilateral to the model or
reinitializes an existing section cut to be defined by a quadrilateral.
The function returns zero if the section cut is successfully added or initialized,
otherwise it returns a nonzero value.
VBA Example
Sub SetSectionCutByQuad()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim X(3) As Double
Dim Y(3) As Double
Dim Z(3) As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("2", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("3", "Group1")

'define section cut


X(0) = -300
X(1) = 300
X(2) = 300
X(3) = -300
Y(0) = 10
Y(1) = 10
Y(2) = -10
Y(3) = -10
Z(0) = 10
Z(1) = 10
Z(2) = 10
Z(3) = 10
ret = SapModel.SectCut.SetByQuad("SCut1", "Group1", 1, X,
Y, Z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetByGroup
AddQuad
SetLocalAxisAdvancedAnalysis
Syntax
SapObject.SapModel.SectCut.SetLocalAxesAdvancedAnalysis
VB6 Procedure
Function SetLocalAxesAdvancedAnalysis(ByVal Name As String, ByVal Active
As Boolean, ByVal AxVectOpt As Long, ByVal AxCSys As String, ByRef axdir()
As Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByVal Plane2 As
Long, ByVal PlVectOpt As Long, ByVal PlCSys As String, ByRef PlDir() As Long,
ByRef PlPt() As String, ByRef PlVect() As Double) As Long
Parameters
Name
The name of an existing section cut.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2 or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector

AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB

AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, 0r 3-2 plane. This item
applies only when the Active item is True.
Remarks
This function sets the advanced local axes data for an existing section cut whose
result type is Analysis.
The function returns zero if the data is successfully set, otherwise it returns a nonzero
value.
VBA Example
Sub SetSectionCutLocalAxesAdvancedAnalysis()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'set section cut advanced local axes data


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.SectCut.SetLocalAxesAdvancedAnalysis("SCut1", True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir, MyPlPt,
MyPlVect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetLocalAxesAnalysis
SetLocalAxesAnalysis
Syntax
SapObject.SapModel.SectCut.SetLocalAxesAnalysis
VB6 Procedure
Function SetLocalAxesAnalysis(ByVal Name As String, ByVal Z As Double,
ByVal Y As Double, ByVal X As Double) As Long
Parameters
Name
The name of an existing section cut.
Z
The Rotation about the Z axis.
Y
The rotation about the Y' axis where Y' is the orientation of the Y axis after
rotation about the Z axis.
X
The rotation about the X'' axis where X'' is the orientation of the X axis after
rotation about the Z axis and about the Y' axis.
Remarks
This function sets the local axes angles for an existing section cut whose result
type is Analysis.
The function returns zero if the angles are successfully set, otherwise it returns
a nonzero value.
VBA Example
Sub SetSectionCutLocalAxesAnalysis()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'set section cut local axes angles


ret = SapModel.SectCut.SetLocalAxesAnalysis ("SCut1", 10,
20, 30)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetLocalAxesAdvancedAnalysis
SetLocalAxisAngleDesign
Syntax
SapObject.SapModel.SectCut.SetLocalAxesAngleDesign
VB6 Procedure
Function SetLocalAxesAngleDesign(ByVal Name As String, ByVal Angle As
Double) As Long
Parameters
Name
The name of an existing section cut.
Angle
For design local axes orientation type wall this is the angle from the global X to
the local 2 axis. For orientation types spandrel and slab it is the angle from the
global X to the local 1 axis.
Remarks
This function sets the local axes angle for section cuts whose result type is
Design (Wall, Spandrel or Slab).
The function returns zero if the angle is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSectionCutLocalAxesAngleDesign ()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut with result type of Design -


Wall
ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 2)

'set section cut local axes angle


ret = SapModel.SectCut.SetLocalAxesAngleDesign("SCut1",
24)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetResultLocation
Syntax
SapObject.SapModel.SectCut.SetResultLocation
VB6 Procedure
Function SetResultLocation(ByVal Name As String, ByVal IsDefault As Boolean,
Optional ByVal X As Double = 0, Optional ByVal Y As Double = 0, Optional ByVal
Z As Double = 0) As Long
Parameters
Name
The name of an existing section cut.
IsDefault
Indicates if the section cut results are reported at the default location. If so, the
X, Y and Z items are ignored.
X
The X coordinate of the section cut result location when it is not default
Y
The Y coordinate of the section cut result location when it is not default
Z
The Z coordinate of the section cut result location when it is not default
Remarks
This function sets the results location for an existing section cut.
The function returns zero if the result location is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetSectionCutResultsLocation()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'set section cut result location


ret = SapModel.SectCut.SetResultLocation("SCut1", False,
-288, 0, 10)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetResultsSide
Syntax
SapObject.SapModel.SectCut.SetResultsSide
VB6 Procedure
Function SetResultsSide(ByVal Name As String, ByVal Side As Long) As Long
Parameters
Name
The name of an existing section cut.
Side
This item is either 1 or 2 and indicates the side of the elements from which
section cut results are obtained.
For section cuts defined from quadrilaterals with an Analysis result type:
1 = Positive 3-axis side of quadrilateral
2 = Negative 3-axis side of quadrilateral

For section cuts with a Design Wall result type:


1 = Top
2 = Bottom

For section cuts with a Design Spandrel or Design Slab result type:
1 = Right
2 = Left
Remarks
This function sets the side of the elements from which results are obtained.
The function returns zero if the side is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSectionCutResultsSide()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut with result type of Design -


Wall
ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 2)

'set section cut results side


ret = SapModel.SectCut.SetResultsSide ("SCut1", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
AddByCoord
Syntax
SapObject.SapModel.AreaObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByVal NumberPoints As long, ByRef x() As Double,
ByRef y() As Double, ByRef z() As Double, ByRef Name As String, Optional
ByVal PropName As String = "Default", Optional ByVal UserName As String = "",
Optional ByVal CSys As String = "Global") As Long
Parameters
NumberPoints
The number of points in the area abject.
x, y, z
These are arrays of x, y and z coordinates, respectively, for the corner points of
the area object. The coordinates are in the coordinate system defined by the
CSys item. The coordinates should be ordered to run clockwise or counter
clockwise around the area object.
Name
This is the name that the program ultimately assigns to the area object. If no
UserName is specified, the program assigns a default name to the area object.
If a UserName is specified and that name is not used for another area object,
the UserName is assigned to the area object; otherwise a default name is
assigned to the area object.
PropName
This is Default, None or the name of a defined area property.
If it is Default, the program assigns a default area property to the area object. If
it is None, no area property is assigned to the area object. If it is the name of a
defined area property, that property is assigned to the area object.
UserName
This is an optional user specified name for the area object. If a UserName is
specified and that name is already used for another area object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the area object point coordinates
are defined.
Remarks
This function adds a new area object, defining points at the specified
coordinates.
The function returns zero if the area object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddAreaObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewBlank

'add area object by coordinates


ReDim x(5)
ReDim y(5)
ReDim z(5)
x(0) = 50: y(0) = 0
x(1) = 100: y(1) = 0
x(2) = 150: y(2) = 40
x(3) = 100: y(3) = 80
x(4) = 50: y(4) = 80
x(5) = 0: y(5) = 40
ret = SapModel.AreaObj.AddByCoord(6, x, y, z, Name)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
AddByPoint
Syntax
SapObject.SapModel.AreaObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByVal NumberPoints as Long, ByRef Point() as String,
ByRef Name As String, Optional ByVal PropName As String = "Default",
Optional ByVal UserName As String = "") As Long
Parameters
NumberPoints
The number of points in the area abject.
Point
This is an array containing the names of the point objects that define the added
area object. The point object names should be ordered to run clockwise or
counter clockwise around the area object.
Name
This is the name that the program ultimately assigns for the area object. If no
UserName is specified, the program assigns a default name to the area object.
If a UserName is specified and that name is not used for another area object,
the UserName is assigned to the area object; otherwise a default name is
assigned to the area object.
PropName
This is Default, None or the name of a defined area property.
If it is Default, the program assigns a default area property to the area object. If
it is None, no area property is assigned to the area object. If it is the name of a
defined area property, that property is assigned to the area object.
UserName
This is an optional user specified name for the area object. If a UserName is
specified and that name is already used for another area object, the program
ignores the UserName.
Remarks
This function adds a new area object whose defining points are specified by
name.
The function returns zero if the area object is successfully added; otherwise it
returns a nonzero value.
VBA Example
Sub AddAreaObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add area object by points


Redim Point(3)
Point(0) = "1"
Point(1) = "4"
Point(2) = "5"
Point(3) = "2"
ret = SapModel.AreaObj.AddByPoint(4, Point, Name)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
ChangeName
Syntax
SapObject.SapModel.AreaObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined area object.
NewName
The new name for the area object.
Remarks
This function applies a new name to an area object.
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangeAreaObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'change name
ret = SapModel.AreaObj.ChangeName("1", "MyArea")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.AreaObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns a count of the area objects in the model.
VBA Example
Sub CountAreaObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'return number of area objects


Count = SapModel.AreaObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.AreaObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the area object specified by the Name item is deleted.
If this item is Group, all of the area objects in the group specified by the Name
item are deleted.
If this item is SelectedObjects, all of the selected area objects are deleted, and
the Name item is ignored.
Remarks
The function deletes area objects.
The function returns zero if the area objects are successfully deleted; otherwise
it returns a nonzero value.
VBA Example
Sub DeleteAreaObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'delete area object


ret = SapModel.AreaObj.Delete("4")

'update view
ret = SapModel.View.RefreshView(0, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteLoadGravity
Syntax
SapObject.SapModel.AreaObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects,the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified area objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object gravity loads


ret = SapModel.AreaObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete area object gravity load


ret = SapModel.AreaObj.DeleteLoadGravity("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadPorePressure
Syntax
SapObject.SapModel.AreaObj.DeleteLoadPorePressure
VB6 Procedure
Function DeleteLoadPorePressure(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the pore pressure load assignments to the specified area
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object pore pressure load


ret = SapModel.AreaObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'delete area object pore pressure load


ret = SapModel.AreaObj.DeleteLoadPorePressure("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
SetLoadPorePressure
DeleteLoadRotate
Syntax
SapObject.SapModel.AreaObj.DeleteLoadRotate
VB6 Procedure
Function DeleteLoadRotate(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the rotate load assignments to the specified area objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectRotateLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object rotate load


ret = SapModel.AreaObj.SetLoadRotate("ALL", "DEAD", 30, ,
Group)

'delete area object rotate load


ret = SapModel.AreaObj.DeleteLoadRotate("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadRotate
SetLoadRotate
DeleteLoadStrain
Syntax
SapObject.SapModel.AreaObj.DeleteLoadStrain
VB6 Procedure
Function DeleteLoadStrain(ByVal Name As String, ByVal LoadPat As String,
ByVal Component As Long, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Component
This is 1, 2, 3, 4, 5, 6, 7, 8, or 9, indicating the component to which the strain
load is applied.
1= Strain11
2= Strain12
3= Strain13
4= Curvature11
5= Curvature22
6= Curvature33
7= Strain13
8= Strain23
9= Strain33
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the strain load assignments to the specified area objects,
for the specified load pattern, for the specified components.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object strain load


ret = SapModel.AreaObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'delete area object strain load


ret = SapModel.AreaObj.DeleteLoadStrain("3", "DEAD", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added Strain33 component in v19.0.0.
See Also
GetLoadStrain
SetLoadStrain
DeleteLoadSurfacePressure
Syntax
SapObject.SapModel.AreaObj.DeleteLoadSurfacePressure
VB6 Procedure
Function DeleteLoadSurfacePressure(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the surface pressure load assignments to the specified
area objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object surface pressure load


ret = SapModel.AreaObj.SetLoadSurfacePressure("ALL", "DEAD",
-1, .1, , , Group)

'delete area object surface pressure load


ret = SapModel.AreaObj.DeleteLoadSurfacePressure("3",
"DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
SetLoadSurfacePressure
DeleteLoadTemperature
Syntax
SapObject.SapModel.AreaObj.DeleteLoadTemperature
VB6 Procedure
Function DeleteLoadTemperature(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the temperature load assignments to the specified area
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object temperature load


ret = SapModel.AreaObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'delete area object temperature load


ret = SapModel.AreaObj.DeleteLoadTemperature("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
SetLoadTemperature
DeleteLoadUniform
Syntax
SapObject.SapModel.AreaObj.DeleteLoadUniform
VB6 Procedure
Function DeleteLoadUniform(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the uniform load assignments to the specified area objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectUniformLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object uniform loads


ret = SapModel.AreaObj.SetLoadUniform("ALL", "DEAD", -0.01,
2, False, "Local", Group)

'delete area object uniform load


ret = SapModel.AreaObj.DeleteLoadUniform("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniform
SetLoadUniform
DeleteLoadUniformToFrame
Syntax
SapObject.SapModel.AreaObj.DeleteLoadUniformToFrame
VB6 Procedure
Function DeleteLoadUniformToFrame(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the uniform to frame load assignments to the specified
area objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectUniformToFrameLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 288, 2,
288)

'assign area object uniform to frame loads


ret = SapModel.AreaObj.SetLoadUniformToFrame("ALL", "DEAD",
0.01, 10, 2, False, "Global", Group)

'delete area object uniform to frame load


ret = SapModel.AreaObj.DeleteLoadUniformToFrame("8", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniformToFrame
SetLoadUniformToFrame
DeleteLoadWindPressure
Syntax
SapObject.SapModel.AreaObj.DeleteLoadWindPressure
VB6 Procedure
Function DeleteLoadWindPressure(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the area object
specified by the Name item.
If this item is Group, the load assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
area objects, and the Name item is ignored.
Remarks
This function deletes the wind pressure load assignments to the specified area
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectWindPressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object wind pressure load


ret = SapModel.AreaObj.SetLoadWindPressure("ALL", "DEAD", 1,
0.8, Group)

'delete area object wind pressure load


ret = SapModel.AreaObj.DeleteLoadWindPressure("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadWindPressure
SetLoadWindPressure
DeleteMass
Syntax
SapObject.SapModel.AreaObj.DeleteMass
VB6 Procedure
Function DeleteMass(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the mass assignments are deleted for the area object
specified by the Name item.
If this item is Group, the mass assignments are deleted for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, the mass assignments are deleted for all
selected area objects, and the Name item is ignored.
Remarks
This function deletes the mass assignments for area objects.
The function returns zero if the mass assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object mass


ret = SapModel.AreaObj.SetMass("ALL", .0001, False, Group)

'delete area object mass


ret = SapModel.AreaObj.DeleteMass("1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
SetMass
DeleteModifiers
Syntax
SapObject.SapModel.AreaObj.DeleteModifiers
VB6 Procedure
Function DeleteModifiers(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the modifier assignments are deleted for the area object
specified by the Name item.
If this item is Group, the modifier assignments are deleted for all area objects in
the group specified by the Name item.
If this item is SelectedObjects, the modifier assignments are deleted for all
selected area objects, and the Name item is ignored.
Remarks
This function deletes the modifier assignments for area objects.
The function returns zero if the modifier assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectsModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(0) = 0.01
ret = SapModel.AreaObj.SetModifiers("ALL", Value, Group)

'delete modifiers
ret = SapModel.AreaObj.DeleteModifiers("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
SetModifiers
DeleteSpring
Syntax
SapObject.SapModel.AreaObj.DeleteSpring
VB6 Procedure
Function DeleteSpring(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the spring assignments are deleted for the area object
specified by the Name item.
If this item is Group, the spring assignments are deleted for all area objects in
the group specified by the Name item.
If this item is SelectedObjects, the spring assignments are deleted for all
selected area objects, and the Name item is ignored.
Remarks
This function deletes all spring assignments for the specified area objects.
The function returns zero if the assignments are successfully deleted; otherwise
it returns a nonzero value.
VBA Example
Sub DeleteAreaObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign springs to area objects


ReDim Vec(2)
ret = SapModel.AreaObj.SetSpring("ALL", 1, 1, 1, "", -1, 1,
3, True, Vec, 0, False, "Local", Group)

'delete springs
ret = SapModel.AreaObj.DeleteSpring("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
SetSpring
GetAutoMesh
Syntax
SapObject.SapModel.AreaObj.GetAutoMesh
VB6 Procedure
Function GetAutoMesh(ByVal Name As String, ByRef MeshType As Long,
ByRef n1 As Long, ByRef n2 As Long, ByRef MaxSize1 As Double, ByRef
MaxSize2 As Double, ByRef PointOnEdgeFromLine As Boolean, ByRef
PointOnEdgeFromPoint As Boolean, ByRef ExtendCookieCutLines As Boolean,
ByRef Rotation As Double, ByRef MaxSizeGeneral As Double, ByRef
LocalAxesOnEdge As Boolean, ByRef LocalAxesOnFace As Boolean, ByRef
RestraintsOnEdge As Boolean, ByRef RestraintsOnFace As Boolean, ByRef
Group As String, ByRef SubMesh As Boolean, ByRef SubMeshSize As Double)
As Long
Parameters
Name
The name of an existing area object.
MeshType
This item is 0, 1, 2, 3, 4, 5 or 6, indicating the automatic mesh type for the area
object.
0= No automatic meshing
1= Mesh area into a specified number of objects
2= Mesh area into objects of a specified maximum size
3= Mesh area based on points on area edges
4= Cookie cut mesh area based on lines intersecting edges
5= Cookie cut mesh area based on points
6= Mesh area using General Divide Tool

Mesh options 1, 2 and 3 apply to quadrilaterals and triangles only.


n1
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 2.
n2
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 3.
MaxSize1
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 2. [L]
MaxSize2
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 3. [L]
PointOnEdgeFromLine
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from intersections of straight line objects included in the
group specified by the Group item with the area object edges.
PointOnEdgeFromPoint
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from point objects included in the group specified by the
Group item that lie on the area object edges.
ExtendCookieCutLines
This item applies when MeshType = 4. MeshType = 4 provides cookie cut
meshing based on straight line objects included in the group specified by the
Group item that intersect the area object edges. If the ExtendCookieCutLines
item is True, all straight line objects included in the group specified by the Group
item are extended to intersect the area object edges for the purpose of meshing
the area object.
Rotation
This item applies when MeshType = 5. MeshType = 5 provides cookie cut
meshing based on two perpendicular lines passing through point objects included
in the group specified by the Group item. By default these lines align with the
area object local 1 and 2 axes. The Rotation item is an angle in degrees that the
meshing lines are rotated from their default orientation. [deg]
MaxSizeGeneral
This item applies when MeshType = 6. It is the maximum size of objects created
by the General Divide Tool.
LocalAxesOnEdge
If this item is True, and if both points along an edge of the original area object
have the same local axes, the program makes the local axes for added points
along the edge the same as the edge end points.
LocalAxesOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same local axes, the program makes the local axes for all added
points the same as the perimeter points.
RestraintsOnEdge
If this item is True, and if both points along an edge of the original area object
have the same restraint/constraint, then, if the added point and the adjacent
corner points have the same local axes definition, the program includes the
restraint/constraint for added points along the edge.
RestraintsOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same restraint/constraint, then, if an added point and the
perimeter points have the same local axes definition, the program includes the
restraint/constraint for the added point.
Group
The name of a defined group. Some of the meshing options make use of point
and line objects included in this group.
SubMesh
If this item is True, after initial meshing, the program further meshes any area
objects that have an edge longer than the length specified by the SubMeshSize
item.
SubMeshSize
This item applies when the SubMesh item is True. It is the maximum size of area
objects to remain when the auto meshing is complete. [L]
Remarks
This function retrieves the automatic meshing assignments to area objects.
The function returns zero if the meshing assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MeshType As Long
Dim n1 As Long
Dim n2 As Long
Dim MaxSize1 As Double
Dim MaxSize2 As Double
Dim PointOnEdgeFromLine As Boolean
Dim PointOnEdgeFromPoint As Boolean
Dim ExtendCookieCutLines As Boolean
Dim Rotation As Double
Dim MaxSizeGeneral As Double
Dim LocalAxesOnEdge As Boolean
Dim LocalAxesOnFace As Boolean
Dim RestraintsOnEdge As Boolean
Dim RestraintsOnFace As Boolean
Dim MyGroup As String
Dim SubMesh As Boolean
Dim SubMeshSize As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , True, , Group)
'get auto mesh options for area object
ret = SapModel.AreaObj.GetAutoMesh("1", MeshType, n1, n2,
MaxSize1, MaxSize2, PointOnEdgeFromLine, PointOnEdgeFromPoint,
ExtendCookieCutLines, Rotation, MaxSizeGeneral, LocalAxesOnEdge,
LocalAxesOnFace, RestraintsOnEdge, RestraintsOnFace, MyGroup,
SubMesh, SubMeshSize)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetAutoMesh
GetEdgeConstraint
Syntax
SapObject.SapModel.AreaObj.GetEdgeConstraint
VB6 Procedure
Function GetEdgeConstraint(ByVal Name As String, ByRef ConstraintExists As
Boolean) As Long
Parameters
Name
The name of an existing area object.
ConstraintExists
This item is True if an automatic edge constraint is generated by the program for
the area object in the analysis model.
Remarks
This function retrieves the generated edge constraint assignments to area
objects.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjEdgeConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintExists As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto edge constraint option


ret = SapModel.AreaObj.SetEdgeConstraint("ALL", True, Group)

'get auto edge constraint option


ret = SapModel.AreaObj.GetEdgeConstraint("1",
ConstraintExists)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetEdgeConstraint
GetElm
Syntax
SapObject.SapModel.AreaObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef nelm As Long, ByRef Elm() as
String) As Long
Parameters
Name
The name of an existing area object.
nelm
The number of area elements created from the specified area object.
Elm
An array that includes the name of a area element created from the specified
area object.
Remarks
This function retrieves the names of the area elements (analysis model area)
associated with a specified area object in the object-based model.
This function returns zero if the area element information is successfully
returned; otherwise it returns nonzero. An error occurs if the analysis model
does not currently exist.
VBA Example
Sub GetAreaElementInfoForAreaObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nelm As Long
Dim Elm() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get area element information


ret = SapModel.AreaObj.GetElm("1", nelm, Elm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.AreaObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing area object.
GUID
The GUID (Global Unique ID) for the specified area object.
Remarks
This function retrieves the GUID for the specified area object.
This function returns zero if the area object GUID is successfully retrieved;
otherwise, it returns nonzero.
VBA Example
Sub GetAreaObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set program created GUID


ret = SapObject.SapModel.AreaObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.AreaObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetLoadGravity
Syntax
SapObject.SapModel.AreaObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object gravity loads


ret = SapModel.AreaObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get area object gravity load


ret = SapModel.AreaObj.GetLoadGravity("3", NumberItems,
AreaName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadPorePressure
Syntax
SapObject.SapModel.AreaObj.GetLoadPorePressure
VB6 Procedure
Function GetLoadPorePressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of pore pressure loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
pore pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
pore pressure load.
Value
This is an array that includes the pore pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
pore pressure load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the pore pressure load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object pore pressure load


ret = SapModel.AreaObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'get area object pore pressure load


ret = SapModel.AreaObj.GetLoadPorePressure("ALL",
NumberItems, AreaName, LoadPat, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadPorePressure
DeleteLoadPorePressure
GetLoadRotate
Syntax
SapObject.SapModel.AreaObj.GetLoadRotate
VB6 Procedure
Function GetLoadRotate(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef Value() As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of rotate loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
rotate load.
LoadPat
This is an array that includes the name of the load pattern associated with each
rotate load.
Value
This is an array that includes the angular velocity value. [Cyc/T]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the rotate load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectRotateLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object rotate load


ret = SapModel.AreaObj.SetLoadRotate("ALL", "DEAD", 30, ,
Group)

'get area object rotate load


ret = SapModel.AreaObj.GetLoadRotate("ALL", NumberItems,
AreaName, LoadPat, Value, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadRotate
DeleteLoadRotate
GetLoadStrain
Syntax
SapObject.SapModel.AreaObj.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef Component()
As Long, ByRef Value() As Double, ByRef PatternName() As String, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Component
This is an array that includes 1, 2, 3, 4, 5, 6, 7, 8, or 9, indicating the component
associated with each strain load.
1= Strain11
2= Strain22
3= Strain12
4= Curvature11
5= Curvature22
6= Curvature12
7= Strain13
8= Strain23
9= Strain33
Value
This is an array that includes the strain value. [L/L] for Component = 1, 2, 3, 7, 8,
and 9, and [1/L] for Component = 4, 5 and 6
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to area objects.
The function returns zero if the strain load assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Component() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object strain load


ret = SapModel.AreaObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'get area object strain load


ret = SapModel.AreaObj.GetLoadStrain("3", NumberItems,
AreaName, LoadPat, Component, Value, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added Strain33 component in v19.0.0.
See Also
SetLoadStrain
DeleteLoadStrain
GetLoadSurfacePressure
Syntax
SapObject.SapModel.AreaObj.GetLoadSurfacePressure
VB6 Procedure
Function GetLoadSurfacePressure(ByVal Name As String, ByRef NumberItems
As Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
Face() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of surface pressure loads retrieved for the specified area
objects.
AreaName
This is an array that includes the name of the area object associated with each
surface pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
surface pressure load.
Face
This is an array that includes either -1, -2 or a nonzero, positive integer,
indicating the area object face to which the specified load assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from area object point n to area object point n + 1. For
example, edge face 2 is from area object point 2 to area object point 3.
Value
This is an array that includes the surface pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
surface pressure load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the surface pressure load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim Face() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object surface pressure load


ret = SapModel.AreaObj.SetLoadSurfacePressure("ALL", "DEAD",
-1, .1, , , Group)

'get area object surface pressure load


ret = SapModel.AreaObj.GetLoadSurfacePressure("ALL",
NumberItems, AreaName, LoadPat, Face, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadSurfacePressure
DeleteLoadSurfacePressure
GetLoadTemperature
Syntax
SapObject.SapModel.AreaObj.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
MyType
This is an array that includes either 1 or 3, indicating the type of temperature
load.
1 = Temperature
3 = Temperature gradient along local 3 axis
Value
This is an array that includes the temperature load value. [T] for MyType= 1 and
[T/L] for MyType= 3
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object temperature load


ret = SapModel.AreaObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'get area object temperature load


ret = SapModel.AreaObj.GetLoadTemperature("ALL",
NumberItems, AreaName, LoadPat, MyType, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTemperature
DeleteLoadTemperature
GetLoadUniform
Syntax
SapObject.SapModel.AreaObj.GetLoadUniform
VB6 Procedure
Function GetLoadUniform(ByVal Name As String, ByRef NumberItems As Long,
ByRef AreaName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef Dir() As Long, ByRef Value() As Double, Optional ByVal ItemType
As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of uniform loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
uniform load.
LoadPat
This is an array that includes the name of the coordinate system in which the
uniform load is specified.
CSys
This is an array that includes the name of the coordinate system associated with
each uniform load.
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Value
The uniform load value. [F/L2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the uniform load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectUniformLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim Dir() As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object uniform loads


ret = SapModel.AreaObj.SetLoadUniform("ALL", "DEAD", -0.01,
2, False, "Local", Group)

'get area object uniform load


ret = SapModel.AreaObj.GetLoadUniform("3", NumberItems,
AreaName, LoadPat, CSys, Dir, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadUniform
DeleteLoadUniform
GetLoadUniformToFrame
Syntax
SapObject.SapModel.AreaObj.GetLoadUniformToFrame
VB6 Procedure
Function GetLoadUniformToFrame(ByVal Name As String, ByRef NumberItems
As Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
CSys() As String, ByRef Dir() As Long, ByRef Value() As Double, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of uniform loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
uniform load.
LoadPat
This is an array that includes the name of the coordinate system in which the
uniform load is specified.
CSys
This is an array that includes the name of the coordinate system associated with
each uniform load.
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Value
The uniform load value. [F/L2]
DistType
This is either 1 or 2, indicating the load distribution type.
1 = One-way load distribution
2 = Two-way load distribution
One-way distribution is parallel to the area object local 1 axis. Two-way
distribution is parallel to the area object local 1 and 2 axes.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the uniform to frame load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectUniformToFrameLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim Dir() As Long
Dim Value() As Double
Dim DistType() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 288, 2,
288)

'assign area object uniform to frame loads


ret = SapModel.AreaObj.SetLoadUniformToFrame("ALL", "DEAD",
0.01, 10, 2, False, "Global", Group)

'get area object uniform to frame load


ret = SapModel.AreaObj.GetLoadUniformToFrame("3",
NumberItems, AreaName, LoadPat, CSys, Dir, Value, DistType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadUniformToFrame
DeleteLoadUniformToFrame
GetLoadWindPressure
Syntax
SapObject.SapModel.AreaObj.GetLoadWindPressure
VB6 Procedure
Function GetLoadWindPressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef AreaName() As String, ByRef LoadPat() As String, ByRef
MyType() As Double, ByRef Cp() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
NumberItems
The total number of wind pressure loads retrieved for the specified area objects.
AreaName
This is an array that includes the name of the area object associated with each
wind pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
wind pressure load.
MyType
This is an array that includes either 1 or 2, indicating the wind pressure type.
1 = Windward, pressure varies over height
2 = Other, pressure is constant over height
Cp
This is an array that includes the wind pressure coefficient value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the area object specified
by the Name item.
If this item is Group, the assignments are retrieved for all area objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected area
objects, and the Name item is ignored.
Remarks
This function retrieves the wind pressure load assignments to area objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectWindPressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim AreaName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Cp() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object wind pressure load


ret = SapModel.AreaObj.SetLoadWindPressure("ALL", "DEAD", 1,
0.8, Group)

'get area object wind pressure load


ret = SapModel.AreaObj.GetLoadWindPressure("ALL",
NumberItems, AreaName, LoadPat, MyType, Cp, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadWindPressure
DeleteLoadWindPressure
GetLocalAxes
Syntax
SapObject.SapModel.AreaObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double, ByRef
Advanced As Boolean) As Long
Parameters
Name
The name of an existing area object.
Ang
This is the angle that the local 1 and 2 axes are rotated about the positive local 3
axis from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +3 axis is pointing toward you. [deg]
Advanced
This item is True if the area object local axes orientation was obtained using
advanced local axes parameters.
Remarks
This function retrieves the local axis angle assignment for area objects.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAreaObjectLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double
Dim Advanced As boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get area object local axis angle


ret = SapModel.AreaObj.GetLocalAxes("3", Ang, Advanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetLocalAxesAdvanced
Syntax
SapObject.SapModel.AreaObj.GetLocalAxesAdvanced
VB6 Procedure
Function GetLocalAxesAdvanced(ByVal Name As String, ByRef Active As
Boolean, ByRef Plane2 As Long, ByRef PlVectOpt As Long, ByRef PlCSys As
String, ByRef PlDir() As Long, ByRef PlPt() As String, ByRef PlVect() As
Double) As Long
Parameters
Name
The name of an existing area object.
Active
This is True if advanced local axes exist.
Plane2
This is 31 or 32, indicating that the local plane determined by the plane
reference vector is the 3-1 plane or the 3-2 plane. This item applies only when
the Active item is True.
PlVectOpt
This is 1, 2, or 3, indicating the plane reference vector option. This item applies
only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
PlCSys
The coordinate system used to define the plane reference vector coordinate
directions and the plane user vector. This item applies when the Active item is
True and the PlVectOpt item is 1 or 3.
PlDir
This is an array dimensioned to 1 (2 integers) indicating the plane reference
vector primary and secondary coordinate directions, PlDir(0) and PlDir(1)
respectively, taken at the object center in the specified coordinate system and
used to determine the plane reference vector. This item applies when the Active
item is True and the PlVectOpt item is 1. Possible coordinate direction values
are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
PlPt
This is an array dimensioned to 1 (2 strings) indicating the labels of two joints
that define the plane reference vector. Either of these joints may be specified as
None to indicate the center of the specified object. If both joints are specified as
None, they are not used to define the plane reference vector. This item applies
when the Active item is True and the PlVectOpt item is 2.
PlVect
This is an array dimensioned to 2 (3 doubles) that defines the plane reference
vector. This item applies when the Active item is True and the PlVectOpt item is
3.
Remarks
This function retrieves the advanced local axes assignments to area objects.
The function returns zero if the advanced local axes assignments are retrieved
successfully; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double
Dim Ang As Double
Dim Advanced As Boolean
Dim Active As Boolean
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim PlDir() As Long
Dim PlPt() As String
Dim PlVect() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area advanced local axes


MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.AreaObj.SetLocalAxesAdvanced("3", True, 31,
1, "Global", MyPlDir, MyPlPt, MyPlVect)

'get area object local axis angle


ret = SapModel.AreaObj.GetLocalAxes("3", Ang, Advanced)
'get area advanced local axes data
If Advanced Then
ret = SapModel.AreaObj.GetLocalAxesAdvanced("3", Active,
Plane2, PlVectOpt, PlCSys, PlDir, PlPt, PlVect)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetLocalAxesAdvanced
SetLocalAxes
GetLocalAxes
GetMass
Syntax
SapObject.SapModel.AreaObj.GetMass
VB6 Procedure
Function GetMass(ByVal Name As String, ByRef MassOverL2 As Double) As
Long
Parameters
Name
The name of an existing area object.
MassOverL2
The mass per unit area assigned to the area object. [M/L2]
Remarks
This function retrieves the mass per unit area assignment for area objects.
The function returns zero if the mass assignment is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MassOverL2 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object mass


ret = SapModel.AreaObj.SetMass("ALL", .0001, False, Group)

'get area object mass assignment


ret = SapModel.AreaObj.GetMass("1", MassOverL2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMass
DeleteMass
GetMaterialOverwrite
Syntax
SapObject.SapModel.AreaObj.GetMaterialOverwrite
VB6 Procedure
Function GetMaterialOverwrite(ByVal Name As String, ByRef PropName As
String) As Long
Parameters
Name
The name of a defined area object.
PropName
This is None, indicating that no material overwrite exists for the specified area
object, or it is the name of an existing material property.
Remarks
This function retrieves the material overwrite assigned to an area object, if any.
The material property name is indicated as None if there is no material overwrite
assignment.
The function returns zero if the material overwrite assignment is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material overwrite


ret = SapModel.AreaObj.SetMaterialOverwrite("3", "A992Fy50")

'get material overwrite assignment


ret = SapModel.AreaObj.GetMaterialOverwrite("3", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMaterialOverwrite
GetMatTemp
Syntax
SapObject.SapModel.AreaObj.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing area object.
Temp
This is the material temperature value assigned to the area object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the area object is uniform over the object at the value specified
by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the area object may vary. The material temperature at each corner point
around the area object perimeter is equal to the specified temperature multiplied
by the pattern value at the associated point object. The material temperature at
other points in the area object is calculated by interpolation from the corner
points.
Remarks
This function retrieves the material temperature assignments to area objects.
The function returns zero if the material temperature assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material temperature


ret = SapModel.AreaObj.SetMatTemp("ALL", 50, , Group)

'get material temperature


ret = SapModel.AreaObj.GetMatTemp("3", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMatTemp
GetModifiers
Syntax
SapObject.SapModel.AreaObj.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing area object.
Value
This is an array of ten unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier
Remarks
This function retrieves the modifier assignment for area objects. The default
value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(0) = 0.01
ret = SapModel.AreaObj.SetModifiers("ALL", Value, Group)

'get modifiers
ReDim Value(9)
ret = SapModel.AreaObj.GetModifiers("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetModifiers
DeleteModifiers
GetNameList
Syntax
SapObject.SapModel.AreaObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of area object names retrieved by the program.
MyName
This is a one-dimensional array of area object names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined area objects.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetAreaObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get area object names


ret = SapModel.AreaObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOffsets
Syntax
SapObject.SapModel.AreaObj.GetOffsets
VB6 Procedure
Function GetOffsets(ByVal Name As String, ByRef OffsetType As Long, ByRef
OffsetPattern As String, ByRef OffsetPatternSF As Double, ByRef Offset() As
Double) As Long
Parameters
Name
The name of an existing area object.
OffsetType
This is 0, 1 or 2, indicating the joint offset type.
0 = No joint offsets
1 = User defined joint offsets specified by joint pattern
2 = User defined joint offsets specified by point

OffsetPattern
This item applies only when OffsetType = 1. It is the name of the defined joint
pattern that is used to calculate the joint offsets.
OffsetPatternSF
This item applies only when OffsetType = 1. It is the scale factor applied to the
joint pattern when calculating the joint offsets. [L]
Offset
This item applies only when OffsetType = 2. It is an array of joint offsets for each
of the points that define the area object. [L]
Remarks
This function retrieves the joint offset assignments for area objects.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectJointOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim OffsetType As Long
Dim OffsetPattern As String
Dim OffsetPatternSF As Double
Dim Offset() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign joint offsets


ReDim Offset(3)
For i = 0 To 3
Offset(i) = 12
Next i
ret = SapModel.AreaObj.SetOffsets("ALL", 2, "", 1, Offset,
Group)

'get joint offsets


ret = SapModel.AreaObj.GetOffsets("3", OffsetType,
OffsetPattern, OffsetPatternSF, Offset)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOffsets
GetPoints
Syntax
SapObject.SapModel.AreaObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef NumberPoints As Long,
ByRef Point() As String) As Long
Parameters
Name
The name of a defined area object.
NumberPoints
The number of point objects that define the area object.
Point
This is an array containing the names of the point objects that define the area
object. The point names are in order around the area object.
Remarks
This function retrieves the names of the point objects that define an area object.
The function returns zero if the point object names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get names of points


ret = SapModel.AreaObj.GetPoints("1", NumberPoints, Point)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.AreaObj.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined area object.
PropName
The name of the area property assigned to the area object. This item is None if
no area property is assigned to the area object.
Remarks
This function retrieves the area property assigned to an area object.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAreaObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'get area property


ret = SapModel.AreaObj.GetProperty("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetSelected
Syntax
Sap2000.AreaObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing area object.
Selected
This item is True if the specified area object is selected; otherwise it is False.
Remarks
This function retrieves the selected status for an area object.
The function returns zero if the selected status is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set all area objects selected


ret = SapModel.AreaObj.SetSelected("ALL", True, Group)

'get area object selected status


ret = SapModel.AreaObj.GetSelected("1", Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetSelectedEdge
SetSelectedEdge
GetSelectedEdge
Syntax
Sap2000.AreaObj.GetSelectedEdge
VB6 Procedure
Function GetSelectedEdge(ByVal Name As String, ByRef NumberEdges As
Long, ByRef Selected() As Boolean) As Long
Parameters
Name
The name of an existing area object.
NumberEdges
The number of edges in the specified area object.
Selected
This is an array of items that is True if the specified area object edge is
selected; otherwise it is False.
Selected(0) = Selected status for edge 1
Selected(1) = Selected status for edge 2
Selected(n) = Selected status for edge (n + 1)

This array is internally dimensioned by Sap2000 to (NumberEdges 1).


Remarks
This function retrieves the selected status for area object edges.
The function returns zero if the selected status is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectEdgesSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberEdges As Long
Dim Selected() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set area object edge selected


ret = SapModel.AreaObj.SetSelectedEdge("1", 2, True)
ret = SapModel.AreaObj.SetSelectedEdge("1", 3, True)

'get area object edge selected status


ret = SapModel.AreaObj.GetSelectedEdge("1", NumberEdges,
Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetSelected
SetSelectedEdge
GetSpring
Syntax
SapObject.SapModel.AreaObj.GetSpring
VB6 Procedure
Function GetSpring(ByVal Name As String, ByRef NumberSprings As Long,
ByRef MyType() As Long, ByRef s() As Double, ByRef SimpleSpringType() As
Long, ByRef LinkProp() As String, ByRef Face() As Long, ByRef
SpringLocalOneType() As Long, ByRef Dir() As Long, ByRef Outward() As
Boolean, ByRef VecX() As Double, ByRef VecY() As Double, ByRef VecZ() As
Double, ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing area object.
NumberSprings
The number of spring assignments made to the specified area object.
MyType
Each value in this array is either 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
Each value in this array is the simple spring stiffness per unit area of the
specified area object face. This item applies only when the corresponding
MyType = 1. [F/L3]
SimpleSpringType
Each value in this array is 1, 2 or 3, indicating the simple spring type. This item
applies only when the corresponding MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
Each value in this array is the name of the link property assigned to the spring.
This item applies only when the corresponding MyType = 2.
Face
Each value in this array is -1, -2 or a nonzero, positive integer, indicating the
area object face to which the specified spring assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from area object point n to area object point n + 1. For
example, edge face 2 is from area object point 2 to area object point 3.
SpringLocalOneType
Each value in this array is 1, 2 or 3, indicating the method used to specify the
spring positive local 1-axis orientation.
1 = Parallel to area object local axis
2 = Normal to specified area object face
3 = User specified direction vector
Dir
Each value in this array is 1, 2, 3, -1, -2 or -3, indicating the area object local
axis that corresponds to the positive local 1-axis of the spring. This item applies
only when the corresponding SpringLocalOneType = 1.
Outward
Each value in this array is True if the spring positive local 1 axis is outward from
the specified area object face. This item applies only when SpringLocalOneType
= 2.
VecX
Each value in this array is the X-axis or area object local 1-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecY
Each value in this array is the Y-axis or area object local 2-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecZ
Each value in this array is the X-axis or area object local 3-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
CSys
Each value in this array is Local (meaning the area object local coordinate
system) or the name of a defined coordinate system. This item is the coordinate
system in which the user specified direction vector, Vec, is specified. This item
applies only when the corresponding SpringLocalOneType = 3.
Ang
Each value in this array is the angle that the link local 2-axis is rotated from its
default orientation. This item applies only when the corresponding MyType = 2.
[deg]
Remarks
This function retrieves the spring assignments to an area object face.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double
Dim NumberSprings As Long
Dim MyType() As Long
Dim s() As Double
Dim SimpleSpringType() As Long
Dim LinkProp() As String
Dim Face() As Long
Dim SpringLocalOneType() As Long
Dim Dir() As Long
Dim Outward() As Boolean
Dim VecX() As Double
Dim VecY() As Double
Dim VecZ() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign springs to area objects


ReDim Vec(2)
ret = SapModel.AreaObj.SetSpring("ALL", 1, 1, 1, "", -1, 1,
3, True, Vec, 0, False, "Local", Group)

'get spring assignments to area objects


ret = SapModel.AreaObj.GetSpring("1", NumberSprings, MyType,
s, SimpleSpringType, LinkProp, Face, SpringLocalOneType, Dir,
Outward, VecX, VecY, VecZ, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSpring
DeleteSpring
GetThickness
Syntax
SapObject.SapModel.AreaObj.GetThickness
VB6 Procedure
Function GetThickness(ByVal Name As String, ByRef ThicknessType As Long,
ByRef ThicknessPattern As String, ByRef ThicknessPatternSF As Double,
ByRef Thickness() As Double) As Long
Parameters
Name
The name of an existing area object.
ThicknessType
This is 0, 1 or 2, indicating the thickness overwrite type.
0 = No thickness overwrites
1 = User defined thickness overwrites specified by joint pattern
2 = User defined thickness overwrites specified by point

ThicknessPattern
This item applies only when ThicknessType = 1. It is the name of the defined joint
pattern that is used to calculate the thicknesses.
ThicknessPatternSF
This item applies only when ThicknessType = 1. It is the scale factor applied to
the joint pattern when calculating the thicknesses. [L]
Thickness
This item applies only when ThicknessType = 2. It is an array of thicknesses at
each of the points that define the area object. [L]
Remarks
This function retrieves the thickness overwrite assignments for area objects.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectThicknessOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim ThicknessType As Long
Dim ThicknessPattern As String
Dim ThicknessPatternSF As Double
Dim Thickness() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign thickness overwrites


ReDim Thickness(3)
For i = 0 To 3
Thickness(i) = 11
Next i
ret = SapModel.AreaObj.SetThickness("ALL", 2, "", 1,
Thickness, Group)

'get thickness overwrites


ret = SapModel.AreaObj.GetThickness("3", ThicknessType,
ThicknessPattern, ThicknessPatternSF, Thickness)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetThickness
GetTransformationMatrix
Syntax
Sap2000.AreaObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing area object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the area object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the area object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system and the area object local coordinate system.
Remarks
The function returns zero if the area object transformation matrix is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetAreaObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'get area object transformation matrix


ReDim Value(8)
ret = SapModel.AreaObj.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetAutoMesh
Syntax
SapObject.SapModel.AreaObj.SetAutoMesh
VB6 Procedure
Function SetAutoMesh(ByVal Name As String, ByVal MeshType As Long,
Optional ByVal n1 As Long = 2, Optional ByVal n2 As Long = 2, Optional ByVal
MaxSize1 As Double = 0, Optional ByVal MaxSize2 As Double = 0, Optional
ByVal PointOnEdgeFromLine As Boolean = False, Optional ByVal
PointOnEdgeFromPoint As Boolean = False, Optional ByVal
ExtendCookieCutLines As Boolean = False, Optional ByVal Rotation As Double
= 0, Optional ByVal MaxSizeGeneral As Double = 0, Optional ByVal
LocalAxesOnEdge As Boolean = False, Optional ByVal LocalAxesOnFace As
Boolean = False, Optional ByVal RestraintsOnEdge As Boolean = False,
Optional ByVal RestraintsOnFace As Boolean = False, Optional ByVal Group As
String = "ALL", Optional ByVal SubMesh As Boolean = False, Optional ByVal
SubMeshSize As Double = 0, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
MeshType
This item is 0, 1, 2, 3, 4, 5 or 6, indicating the automatic mesh type for the area
object.
0= No automatic meshing
1= Mesh area into a specified number of objects
2= Mesh area into objects of a specified maximum size
3= Mesh area based on points on area edges
4= Cookie cut mesh area based on lines intersecting edges
5= Cookie cut mesh area based on points
6= Mesh area using General Divide Tool

Mesh options 1, 2 and 3 apply to quadrilaterals and triangles only.


n1
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 2.
n2
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed area object that runs from point 1 to point 3.
MaxSize1
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 2. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize2
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed area object that runs from point 1 to point 3. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
PointOnEdgeFromLine
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from intersections of straight line objects included in the
group specified by the Group item with the area object edges.
PointOnEdgeFromPoint
This item applies when MeshType = 3. If it is True, points on the area object
edges are determined from point objects included in the group specified by the
Group item that lie on the area object edges.
ExtendCookieCutLines
This item applies when MeshType = 4. MeshType = 4 provides cookie cut
meshing based on straight line objects included in the group specified by the
Group item that intersect the area object edges. If the ExtendCookieCutLines
item is True, all straight line objects included in the group specified by the Group
item are extended to intersect the area object edges for the purpose of meshing
the area object.
Rotation
This item applies when MeshType = 5. MeshType = 5 provides cookie cut
meshing based on two perpendicular lines passing through point objects included
in the group specified by the Group item. By default these lines align with the
area object local 1 and 2 axes. The Rotation item is an angle in degrees that the
meshing lines are rotated from their default orientation. [deg]
MaxSizeGeneral
This item applies when MeshType = 6. It is the maximum size of objects created
by the General Divide Tool.
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
LocalAxesOnEdge
If this item is True, and if both points along an edge of the original area object
have the same local axes, then the program makes the local axes for added
points along the edge the same as the edge end points.
LocalAxesOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same local axes, the program makes the local axes for all added
points the same as the perimeter points.
RestraintsOnEdge
If this item is True, and if both points along an edge of the original area object
have the same restraint/constraint, then, if the added point and the adjacent
corner points have the same local axes definition, the program includes the
restraint/constraint for added points along the edge.
RestraintsOnFace
If this item is True, and if all points around the perimeter of the original area
object have the same restraint/constraint, then, if an added point and the
perimeter points have the same local axes definition, the program includes the
restraint/constraint for the added point.
Group
The name of a defined group. Some of the meshing options make use of point
and line objects included in this group.
SubMesh
If this item is True, after initial meshing, the program further meshes any area
objects that have an edge longer than the length specified by the SubMeshSize
item.
SubMeshSize
This item applies when the SubMesh item is True. It is the maximum size of area
objects to remain when the auto meshing is complete. [L]
If this item is input as 0, the default value is used. The default value is 12 inches
if the database units are English or 30 centimeters if the database units are
metric.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function makes automatic meshing assignments to area objects.
The function returns zero if the meshing options are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaObjAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto mesh options


ret = SapModel.AreaObj.SetAutoMesh("ALL", 1, 3, 3, , , , , ,
, , , , , , , , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetAutoMesh
SetEdgeConstraint
Syntax
SapObject.SapModel.AreaObj.SetEdgeConstraint
VB6 Procedure
Function SetEdgeConstraint(ByVal Name As String, ByVal ConstraintExists As
Boolean, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ConstraintExists
This item is True if an automatic edge constraint is generated by the program for
the area object in the analysis model.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function makes generated edge constraint assignments to area objects.
The function returns zero if the edge constraint option is successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaObjAutoEdgeConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign auto edge constraint option


ret = SapModel.AreaObj.SetEdgeConstraint("ALL", True, Group)
ret = SapModel.AreaObj.SetEdgeConstraint("2", False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEdgeConstraint
SetGroupAssign
Syntax
SapObject.SapModel.AreaObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified area objects are added to the group specified
by the GroupName item. If it is True, the area objects are removed from the
group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the area object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all area objects in the group specified by the Name item are
added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected area objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes area objects from a specified group.
The function returns zero if the group assignment is successful; otherwise it
returns a nonzero value.
VBA Example
Sub AddAreaObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add area objects to group


ret = SapModel.AreaObj.SetGroupAssign("1", "Group1")
ret = SapModel.AreaObj.SetGroupAssign("3", "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.AreaObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing area object.
GUID
The GUID (Global Unique ID) for the specified area object.
Remarks
This function sets the GUID for the specified area object. If the GUID is passed
in as a blank string, the program automatically creates a GUID for the object.
This function returns zero if the area object GUID is successfully set; otherwise,
it returns nonzero.
VBA Example
Sub SetAreaObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set program created GUID


ret = SapObject.SapModel.AreaObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.AreaObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetLoadGravity
Syntax
SapObject.SapModel.AreaObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified
area object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object gravity loads


ret = SapModel.AreaObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadPorePressure
Syntax
SapObject.SapModel.AreaObj.SetLoadPorePressure
VB6 Procedure
Function SetLoadPorePressure(ByVal Name As String, ByVal LoadPat As
String, ByVal Value As Double, Optional ByVal PatternName As String = "",
Optional ByVal Replace As Boolean = True, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
This is the pore pressure value. [F/L2]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the pore
pressure load for the area object is uniform over the object at the value
specified by Value.
If PatternName is the name of a defined joint pattern, the pore pressure load for
the area object is based on the specified pore pressure value multiplied by the
pattern value at the point objects that define the area object.
Replace
If this item is True, all previous pore pressure loads, if any, assigned to the
specified area object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns pore pressure loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object pore pressure load


ret = SapModel.AreaObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
DeleteLoadPorePressure
SetLoadRotate
Syntax
SapObject.SapModel.AreaObj.SetLoadRotate
VB6 Procedure
Function SetLoadRotate(ByVal Name As String, ByVal LoadPat As String, ByVal
Value As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
This is the angular velocity. [Cyc/T]
Remarks
This function assigns rotate loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectRotateLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object rotate load


ret = SapModel.AreaObj.SetLoadRotate("ALL", "DEAD", 30, ,
Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadRotate
DeleteLoadRotate
SetLoadStrain
Syntax
SapObject.SapModel.AreaObj.SetLoadStrain
VB6 Procedure
Function SetLoadStrain(ByVal Name As String, ByVal LoadPat As String, ByVal
Component As Long, ByVal Value As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal PatternName As String = "", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Component
This is 1, 2, 3, 4, 5, 6, 7, 8, or 9, indicating the component to which the strain
load is applied.
1= Strain11
2= Strain22
3= Strain12
4= Curvature11
5= Curvature22
6= Curvature12
7= Strain13
8= Strain23
9= Strain33
Value
This is the strain load value. [L/L] for Component = 1, 2, 3, 7, 8, and 9 and [1/L]
for Component = 4, 5 and 6
Replace
If this item is True, all previous strain loads, if any, assigned to the specified area
object(s), in the specified load pattern, for the specified degree of freedom, are
deleted before making the new assignment.
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the strain load
for the area object is uniform over the object at the value specified by Value.
If PatternName is the name of a defined joint pattern, the strain load for the area
object is based on the specified strain value multiplied by the pattern value at the
corner points of the area object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns strain loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object strain load


ret = SapModel.AreaObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added Strain33 component in v19.0.0.
See Also
GetLoadStrain
DeleteLoadStrain
SetLoadSurfacePressure
Syntax
SapObject.SapModel.AreaObj.SetLoadSurfacePressure
VB6 Procedure
Function SetLoadSurfacePressure(ByVal Name As String, ByVal LoadPat As
String, ByVal Face As Long, ByVal Value As Double, Optional ByVal
PatternName As String = "", Optional ByVal Replace As Boolean = True,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Face
This is -1, -2 or a nonzero, positive integer, indicating the area object face to
which the specified load assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from area object point n to area object point n + 1. For
example, edge face 2 is from area object point 2 to area object point 3.
Value
This is the surface pressure value. [F/L2]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the surface
pressure load for the area object face is uniform over the face at the value
specified by Value.
If PatternName is the name of a defined joint pattern, the surface pressure load
for the area object face is based on the specified surface pressure value
multiplied by the pattern value at the point objects that are part of the face.
Replace
If this item is True, all previous surface pressure loads, if any, assigned to the
specified area object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns surface pressure loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object surface pressure load


ret = SapModel.AreaObj.SetLoadSurfacePressure("ALL", "DEAD",
-1, .1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
DeleteLoadSurfacePressure
SetLoadTemperature
Syntax
SapObject.SapModel.AreaObj.SetLoadTemperature
VB6 Procedure
Function SetLoadTemperature(ByVal Name As String, ByVal LoadPat As String,
ByVal MyType As Long, ByVal Value As Double, Optional ByVal PatternName As
String = "", Optional ByVal Replace As Boolean = True, Optional ByVal ItemType
As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is either 1 or 3, indicating the type of temperature load.
1 = Temperature
3 = Temperature gradient along local 3 axis
Value
This is the temperature change value. [T] for MyType = 1 and [T/L] for MyType =
3
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the temperature
load for the area object is uniform over the object at the value specified by
Value.
If PatternName is the name of a defined joint pattern the temperature load for
the area object is based on the specified temperature value multiplied by the
pattern value at the joints that define the area object.
Replace
If this item is True, all previous temperature loads, if any, assigned to the
specified area object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns temperature loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object temperature load


ret = SapModel.AreaObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
DeleteLoadTemperature
SetLoadUniform
Syntax
SapObject.SapModel.AreaObj.SetLoadUniform
VB6 Procedure
Function SetLoadUniform(ByVal Name As String, ByVal LoadPat As String,
ByVal Value As Double, ByVal Dir As Long, Optional ByVal Replace As Boolean
= True, Optional ByVal CSys As String = "Global", Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
The uniform load value. [F/L2]
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Replace
If this item is True, all previous uniform loads, if any, assigned to the specified
area object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
This is Local or the name of a defined coordinate system, indicating the
coordinate system in which the uniform load is specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns uniform loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectUniformLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object uniform loads


ret = SapModel.AreaObj.SetLoadUniform("ALL", "DEAD", -0.01,
2, False, "Local", Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniform
DeleteLoadUniform
SetLoadUniformToFrame
Syntax
SapObject.SapModel.AreaObj.SetLoadUniformToFrame
VB6 Procedure
Function SetLoadUniformToFrame(ByVal Name As String, ByVal LoadPat As
String, ByVal Value As Double, ByVal Dir As Long, ByVal DistType As Long,
Optional ByVal Replace As Boolean = True, Optional ByVal CSys As String =
"Global", Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
The uniform load value. [F/L2]
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
DistType
This is either 1 or 2, indicating the load distribution type.
1 = One-way load distribution
2 = Two-way load distribution

One-way distribution is parallel to the area object local 1 axis. Two-way


distribution is parallel to the area object local 1 and 2 axes.
Replace
If this item is True, all previous uniform loads, if any, assigned to the specified
area object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
This is Local or the name of a defined coordinate system, indicating the
coordinate system in which the uniform load is specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects
and the Name item is ignored.
Remarks
This function assigns uniform to frame loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectUniformToFrameLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 288, 2,
288)

'assign area object uniform to frame loads


ret = SapModel.AreaObj.SetLoadUniformToFrame("ALL", "DEAD",
0.01, 10, 2, False, "Global", Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadUniformToFrame
DeleteLoadUniformToFrame
SetLoadWindPressure
Syntax
SapObject.SapModel.AreaObj.SetLoadWindPressure
VB6 Procedure
Function SetLoadWindPressure(ByVal Name As String, ByVal LoadPat As
String, ByVal MyType As Double, ByVal Cp As Double, Optional ByVal ItemType
As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is either 1 or 2, indicating the wind pressure type.
1 = Windward, pressure varies over height
2 = Other, pressure is constant over height
Cp
This is the wind pressure coefficient.
Remarks
This function assigns wind pressure loads to area objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectWindPressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object wind pressure load


ret = SapModel.AreaObj.SetLoadWindPressure("ALL", "DEAD", 1,
0.8, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadWindPressure
DeleteLoadWindPressure
SetLocalAxes
Syntax
SapObject.SapModel.AreaObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal Ang As Double, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
Ang
This is the angle that the local 1 and 2 axes are rotated about the positive local 3
axis from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +3 axis is pointing toward you. [deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns a local axis angle to area objects.
The function returns zero if the local axis angle is successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaObjectLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object local axis angle


ret = SapModel.AreaObj.SetLocalAxes("3", 30)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetLocalAxesAdvanced
Syntax
SapObject.SapModel.AreaObj.SetLocalAxesAdvanced
VB6 Procedure
Function SetLocalAxesAdvanced(ByVal Name As String, ByVal Active As
Boolean, ByVal Plane2 As Long, ByVal PlVectOpt As Long, ByVal PlCSys As
String, ByRef PlDir() As Long, ByRef PlPt() As String, ByRef PlVect() As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group depending on the value of the
ItemType item.
Active
This is True if advanced local axes exist.
Plane2
This is 31 or 32, indicating that the local plane determined by the plane
reference vector is the 3-1 plane or the 3-2 plane. This item applies only when
the Active item is True.
PlVectOpt
This is 1, 2, or 3, indicating the plane reference vector option. This item applies
only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
PlCSys
The coordinate system used to define the plane reference vector coordinate
directions and the plane user vector. This item applies when the Active item is
True and the PlVectOpt item is 1 or 3.
PlDir
This is an array dimensioned to 1 (2 integers), indicating the plane reference
vector primary and secondary coordinate directions, PlDir(0) and PlDir(1)
respectively, taken at the object center in the specified coordinate system and
used to determine the plane reference vector. This item applies when the Active
item is True and the PlVectOpt item is 1. Possible coordinate direction values
are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
PlPt
This is an array dimensioned to 1 (2 strings) indicating the labels of two joints
that define the plane reference vector. Either of these joints may be specified as
None to indicate the center of the specified object. If both joints are specified as
None, they are not used to define the plane reference vector. This item applies
when the Active item is True and the PlVectOpt item is 2.
PlVect
This is an array dimensioned to 2 (3 doubles) that defines the plane reference
vector. This item applies when the Active item is True and the PlVectOpt item is
3.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected area objects and the
Name item is ignored.
Remarks
This function assigns advanced local axes to area objects.
The function returns zero if the advanced local axes assignments are
successfully assigned; otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area advanced local axes


MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.AreaObj.SetLocalAxesAdvanced("3", True, 31,
1, "Global", MyPlDir, MyPlPt, MyPlVect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetLocalAxesAdvanced
GetLocalAxes
SetMass
Syntax
SapObject.SapModel.AreaObj.SetMass
VB6 Procedure
Function SetMass(ByVal Name As String, ByVal MassOverL2 As Double,
Optional ByVal Replace As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
MassOverL2
The mass per unit area assigned to the area object. [M/L2]
Replace
If this item is True, all existing mass assignments to the area object are removed
before assigning the specified mas. If it is False, the specified mass is added to
any existing mass already assigned to the area object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects
and the Name item is ignored.
Remarks
This function assigns mass per unit area to area objects.
The function returns zero if the mass is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign area object mass


ret = SapModel.AreaObj.SetMass("ALL", .0001, False, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
DeleteMass
SetMaterialOverwrite
Syntax
SapObject.SapModel.AreaObj.SetMaterialOverwrite
VB6 Procedure
Function SetMaterialOverwrite(ByVal Name As String, ByVal PropName As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
PropName
This is None or a blank string, indicating that any existing material overwrites
assigned to the specified area objects are to be removed, or it is the name of an
existing material property.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function sets the material overwrite assignment for area objects.
The function returns zero if the material overwrite assignment is successfully
assigned; otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material overwrite


ret = SapModel.AreaObj.SetMaterialOverwrite("3", "A992Fy50")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMaterialOverwrite
SetMatTemp
Syntax
SapObject.SapModel.AreaObj.SetMatTemp
VB6 Procedure
Function SetMatTemp(ByVal Name As String, ByVal Temp As Double, Optional
ByVal PatternName As String = "", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
Temp
This is the material temperature value assigned to the area object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the area object is uniform over the object at the value specified
by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the area object may vary. The material temperature at each corner point
around the area object perimeter is equal to the specified temperature multiplied
by the pattern value at the associated point object. The material temperature at
other points in the area object is calculated by interpolation from the corner
points.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns material temperatures to area objects.
The function returns zero if the material temperatures are successfully
assigned; otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaObjectMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign material temperature


ret = SapModel.AreaObj.SetMatTemp("ALL", 50, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
SetModifiers
Syntax
SapObject.SapModel.AreaObj.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
Value
This is an array of ten unitless modifiers.
Value(0) = Membrane f11 modifier
Value(1) = Membrane f22 modifier
Value(2) = Membrane f12 modifier
Value(3) = Bending m11 modifier
Value(4) = Bending m22 modifier
Value(5) = Bending m12 modifier
Value(6) = Shear v13 modifier
Value(7) = Shear v23 modifier
Value(8) = Mass modifier
Value(9) = Weight modifier

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function sets the modifier assignment for area objects. The default value
for all modifiers is one.
The function returns zero if the modifier assignments are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign modifiers
ReDim Value(9)
For i = 0 To 9
Value(i) = 1
Next i
Value(0) = 0.01
ret = SapModel.AreaObj.SetModifiers("ALL", Value, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
DeleteModifiers
SetOffsets
Syntax
SapObject.SapModel.AreaObj.SetOffsets
VB6 Procedure
Function SetOffsets(ByVal Name As String, ByVal OffsetType As Long, ByVal
OffsetPattern As String, ByVal OffsetPatternSF As Double, ByRef Offset() As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
OffsetType
This is 0, 1 or 2, indicating the joint offset type.
0 = No joint offsets
1 = User defined joint offsets specified by joint pattern
2 = User defined joint offsets specified by point

OffsetPattern
This item applies only when OffsetType = 1. It is the name of the defined joint
pattern that is used to calculate the joint offsets.
OffsetPatternSF
This item applies only when OffsetType = 1. It is the scale factor applied to the
joint pattern when calculating the joint offsets. [L]
Offset
This item applies only when OffsetType = 2. It is an array of joint offsets for each
of the points that define the area object. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function sets the joint offset assignments for area objects.
The function returns zero if the offsets are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignAreaObjectJointOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim Offset() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign joint offsets


ReDim Offset(3)
For i = 0 To 3
Offset(i) = 12
Next i
ret = SapModel.AreaObj.SetOffsets("ALL", 2, "", 1, Offset,
Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOffsets
SetProperty
Syntax
SapObject.SapModel.AreaObj.SetProperty
VB6 Procedure
Function SetProperty(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
PropName
This is None or the name of a area property to be assigned to the specified
area object(s). None means that no property is assigned to the area object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function assigns an area property to area objects.
The function returns zero if the property is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set area property


ret = SapModel.AreaObj.SetProperty("4", "None")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
SetSelected
Syntax
Sap2000.AreaObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified area object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the area object specified by
the Name item.
If this item is Group, the selected status is set for all area objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected area
objects, and the Name item is ignored.
Remarks
This function sets the selected status for area objects.
The function returns zero if the selected status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set area objects selected


ret = SapModel.AreaObj.SetSelected("ALL", True, Group)

'update window
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
GetSelectedEdge
SetSelectedEdge
SetSelectedEdge
Syntax
Sap2000.AreaObj.SetSelectedEdge
VB6 Procedure
Function SetSelectedEdge(ByVal Name As String, ByVal EdgeNum As Long,
ByVal Selected As Boolean) As Long
Parameters
Name
The name of an existing area object.
EdgeNum
The area object edge that is have its selected status set.
Selected
This item is True if the specified area object edge is selected; otherwise it is
False.
Remarks
This function sets the selected status for area object edges.
The function returns zero if the selected status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetAreaObjectEdgeSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set area object edge selected


ret = SapModel.AreaObj.SetSelectedEdge("1", 2, True)

'update window
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelectedEdge
GetSelected
SetSelected
SetSpring
Syntax
SapObject.SapModel.AreaObj.SetSpring
VB6 Procedure
Function SetSpring(ByVal Name As String, ByVal MyType As Long, ByVal s As
Double, ByVal SimpleSpringType As Long, ByVal LinkProp As String, ByVal Face
as Long, ByVal SpringLocalOneType As Long, ByVal Dir As Long, ByVal
Outward As Boolean, ByRef Vec() As Double, ByVal Ang As Double, ByVal
Replace As Boolean, Optional ByVal CSys As String = "Local", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
MyType
This is either 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
The simple spring stiffness per unit area of the specified area object face. This
item applies only when MyType = 1. [F/L3]
SimpleSpringType
This is 1, 2 or 3, indicating the simple spring type. This item applies only when
MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
The name of the link property assigned to the spring. This item applies only when
MyType = 2.
Face
This is -1, -2 or a nonzero, positive integer indicating the area object face to
which the specified spring assignment applies.
-1 = Bottom face
-2 = Top face
>0 = Edge face

Note that edge face n is from area object point n to area object point n + 1. For
example, edge face 2 is from area object point 2 to area object point 3.
SpringLocalOneType
This is 1, 2 or 3, indicating the method used to specify the spring positive local 1-
axis orientation.
1 = Parallel to area object local axis
2 = Normal to specified area object face
3 = User specified direction vector
Dir
This is 1, 2, 3, -1, -2 or -3, indicating the area object local axis that corresponds
to the positive local 1-axis of the spring. This item applies only when
SpringLocalOneType = 1.
Outward
This item is True if the spring positive local 1 axis is outward from the specified
area object face. This item applies only when SpringLocalOneType = 2.
Vec
This is an array of three values that define the direction vector of the spring
positive local 1-axis. The direction vector is in the coordinate system specified
by the CSys item. This item applies only when SpringLocalOneType = 3.
Ang
This is the angle that the link local 2-axis is rotated from its default orientation.
This item applies only when MyType = 2. [deg]
Replace
If this item is True, all existing spring assignments to the area object are
removed before assigning the specified spring. If it is False, the specified spring
is added to any existing springs already assigned to the area object.
CSys
This is Local (meaning the area object local coordinate system) or the name of
a defined coordinate system. This item is the coordinate system in which the
user specified direction vector, Vec, is specified. This item applies only when
SpringLocalOneType = 3.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function makes spring assignments to area objects. The springs are
assigned to a specified area object face.
The function returns zero if the assignments are successfully applied; otherwise
it returns a nonzero value.
VBA Example
Sub AssignAreaObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign springs to area objects


ReDim Vec(2)
ret = SapModel.AreaObj.SetSpring("ALL", 1, 1, 1, "", -1, 1,
3, True, Vec, 0, False, "Local", Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
DeleteSpring
SetThickness
Syntax
SapObject.SapModel.AreaObj.SetThickness
VB6 Procedure
Function SetThickness(ByVal Name As String, ByVal ThicknessType As Long,
ByVal ThicknessPattern As String, ByVal ThicknessPatternSF As Double, ByRef
Thickness() As Double, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing area object or group, depending on the value of the
ItemType item.
ThicknessType
This is 0, 1 or 2, indicating the thickness overwrite type.
0 = No thickness overwrites
1 = User defined thickness overwrites specified by joint pattern
2 = User defined thickness overwrites specified by point

ThicknessPattern
This item applies only when ThicknessType = 1. It is the name of the defined joint
pattern that is used to calculate the thicknesses.
ThicknessPatternSF
This item applies only when ThicknessType = 1. It is the scale factor applied to
the joint pattern when calculating the thicknesses. [L]
Thickness
This item applies only when ThicknessType = 2. It is an array of thicknesses at
each of the points that define the area object. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the area object specified by the
Name item.
If this item is Group, the assignment is made to all area objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected area objects,
and the Name item is ignored.
Remarks
This function sets the thickness overwrite assignments for area objects.
The function returns zero if the thickness overwrites are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignAreaObjectThicknessOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim Thickness() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'assign thickness overwrites


ReDim Thickness(3)
For i = 0 To 3
Thickness(i) = 11
Next i
ret = SapModel.AreaObj.SetThickness("ALL", 2, "", 1,
Thickness, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetThickness
AddByCoord
Syntax
SapObject.SapModel.CableObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByVal xi As Double, ByVal yi As Double, ByVal zi As
Double, ByVal xj As Double, ByVal yj As Double, ByVal zj As Double, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "", Optional ByVal CSys As String = "Global") As Long
Parameters
xi, yi, zi
The coordinates of the I-End of the added cable object. The coordinates are in
the coordinate system defined by the CSys item.
xj, yj, zj
The coordinates of the J-End of the added cable object. The coordinates are in
the coordinate system defined by the CSys item.
Name
This is the name that the program ultimately assigns for the cable object. If no
UserName is specified,n the program assigns a default name to the cable
object. If a UserName is specified and that name is not used for another frame,
cable or tendon object, the UserName is assigned to the cable object; otherwise
a default name is assigned to the cable object.
PropName
This is Default or the name of a defined cable property.
If it is Default, the program assigns a default cable property to the cable object. If
it is the name of a defined cable property, that property is assigned to the cable
object.
UserName
This is an optional user specified name for the cable object. If a UserName is
specified and that name is already used for another cable object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the cable object end point
coordinates are defined.
Remarks
This function adds a new cable object whose end points are at the specified
coordinates.
The function returns zero if the cable object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddCableObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by coordinates


ret = SapModel.CableObj.AddByCoord(-300, 0, 0, -100, 0, 124,
Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
SetCableData
AddByPoint
Syntax
SapObject.SapModel.CableObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByVal Point1 as String, ByVal Point2 as String, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "") As Long
Parameters
Point1
The name of a defined point object at the I-End of the added cable object.
Point2
The name of a defined point object at the J-End of the added cable object.
Name
This is the name that the program ultimately assigns for the cable object. If no
UserName is specified, the program assigns a default name to the cable object.
If a UserName is specified and that name is not used for another frame, cable
or tendon object, the UserName is assigned to the cable object; otherwise a
default name is assigned to the cable object.
PropName
This is Default or the name of a defined cable property.
If it is Default, the program assigns a default cable property to the cable object. If
it is the name of a defined cable property, that property is assigned to the cable
object.
UserName
This is an optional user specified name for the cable object. If a UserName is
specified and that name is already used for another cable object, the program
ignores the UserName.
Remarks
This function adds a new cable object whose end points are specified by name.
The function returns zero if the cable object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddCableObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
SetCableData
ChangeName
Syntax
SapObject.SapModel.CableObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined cable object.
NewName
The new name for the cable object.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangeCableObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'change name
ret = SapModel.CableObj.ChangeName(Name, "MyCable")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.CableObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns a count of the cable objects in the model.
VBA Example
Sub CountCableObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'return number of cable objects


Count = SapModel.CableObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.CableObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing cable object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the cable object specified by the Name item is deleted.
If this item is Group, the all cable objects in the group specified by the Name item
are deleted.
If this item is SelectedObjects, all selected cable objects are deleted, and the
Name item is ignored.
Remarks
The function deletes cable objects.
The function returns zero if the cable objects are successfully deleted, otherwise
it returns a nonzero value.
VBA Example
Sub DeleteCableObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable objects by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name1)
ret = SapModel.CableObj.AddByPoint("5", "10", Name2)

'delete cable object


ret = SapModel.CableObj.Delete(Name1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteLoadDeformation
Syntax
SapObject.SapModel.CableObj.DeleteLoadDeformation
VB6 Procedure
Function DeleteLoadDeformation(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the deformation load assignments to the specified cable
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable deformation loads


ret = SapModel.CableObj.SetLoadDeformation("ALL", "DEAD", 2,
Group)

'delete cable deformation load


ret = SapModel.CableObj.DeleteLoadDeformation(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
SetLoadDeformation
DeleteLoadDistributed
Syntax
SapObject.SapModel.CableObj.DeleteLoadDistributed
VB6 Procedure
Function DeleteLoadDistributed(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the distributed load assignments to the specified cable
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable distributed load


ret = SapModel.CableObj.SetLoadDistributed(Name, "DEAD", 1,
10, 0.08)

'delete cable distributed load


ret = SapModel.CableObj.DeleteLoadDistributed(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDistributed
SetLoadDistributed
DeleteLoadDistributedWithGUID
Syntax
SapObject.SapModel.CableObj.DeleteLoadDistributedWithGUID
VB6 Procedure
Function DeleteLoadDistributedWithGUID(ByVal Name As String, ByVal GUID
As String) As Long
Parameters
Name
The name of an existing cable object.
GUID
The global unique ID of one of the distributed loads on that cable object.
Remarks
This function deletes the distributed load assignment with the specified global
unique ID for the specified cable object.
The function returns zero if the load assignment is successfully deleted,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadDistributedWithGUID
SetLoadDistributedWithGUID
DeleteLoadGravity
Syntax
SapObject.SapModel.CableObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified cable objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable gravity loads


ret = SapModel.CableObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete cable gravity load


ret = SapModel.CableObj.DeleteLoadGravity(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadStrain
Syntax
SapObject.SapModel.CableObj.DeleteLoadStrain
VB6 Procedure
Function DeleteLoadStrain(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the strain load assignments to the specified cable objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable strain load


ret = SapModel.CableObj.SetLoadStrain(Name, "DEAD", 0.001)

'delete cable strain load


ret = SapModel.CableObj.DeleteLoadStrain(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
SetLoadStrain
DeleteLoadTargetForce
Syntax
SapObject.SapModel.CableObj.DeleteLoadTargetForce
VB6 Procedure
Function DeleteLoadTargetForce(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the target force assignments to the specified cable objects
for the specified load pattern.
The function returns zero if the target force assignments are successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable target force


ret = SapModel.CableObj.SetLoadTargetForce(Name, "DEAD", 50,
0.5)

'delete cable target force


ret = SapModel.CableObj.DeleteLoadTargetForce(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
SetLoadTargetForce
DeleteLoadTemperature
Syntax
SapObject.SapModel.CableObj.DeleteLoadTemperature
VB6 Procedure
Function DeleteLoadTemperature(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the cable object
specified by the Name item.
If this item is Group, the load assignments are deleted for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
cable objects, and the Name item is ignored.
Remarks
This function deletes the temperature load assignments to the specified cable
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable temperature load


ret = SapModel.CableObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'delete cable temperature load


ret = SapModel.CableObj.DeleteLoadTemperature(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
SetLoadTemperature
DeleteMass
Syntax
SapObject.SapModel.CableObj.DeleteMass
VB6 Procedure
Function DeleteMass(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the cable mass assignments are deleted for the cable
object specified by the Name item.
If this item is Group, the cable mass assignments are deleted for all cable
objects in the group specified by the Name item.
If this item is SelectedObjects, the cable mass assignments are deleted for all
selected cable objects, and the Name item is ignored.
Remarks
This function deletes the cable mass assignments for cable objects.
The function returns zero if the mass assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable mass


ret = SapModel.CableObj.SetMass("ALL", .0001, False, Group)

'delete cable mass


ret = SapModel.CableObj.DeleteMass(Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
SetMass
DeleteModifiers
Syntax
SapObject.SapModel.CableObj.DeleteModifiers
VB6 Procedure
Function DeleteModifiers(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the cable modifier assignments are deleted for the cable
object specified by the Name item.
If this item is Group, the cable modifier assignments are deleted for all cable
objects in the group specified by the Name item.
If this item is SelectedObjects, the cable modifier assignments are deleted for all
selected cable objects, and the Name item is ignored.
Remarks
This function deletes the cable modifier assignments for cable objects.
The function returns zero if the modifier assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteCableModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(0) = 100
ret = SapModel.CableObj.SetModifiers(Name, Value)

'delete modifiers
ret = SapModel.CableObj.DeleteModifiers(Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
SetModifiers
GetCableData
Syntax
SapObject.SapModel.CableObj.GetCableData
VB6 Procedure
Function GetCableData(ByRef Name As String, ByRef CableType As Long,
ByRef NumSegs As Long, ByRef Weight As Double, ByRef ProjectedLoad As
Double, ByRef UseDeformedGeom As Boolean, ByRef ModelUsingFrames As
Boolean, ByRef Parameter() As Double) As Long
Parameters
Name
The name of a defined cable object.
CableType
This is 1, 2, 3, 4, 5, 6, 7, 8, or 9, indicating the cable definition parameter.
1= Minimum tension at I-End
2= Minimum tension at J-End
3= Tension at I-End
4= Tension at J-End
5= Horizontal tension component
6= Maximum vertical sag
7= Low-point vertical sag
8= Undeformed length
9= Relative undeformed length

NumSegs
This is the number of segments into which the program internally divides the
cable.
Weight
The added weight per unit length used when calculating the cable shape. [F/L]
ProjectedLoad
The projected uniform gravity load used when calculating the cable shape. [F/L]
UseDeformedGeom
If this item is True, the program uses the deformed geometry for the cable
object; otherwise it uses the undeformed geometry.
ModelUsingFrames
If this item is True, the analysis model uses frame elements to model the cable
instead of using cable elements.
Parameter
This is an array of parameters related to the cable shape. The array is
dimensioned by Sap2000.
Parameter(0) = Tension at I-End [F]
Parameter(1) = Tension at J-End [F]
Parameter(2) = Horizontal tension component [F]
Parameter(3) = Maximum deformed vertical sag [L]
Parameter(4) = Deformed low-point vertical sag [L]
Parameter(5) = Deformed length [L]
Parameter(6) = Deformed relative length
Parameter(7) = Maximum undeformed vertical sag [L]
Parameter(8) = Undeformed low-point vertical sag [L]
Parameter(9) = Undeformed length [L]
Parameter(10) = Undeformed relative length
Remarks
This function retrieves definition data for a specified cable object.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetCableObjectData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim CableType As Long
Dim NumSegs As Long
Dim Weight As Double
Dim ProjectedLoad As Double
Dim UseDeformedGeom As Boolean
Dim ModelUsingFrames As Boolean
Dim Parameter() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get cable data


ret = SapModel.CableObj.GetCableData(Name, CableType,
NumSegs, Weight, ProjectedLoad, UseDeformedGeom, ModelUsingFrames,
Parameter)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
SetCableData
GetCableGeometry
GetCableGeometry
Syntax
SapObject.SapModel.CableObj.GetCableGeometry
VB6 Procedure
Function GetCableGeometry(ByRef Name As String, ByRef NumberPoints As
Long, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double, ByRef
Sag() As Double, ByRef Dist() As Double, ByRef RD() As Double, Optional
ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a defined cable object.
NumberPoints
The number of points defining the cable geometry.
x, y, z
The x, y and z coordinates of the considered point on the cable in the coordinate
system specified by the CSys item. [L]
Sag
The cable vertical sag, measured from the chord, at the considered point. [L]
Distance
The distance along the cable, measured from the cable I-End, to the considered
point. [L]
RD
The relative distance along the cable, measured from the cable I-End, to the
considered point.
CSys
The name of the coordinate system in which the x, y and z coordinates are to be
reported.
Remarks
This function retrieves geometric data for a specified cable object.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetCableObjectGeometry()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Sag() As Double
Dim Dist() As Double
Dim RD() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get cable geometry


ret = SapModel.CableObj.GetCableGeometry(Name, NumberPoints
, x, y, z, Sag, Dist, RD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
SetCableData
GetCableData
GetElm
Syntax
SapObject.SapModel.CableObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef nelm As Long, ByRef Elm() as
String, ByRef RDI() As Double, ByRef RDJ() As Double) As Long
Parameters
Name
The name of an existing cable object.
nelm
The number of line elements created from the specified cable object.
Elm
An array that includes the name of a line element created from the specified
cable object.
RDI
An array that includes the relative distance along the cable object to the I-End of
the line element.
RDJ
An array that includes the relative distance along the cable object to the J-End of
the line element.
Remarks
This function retrieves the names of the line elements (analysis model lines)
associated with a specified cable object in the object-based model. It also
retrieves information about the location of the line elements along the cable
object.
This function returns zero if the line element information is successfully returned;
otherwise it returns nonzero. An error occurs if the analysis model does not
currently exist.
VBA Example
Sub GetLineElementInfoForCableObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nelm As Long
Dim Elm() As String
Dim RDI() As Double
Dim RDJ() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element information


ret = SapModel.CableObj.GetElm(Name, nelm, Elm, RDI, RDJ)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.CableObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing cable object.
GUID
The GUID (Global Unique ID) for the specified cable object.
Remarks
This function retrieves the GUID for the specified cable object.
This function returns zero if the cable object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetCableObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'set program created GUID


ret = SapObject.SapModel.CableObj.SetGUID(Name)

'get GUID
ret = SapObject.SapModel.CableObj.GetGUID(Name, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetInsertionPoint
Syntax
SapObject.SapModel.CableObj.GetInsertionPoint
VB6 Procedure
Function GetInsertionPoint(ByVal Name As String, ByRef StiffTransform As
Boolean, ByRef Offset1() As Double, ByRef Offset2() As Double, ByRef CSys
As String) As Long
Parameters
Name
The name of an existing cable object.
StiffTransform
If this item is True, the cable object stiffness is transformed for cardinal point
and joint offsets from the cable section centroid.
Offset1
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the I-End of the cable object. [L]
Offset1(0) = Offset in the 1-axis or X-axis direction
Offset1(1) = Offset in the 2-axis or Y-axis direction
Offset1(2) = Offset in the 3-axis or Z-axis direction
Offset2
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the J-End of the cable object. [L]
Offset2(0) = Offset in the 1-axis or X-axis direction
Offset2(1) = Offset in the 2-axis or Y-axis direction
Offset2(2) = Offset in the 3-axis or Z-axis direction
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the Offset1 and Offset2 items are specified.
Remarks
This function retrieves cable object insertion point assignments. The
assignments include the end joint offsets.
The function returns zero if the insertion point data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableInsertionPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim StiffTransform As Boolean
Dim Offset1() As Double
Dim Offset2() As Double
Dim CSys As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable insertion point


ReDim Offset1(2)
ReDim Offset2(2)
For i = 0 To 2
Offset1(i)=10 + i
Offset2(i)=20 + i
Next i
ret = SapModel.CableObj.SetInsertionPoint(Name, True,
Offset1, Offset2)
'get cable insertion point
ReDim Offset1(2)
ReDim Offset2(2)
ret = SapModel.CableObj.GetInsertionPoint(Name,
StiffTransform, Offset1, Offset2, CSys)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetInsertionPoint
GetLoadDeformation
Syntax
SapObject.SapModel.CableObj.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef CableName() As String, ByRef LoadPat() As String, ByRef U1() As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
U1
This is an array of axial deformation load values. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to cable objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim U1() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable deformation loads


ret = SapModel.CableObj.SetLoadDeformation("ALL", "DEAD", 2,
Group)

'get cable deformation loads


ret = SapModel.CableObj.GetLoadDeformation(Name,
NumberItems, CableName, LoadPat, U1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDeformation
DeleteLoadDeformation
GetLoadDistributed
Syntax
SapObject.SapModel.CableObj.GetLoadDistributed
VB6 Procedure
Function GetLoadDistributed(ByVal Name As String, ByRef NumberItems As
Long, ByRef CableName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef ByRef
Value() As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of distributed loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
distributed load.
LoadPat
This is an array that includes the name of the coordinate system in which the
distributed loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of distributed load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
distributed load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is 1, 2, 3, 4, 5, 6 or 10, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10) is in the negative Global Z direction.
Value
This is the load value of the distributed load. The distributed load is applied over
the full length of the cable. [F/L] when MyType is 1 and [FL/L] when MyType is 2
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the distributed load assignments to cable objects. The
loads are uniformly distributed over the full length of cable objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim CSys() As String
Dim Dir() As Long
Dim Value() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable distributed load


ret = SapModel.CableObj.SetLoadDistributed(Name, "DEAD", 1,
10, 0.08)

'get cable distributed loads


ret = SapModel.CableObj.GetLoadDistributed("ALL",
NumberItems, CableName, LoadPat, MyType, CSys, Dir, Value, Group)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDistributed
DeleteLoadDistributed
GetLoadDistributedWithGUID
Syntax
SapObject.SapModel.CableObj.GetLoadDistributedWithGUID
VB6 Procedure
Function GetLoadDistributedWithGUID(ByVal Name As String, ByRef
NumberItems As Long, ByRef CableName() As String, ByRef LoadPat() As
String, ByRef MyType() As Long, ByRef CSys() As String, ByRef Dir() As Long,
ByRef Value() As Double, ByRefGUID() As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of distributed loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
distributed load.
LoadPat
This is an array that includes the name of the coordinate system in which the
distributed loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of distributed load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
distributed load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is 1, 2, 3, 4, 5, 6 or 10, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10) is in the negative Global Z direction.
Value
This is the load value of the distributed load. The distributed load is applied over
the full length of the cable. [F/L] when MyType is 1 and [FL/L] when MyType is 2
GUID
This is an array that includes the global unique ID of each load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the distributed load assignments to cable objects. The
loads are uniformly distributed over the full length of cable objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
SetLoadDistributedWithGUID
DeleteLoadDistributedWithGUID
GetLoadGravity
Syntax
SapObject.SapModel.CableObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef CableName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to cable objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable gravity loads


ret = SapModel.CableObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get cable gravity load


ret = SapModel.CableObj.GetLoadGravity(Name, NumberItems,
CableName, LoadPat, CSys, x, y, z)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadStrain
Syntax
SapObject.SapModel.CableObj.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef CableName() As String, ByRef LoadPat() As String, ByRef Strain() As
Double, ByRef PatternName() As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Strain
This is an array that includes the axial strain value. [L/L]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to cable objects.
The function returns zero if the strain load assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCableStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim Strain() As Double
Dim PatternName() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable strain load


ret = SapModel.CableObj.SetLoadStrain(Name, "DEAD", 0.001)

'get cable strain load


ret = SapModel.CableObj.GetLoadStrain(Name, NumberItems,
CableName, LoadPat, Strain,PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadStrain
DeleteLoadStrain
GetLoadTargetForce
Syntax
SapObject.SapModel.CableObj.GetLoadTargetForce
VB6 Procedure
Function GetLoadTargetForce(ByVal Name As String, ByRef NumberItems As
Long, ByRef CableName() As String, ByRef LoadPat() As String, ByRef P() As
Double, ByRef RD() As Double, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
target force.
LoadPat
This is an array that includes the name of the load pattern associated with each
target force.
P
This is an array of axial target force values. [F]
RD
This is an array of the relative distances along the cable objects where the axial
target force values apply.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the target force assignments to cable objects.
The function returns zero if the target force assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCableTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim P() As double
Dim RD() As double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable target force


ret = SapModel.CableObj.SetLoadTargetForce(Name, "DEAD", 50,
0.5)

'get cable target force


ret = SapModel.CableObj.GetLoadTargetForce(Name,
NumberItems, CableName, LoadPat, P, RD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTargetForce
DeleteLoadTargetForce
GetLoadTemperature
Syntax
SapObject.SapModel.CableObj.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef CableName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Val() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified cable objects.
CableName
This is an array that includes the name of the cable object associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
Val
This is an array that includes the temperature load value. [T]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the cable object specified
by the Name item.
If this item is Group, the assignments are retrieved for all cable objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected cable
objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to cable objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CableName() As String
Dim LoadPat() As String
Dim Val() As Double
Dim PatternName() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable temperature load


ret = SapModel.CableObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'get cable temperature load


ret = SapModel.CableObj.GetLoadTemperature("ALL",
NumberItems, CableName, LoadPat, Val, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTemperature
DeleteLoadTemperature
GetMass
Syntax
SapObject.SapModel.CableObj.GetMass
VB6 Procedure
Function GetMass(ByVal Name As String, ByRef MassOverL As Double) As
Long
Parameters
Name
The name of an existing cable object.
MassOverL
The mass per unit length assigned to the cable object. [M/L]
Remarks
This function retrieves the mass per unit length assignment for cable objects.
The function returns zero if the mass assignment is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MassOverL As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable mass


ret = SapModel.CableObj.SetMass("ALL", .0001, False, Group)

'get cable mass assignment


ret = SapModel.CableObj.GetMass(Name, MassOverL)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMass
DeleteMass
GetMaterialOverwrite
Syntax
SapObject.SapModel.CableObj.GetMaterialOverwrite
VB6 Procedure
Function GetMaterialOverwrite(ByVal Name As String, ByRef PropName As
String) As Long
Parameters
Name
The name of a defined cable object.
PropName
This is None, indicating that no material overwrite exists for the specified cable
object, or it is the name of an existing material property.
Remarks
This function retrieves the material overwrite assigned to a cable object, if any. It
returns None if there is no material overwrite assignment.
The function returns zero if the material overwrite assignment is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCableMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by coordinates


ret = SapModel.CableObj.AddByCoord(-300, 0, 0, -100, 0, 124,
Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign material overwrite


ret = SapModel.CableObj.SetMaterialOverwrite(Name,
"4000Psi")

'get material overwrite assignment


ret = SapModel.CableObj.GetMaterialOverwrite(Name, PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMaterialOverwrite
GetMatTemp
Syntax
SapObject.SapModel.CableObj.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing cable object.
Temp
This is the material temperature value assigned to the cable object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the cable object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the cable object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the cable object.
Remarks
This function retrieves the material temperature assignments to cable objects.
The function returns zero if the material temperature assignments are
successfully retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCableMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign material temperature


ret = SapModel.CableObj.SetMatTemp("ALL", 50, , Group)

'get material temperature


ret = SapModel.CableObj.GetMatTemp(Name, Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMatTemp
GetModifiers
Syntax
SapObject.SapModel.CableObj.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing cable object.
Value
This is an array of three unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
Remarks
This function retrieves the cable modifier assignment for cable objects. The
default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(0) = 100
ret = SapModel.CableObj.SetModifiers(Name, Value)

'get modifiers
ReDim Value(2)
ret = SapModel.CableObj.GetModifiers(Name, Value)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetModifiers
DeleteModifiers
GetNameList
Syntax
SapObject.SapModel.CableObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of cable object names retrieved by the program.
MyName
This is a one-dimensional array of cable object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the APIuser.
Remarks
This function retrieves the names of all defined cable objects.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetCableObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name1)
ret = SapModel.CableObj.AddByPoint("5", "10", Name2)

'set cable data


ret = SapModel.CableObj.SetCableData(Name1, 7, 1, 0, 0, 24)
ret = SapModel.CableObj.SetCableData(Name2, 7, 1, 0, 0, 24)

'get cable object names


ret = SapModel.CableObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOutputStations
Syntax
SapObject.SapModel.CableObj.GetOutputStations
VB6 Procedure
Function GetOutputStations(ByVal Name As String, ByRef MyType As Long,
ByRef MaxSegSize As Double, ByRef MinSections As Long, ByRef
NoOutPutAndDesignAtElementEnds As Boolean, ByRef
NoOutPutAndDesignAtPointLoads As Boolean) As Long
Parameters
Name
The name of an existing cable object.
MyType
This is 1 or 2, indicating how the output stations are specified.
1 = maximum segment size, that is, maximum station spacing
2 = minimum number of stations
MaxSegSize
The maximum segment size, that is, the maximum station spacing. This item
applies only when MyType = 1. [L]
MinSections
The minimum number of stations. This item applies only when MyType = 2.
NoOutPutAndDesignAtElementEnds
If this item is True, no additional output stations are added at the ends of line
elements when the cable object is internally meshed.
NoOutPutAndDesignAtPointLoads
If this item is True, no additional output stations are added at point load
locations.
Remarks
This function retrieves cable object output station data.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetCableOutputStationData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim MaxSegSize As Double
Dim MinSections As Long
Dim NoOutPutAndDesignAtElementEnds As Boolean
Dim NoOutPutAndDesignAtPointLoads As Boolean
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get cable output station data


ret = SapModel.CableObj.GetOutputStations(Name, MyType,
MaxSegSize, MinSections, NoOutPutAndDesignAtElementEnds,
NoOutPutAndDesignAtPointLoads)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOutputStations
GetPoints
Syntax
SapObject.SapModel.CableObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined cable object.
Point1
The name of the point object at the I-End of the specified cable object.
Point2
The name of the point object at the J-End of the specified cable object.
Remarks
This function retrieves the names of the point objects at each end of a specified
cable object.
The function returns zero if the point names are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point1 As String
Dim Point2 As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by coordinates


ret = SapModel.CableObj.AddByCoord(-300, 0, 0, -100, 0, 124,
Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get names of points


ret = SapModel.CableObj.GetPoints(Name, Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.CableObj.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined cable object.
PropName
The name of the cable property assigned to the cable object.
Remarks
This function retrieves the cable property assigned to a cable object.
The function returns zero if the cable object property is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableSectionProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get cable property


ret = SapModel.CableObj.GetProperty(Name, PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetSelected
Syntax
Sap2000.CableObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing cable object.
Selected
This item returns True if the specified cable object is selected, otherwise it
returns False.
Remarks
This function retrieves the selected status for a cable object.
The function returns zero if the selected status is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetCableObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name1)
ret = SapModel.CableObj.AddByPoint("5", "10", Name2)

'set cable data


ret = SapModel.CableObj.SetCableData(Name1, 7, 1, 0, 0, 24)
ret = SapModel.CableObj.SetCableData(Name2, 7, 1, 0, 0, 24)

'set all cables selected


ret = SapModel.CableObj.SetSelected("All", True, Group)

'get cable object selected status


ret = SapModel.CableObj.GetSelected(Name1, Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetTransformationMatrix
Syntax
Sap2000.CableObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing cable object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the cable object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the cable object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system and the cable object local coordinate system.
Remarks
The function returns zero if the cable object transformation matrix is
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetCableObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'get cable object transformation matrix


ReDim Value(8)
ret = SapModel.CableObj.GetTransformationMatrix(Name, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetCableData
Syntax
SapObject.SapModel.CableObj.SetCableData
VB6 Procedure
Function SetCableData(ByVal Name As String, ByVal CableType As Long, ByVal
NumSegs As Long, ByVal Weight As Double, ByVal ProjectedLoad As Double,
ByVal Value As Double, Optional ByVal UseDeformedGeom As Boolean =
False, Optional ByVal ModelUsingFrames As Boolean = False) As Long
Parameters
Name
The name of a defined cable object.
CableType
This is 1, 2, 3, 4, 5, 6, 7, 8, or 9, indicating the cable definition parameter.
1= Minimum tension at I-End
2= Minimum tension at J-End
3= Tension at I-End
4= Tension at J-End
5= Horizontal tension component
6= Maximum vertical sag
7= Low-point vertical sag
8= Undeformed length
9= Relative undeformed length

NumSegs
This is the number of segments into which the program internally divides the
cable.
Weight
The added weight per unit length used when calculating the cable shape. [F/L]
ProjectedLoad
The projected uniform gravity load used when calculating the cable shape. [F/L]
Value
This is the value of the parameter used to define the cable shape. The item that
Value represents depends on the CableType item.
CableType = 1: Not Used
CableType = 2: Not Used
CableType = 3: Tension at I-End [F]
CableType = 4: Tension at J-End [F]
CableType = 5: Horizontal tension component [F]
CableType = 6: Maximum vertical sag [L]
CableType = 7: Low-point vertical sag [L]
CableType = 8: Undeformed length [L]
CableType = 9: Relative undeformed length

UseDeformedGeom
If this item is True, the program uses the deformed geometry for the cable
object; otherwise it uses the undeformed geometry.
ModelUsingFrames
If this item is True, the analysis model uses frame elements to model the cable
instead of using cable elements.
Remarks
This function assigns the cable definition parameters to a cable object.
The function returns zero if the cable object is successfully defined; otherwise it
returns a nonzero value. If the cable object is not successfully defined, it may be
deleted.
VBA Example
Sub SetCableDefinitionData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional arguments UseDeformedGeom and ModelUsingFrames to
both be ByVal in version 12.0.1.
See Also
AddByCoord
AddByPoint
GetCableData
GetCableGeometry
SetGroupAssign
Syntax
SapObject.SapModel.CableObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified cable objects are added to the group specified
by the GroupName item. If it is True, the cable objects are removed from the
group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the cable object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all cable objects in the group specified by the Name item
are added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected cable objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes cable objects from a specified group.
The function returns zero if the group assignment is successful, otherwise it
returns a nonzero value.
VBA Example
Sub AddCableObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name1)
ret = SapModel.CableObj.AddByPoint("5", "10", Name2)

'set cable data


ret = SapModel.CableObj.SetCableData(Name1, 7, 1, 0, 0, 24)
ret = SapModel.CableObj.SetCableData(Name2, 7, 1, 0, 0, 24)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add cable objects to group


ret = SapModel.CableObj.SetGroupAssign(Name1, "Group1")
ret = SapModel.CableObj.SetGroupAssign(Name2, "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.CableObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing cable object.
GUID
The GUID (Global Unique ID) for the specified cable object.
Remarks
This function sets the GUID for the specified cable object. If the GUID is passed
in as a blank string, the program automatically creates a GUID for the object.
This function returns zero if the cable object GUID is successfully set; otherwise
it returns nonzero.
VBA Example
Sub SetCableObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'set program created GUID


ret = SapObject.SapModel.CableObj.SetGUID(Name)

'get GUID
ret = SapObject.SapModel.CableObj.GetGUID(Name, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetInsertionPoint
Syntax
SapObject.SapModel.CableObj.SetInsertionPoint
VB6 Procedure
Function SetInsertionPoint(ByVal Name As String, ByVal StiffTransform As
Boolean, ByRef Offset1() As Double, ByRef Offset2() As Double, Optional
ByVal CSys As String = "Local", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
StiffTransform
If this item is True, the cable object stiffness is transformed for cardinal point
and joint offsets from the cable section centroid.
Offset1
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the I-End of the cable object. [L]
Offset1(0) = Offset in the 1-axis or X-axis direction
Offset1(1) = Offset in the 2-axis or Y-axis direction
Offset1(2) = Offset in the 3-axis or Z-axis direction
Offset2
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the J-End of the cable object. [L]
Offset2(0) = Offset in the 1-axis or X-axis direction
Offset2(1) = Offset in the 2-axis or Y-axis direction
Offset2(2) = Offset in the 3-axis or Z-axis direction
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the Offset1 and Offset2 items are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns cable object insertion point data. The assignments include
the end joint offsets.
The function returns zero if the insertion point data is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignCableInsertionPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Offset1() As Double
Dim Offset2() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable insertion point


ReDim Offset1(2)
ReDim Offset2(2)
For i = 0 To 2
Offset1(i)=10 + i
Offset2(i)=20 + i
Next i
ret = SapModel.CableObj.SetInsertionPoint(Name, True,
Offset1, Offset2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetInsertionPoint
SetLoadDeformation
Syntax
SapObject.SapModel.CableObj.SetLoadDeformation
VB6 Procedure
Function SetLoadDeformation(ByVal Name As String, ByVal LoadPat As String,
ByRef d As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
d
This is the axial deformation load value. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns deformation loads to cable objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable deformation loads


ret = SapModel.CableObj.SetLoadDeformation("ALL", "DEAD", 2,
Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
DeleteLoadDeformation
SetLoadDistributed
Syntax
SapObject.SapModel.CableObj.SetLoadDistributed
VB6 Procedure
Function SetLoadDistributed(ByVal Name As String, ByVal LoadPat As String,
ByVal MyType As Long, ByVal Dir As Long, ByVal Value As Double, Optional
ByVal CSys As String = "Global", Optional ByVal Replace As Boolean = True,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is 1 or 2, indicating the type of distributed load.
1 = Force per unit length
2 = Moment per unit length
Dir
This is 1, 2, 3, 4, 5, 6 or 10, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10) is in the negative Global Z direction.
Value
This is the load value of the distributed load. The distributed load is applied over
the full length of the cable. [F/L] when MyType is 1 and [FL/L] when MyType is 2
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the loads are specified.
Replace
If this item is True, all previous loads, if any, assigned to the specified cable
object(s), in the specified load pattern, are deleted before making the new
assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns uniform distributed loads over the full length of cable
objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable distributed load


ret = SapModel.CableObj.SetLoadDistributed(Name, "DEAD", 1,
10, 0.08)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDistributed
DeleteLoadDistributed
SetLoadDistributedWithGUID
Syntax
SapObject.SapModel.CableObj.SetLoadDistributedWithGUID
VB6 Procedure
Function SetLoadDistributedWithGUID (ByVal Name As String, ByVal LoadPat
As String, ByVal MyType As Long, ByVal Dir As Long, ByVal Value As Double,
ByRef GUID As String, Optional ByVal CSys As String = "Global", Optional ByVal
Replace As Boolean = True) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is 1 or 2, indicating the type of distributed load.
1 = Force per unit length
2 = Moment per unit length
Dir
This is 1, 2, 3, 4, 5, 6 or 10, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10) is in the negative Global Z direction.
Value
This is the load value of the distributed load. The distributed load is applied over
the full length of the cable. [F/L] when MyType is 1 and [FL/L] when MyType is 2
GUID
This is the global unique ID of a distributed load assigned to the cable object or if
it is not the global unique ID of a distributed load assigned to the cable object and
it is not blank, the global unique ID which is assigned to the newly assigned load.
If left blank, a new load assigned to the cable object and the value of this
parameter is set to the global unique ID of the newly assigned load.
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the loads are specified.
Replace
If this item is True and the input GUID is not the GUID of any distributed load
assigned to the cable object, all previous distributed loads, if any, assigned to the
specified cable object, in the specified load pattern, are deleted before making
the new assignment. If the input GUID is the GUID of a distributed load already
assigned to the frame object, the parameters of the distributed load are updated
with the values provided and this item is ignored.
If this item is True, all previous loads, if any, assigned to the specified cable
object(s), in the specified load pattern, are deleted before making the new
assignment.
Remarks
If the cable object is already assigned a distributed load with a global unique ID
matching the specified global unique ID, this function modifies that distributed
load. Otherwise, this function assigns a new distributed load over the full length
of the cable object and sets its global unique ID to the specified global unique ID.
This function assigns uniform distributed loads over the full length of cable
objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadDistributedWithGUID
DeleteLoadDistributedWithGUID
SetLoadGravity
Syntax
SapObject.SapModel.CableObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified
cable object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to cable objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable gravity loads


ret = SapModel.CableObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadStrain
Syntax
SapObject.SapModel.CableObj.SetLoadStrain
VB6 Procedure
Function SetLoadStrain(ByVal Name As String, ByVal LoadPat As String, ByVal
Strain As Double, Optional ByVal Replace As Boolean = True, Optional ByVal
PatternName As String = "", Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Strain
This is the axial strain load value. [L/L]
Replace
If this item is True, all previous strain loads, if any, assigned to the specified
cable object(s), in the specified load pattern, are deleted before making the new
assignment.
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the strain load
for the cable object is uniform along the object at the value specified by Strain.
If PatternName is the name of a defined joint pattern, the strain load for the
cable object is based on the specified strain value multiplied by the pattern value
at the joints at each end of the cable object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns strain loads to cable objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create apModel object


Set SapModel = SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret= SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret= SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable strain load


ret= SapModel.CableObj.SetLoadStrain(Name, "DEAD", 0.001)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
DeleteLoadStrain
SetLoadTargetForce
Syntax
SapObject.SapModel.CableObj.SetLoadTargetForce
VB6 Procedure
Function SetLoadTargetForce(ByVal Name As String, ByVal LoadPat As String,
ByRef P As Double, ByRef RD As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
P
This is the axial target force value. [F]
RD
This is the relative distance along the cable object to the location where the
target force value applies. The relative distance must be between 0 and 1, 0 <=
RD <=1.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns target forces to cable objects.
The function returns zero if the target forces are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignCableTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable target force


ret = SapModel.CableObj.SetLoadTargetForce(Name, "DEAD", 50,
0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
DeleteLoadTargetForce
SetLoadTemperature
Syntax
SapObject.SapModel.CableObj.SetLoadTemperature
VB6 Procedure
Function SetLoadTemperature(ByVal Name As String, ByVal LoadPat As String,
ByVal Val As Double, Optional ByVal PatternName As String = "", Optional ByVal
Replace As Boolean = True, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Val
This is the temperature change value. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the temperature
load for the cable object is uniform along the object at the value specified by Val.
If PatternName is the name of a defined joint pattern, the temperature load for
the cable object is based on the specified temperature value multiplied by the
pattern value at the joints at each end of the cable object.
Replace
If this item is True, all previous temperature loads, if any, assigned to the
specified cable object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns temperature loads to cable objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable temperature load


ret = SapModel.CableObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
DeleteLoadTemperature
SetMass
Syntax
SapObject.SapModel.CableObj.SetMass
VB6 Procedure
Function SetMass(ByVal Name As String, ByVal MassOverL As Double,
Optional ByVal Replace As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
MassOverL
The mass per unit length assigned to the cable object. [M/L]
Replace
If this item is True, all existing mass assignments to the cable object are
removed before assigning the specified mas. If it is False, the specified mass is
added to any mass already assigned to the cable object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns mass per unit length to cable objects.
The function returns zero if the mass is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable mass


ret = SapModel.CableObj.SetMass("ALL", .0001, False, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
DeleteMass
SetMaterialOverwrite
Syntax
SapObject.SapModel.CableObj.SetMaterialOverwrite
VB6 Procedure
Function SetMaterialOverwrite(ByVal Name As String, ByVal PropName As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
PropName
This is None or a blank string, indicating that any existing material overwrites
assigned to the specified cable objects are to be removed, or it is the name of
an existing material property.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function sets the material overwrite assignment for cable objects.
The function returns zero if the material overwrite assignment is successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub AssignCableMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by coordinates


ret = SapModel.CableObj.AddByCoord(-300, 0, 0, -100, 0, 124,
Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign material overwrite


ret = SapModel.CableObj.SetMaterialOverwrite(Name,
"4000Psi")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMaterialOverwrite
SetMatTemp
Syntax
SapObject.SapModel.CableObj.SetMatTemp
VB6 Procedure
Function SetMatTemp(ByVal Name As String, ByVal Temp As Double, Optional
ByVal PatternName As String = "", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
Temp
This is the material temperature value assigned to the cable object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the cable object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the cable object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the cable object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns material temperatures to cable objects.
The function returns zero if the material temperatures are successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub AssignCableMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign material temperature


ret = SapModel.CableObj.SetMatTemp("ALL", 50, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
SetModifiers
Syntax
SapObject.SapModel.CableObj.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
Value
This is an array of three unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Mass modifier
Value(2) = Weight modifier
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function sets the cable modifier assignment for cable objects. The default
value for all modifiers is one.
The function returns zero if the modifier assignments are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignCableModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign modifiers
ReDim Value(2)
For i = 0 To 2
Value(i) = 1
Next i
Value(0) = 100
ret = SapModel.CableObj.SetModifiers(Name, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
DeleteModifiers
SetOutputStations
Syntax
SapObject.SapModel.CableObj.SetOutputStations
VB6 Procedure
Function SetOutputStations(ByVal Name As String, ByVal MyType As Long,
ByVal MaxSegSize As Double, ByVal MinSections As Long, Optional ByVal
NoOutPutAndDesignAtElementEnds As Boolean, Optional ByVal
NoOutPutAndDesignAtPointLoads As Boolean, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
MyType
This is 1 or 2, indicating how the output stations are specified.
1 = maximum segment size, that is, maximum station spacing
2 = minimum number of stations
MaxSegSize
The maximum segment size, that is, the maximum station spacing. This item
applies only when MyType = 1. [L]
MinSections
The minimum number of stations. This item applies only when MyType = 2.
NoOutPutAndDesignAtElementEnds
If this item is True, no additional output stations are added at the ends of line
elements when the cable object is internally meshed.
NoOutPutAndDesignAtPointLoads
If this item is True, no additional output stations are added at point load
locations.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns cable object output station data.
The function returns zero if the data is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignCableOutputStationData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'assign cable output station data


ret = SapModel.CableObj.SetOutputStations(Name, 1, 18, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOutputStations
SetProperty
Syntax
SapObject.SapModel.CableObj.SetProperty
VB6 Procedure
Function SetProperty(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
PropName
The name of a cable property to be assigned to the specified cable object(s).
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the cable object specified by the
Name item.
If this item is Group, the assignment is made to all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected cable objects,
and the Name item is ignored.
Remarks
This function assigns a cable property to a cable object.
The function returns zero if the cable property is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub SetCableSectionProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'set cable property


ret = SapModel.CableObj.SetProperty(Name, "CAB1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
SetSelected
Syntax
Sap2000.CableObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing cable object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified cable object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the cable object specified by
the Name item.
If this item is Group, the selected status is set for all cable objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected cable
objects, and the Name item is ignored.
Remarks
This function sets the selected status for a cable object.
The function returns zero if the selected status is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetCableObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add cable object by points


ret = SapModel.CableObj.AddByPoint("1", "6", Name)

'set cable data


ret = SapModel.CableObj.SetCableData(Name, 7, 1, 0, 0, 24)

'set cable object selected


ret = SapModel.CableObj.SetSelected(Name, True)

'update view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
DeleteAllFrameForces
Syntax
SapObject.SapModel.ExternalAnalysisResults.DeleteAllFrameForces
VB6 Procedure
Function DeleteAllFrameForces () As Long
Remarks
This function deletes all the external results previously provided for all frame objects.
The function returns zero if the results are successfully deleted, otherwise it returns a
nonzero value.
VBA Example
Sub DeleteAllFrameExternalResultForces ()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)
'set frame external result forces at case first step
ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'delete all frame external results


ret = SapModel.ExternalAnalysisResults.DeleteAllFrames()

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
DeleteFrameForces
Syntax
SapObject.SapModel.ExternalAnalysisResults.DeleteFrameForces
VB6 Procedure
Function DeleteFrameForces (Name As String) As Long
Parameters
Name
The name of an existing frame object.
Remarks
This function deletes all the external results previously provided for a given frame
object. This function returns zero if the external results are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameExternalResults ()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String()
{"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)

'set frame external result forces at case first step


ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1",
"EXTERNAL", 0, P, V2, V3, T, M2, M3)
ret =
SapModel.ExternalAnalysisResults.DeleteFrameForces("1")

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
GetFrameForces
Syntax
SapObject.SapModel.ExternalAnalysisResults.GetFrameForce
VB6 Procedure
Function GetFrameForce(ByVal Name As String, ByVal InitialCase As String, _
ByVal NumStep As Long, ByRef NumberStations As Long,
_
ByRef P() As Double, ByRef V2() As Double, _
ByRef V3() As Double, ByRef T() As Double, _
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing frame object.
InitialCase
The name of an existing external results load case for which external results relevant
to the object may have been previously provided.
NumStep
The zero based index of a load case step: 0 for the first step, 1 for the second, and
so on.
NumberStations
The number of frame stations on the object at which external result forces are
reported.
P, V2, V3
One dimensional arrays that include the axial force, shear force in the local 2 direction,
and shear force in the local 3 direction, respectively, for each frame station. [F]
T, M2, M3
One dimensional arrays that include the torsion, moment about the local 2axis, and
moment about the local 3-axis, respectively, for each frame station. [FL]
Remarks
This function reports the external result forces for a given step of a given external
results load case on a given object.
The function returns zero if the external result forces are successfully recovered,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameExternalResultForces ()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}
Dim numberStations As Long

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel()

'create model from template


ret = SapModel.File.New2DFrame(e2DFrameType.PortalFrame,
3, 124, 3, 200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")
ret =
SapModel.LoadCases.ExternalResults.SetNumberSteps("EXTERNAL", 1)

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)

'set frame external result forces at case first step


ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)
ret = SapModel.ExternalAnalysisResults.GetFrameForce("1",
"EXTERNAL", 0, numberStations, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
GetFrameStations
Syntax
SapObject.SapModel.ExternalAnalysisResults.GetFrameStations
VB6 Procedure
Function GetFrameStations(Name As String, ByRef nStations As Long, ByRef
ObjSta() As Double) As Long
Parameters
Name
The name of an existing frame object.
nStation
Number of the stations of an existing frame object.
ObjSta
This is an array that includes the distance measured from the I-end of the object to
the result location.
Remarks
This function gets the frame stations on a frame object for which user-supplied
external analysis results are available.
The function returns zero if the stations are successfully get, otherwise it returns a
nonzero value.
VBA Example
Sub GetFrameExternalResultStations()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim nStations As Long
Dim Sta() As Double
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)
ret =
SapModel.ExternalAnalysisResults.GetFrameStations("1",
nStations, Sta)

'set frame external result forces at case first step


ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
PresetFrameCases
Syntax
SapObject.SapModel.ExternalAnalysisResults.PresetFrameCases
VB6 Procedure
Function PresetFrameCases(Name As String, ByVal Count As Long, ByRef casname()
As String) As Long
Parameters
Name
The name of an existing frame object.
Count
The length of the subsequent array.
casename
An array listing the names of previously defined external result load cases for which
user-supplied external analysis results are available for the frame object.
Remarks
Calling this function is optional, but it can speed up subsequent assignment of external
analysis results which are available for more than one load case.
The first time this function is called for a particular frame object, it sets the list of
names of external result load cases for which results relevant to the object are
available. Subsequent calls to this function for the same object reset the results for
load cases already in the list, and add load cases not already in.
This function returns zero if the stations are successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub PresetFrameExternalCases()

'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)
'set frame external result forces at case first step
ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
SetFrameForceMultiple
Syntax
SapObject.SapModel.ExternalAnalysisResults.SetFrameForceMultiple
VB6 Procedure
Function SetFrameForceMultiple(ByVal NumberFrameNames As Long, ByVal
FrameName() As String, ByVal NumberLoadCases As Long, ByVal LoadCase() As
String, ByVal FirstStep() As Long, ByVal LastStep() As Long, ByRef P() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
NumberFrameNames
The number of input frames
FrameName
An array of existing frame objects
NumberLoadCases
The number of input load cases
LoadCase
An array of existing external results load cases for which user-supplied external
analysis results relevant to the frame objects are available.
FirstStep
An array of the first step values for each load case. This should be of length
NumberLoadCases.
LastStep
An array of the last step values for each load case. This should be of length
NumberLoadCases.
P
An array of the axial forces for each frame station. [F]
V2
An array of the shear forces in the local 2 direction for each frame station. [F]
V3
An array of the shear forces in the local 3 direction for each frame station. [F]
T
An array of the torsion for each frame station. [F]
M2
An array of the moment about the local 2-axis for each frame station. [F]
M3
An array of the moment about the local 3-axis for each frame station. [F]
Remarks
This function sets the external result forces for all input frames and load cases.
The P, V2, V3, T, M2, M3 arrays should be of length:
(Sum of all steps for all input Load Cases) * (Sum of all stations for all input Frames)

As an example, consider setting results for two Frames, each with two defined
Stations, for two Load Cases, each Load Case containing three steps, eg First Step =
1, Last step = 3.
The values of this array will be iterated over in the following order:
The P[0] value will be the axial force for FrameName[0], LoadCase[0], FirstStep[0],
1st Station
The P[1] value will be the axial force for FrameName[0], LoadCase[0], FirstStep[0],
2nd Station
The P[2] value will be the axial force for FrameName[0], LoadCase[0], FirstStep[0]+1,
1st Station
The P[3] value will be the axial force for FrameName[0], LoadCase[0], FirstStep[0]+1,
2nd Station
The P[4] value will be the axial force for FrameName[0], LoadCase[0], LastStep[0],
1st Station
The P[5] value will be the axial force for FrameName[0], LoadCase[0], LastStep[0],
2nd Station
The P[6] value will be the axial force for FrameName[0], LoadCase[1], FirstStep[1],
1st Station
The P[7] value will be the axial force for FrameName[0], LoadCase[1], FirstStep[1],
2nd Station
The P[8] value will be the axial force for FrameName[0], LoadCase[1], FirstStep[1]+1,
1st Station
The P[9] value will be the axial force for FrameName[0], LoadCase[1], FirstStep[1]+1,
2nd Station
The P[10] value will be the axial force for FrameName[0], LoadCase[1], LastStep[1],
1st Station
The P[11] value will be the axial force for FrameName[0], LoadCase[1], LastStep[1],
2nd Station
The P[12] value will be the axial force for FrameName[1], LoadCase[0], FirstStep[0],
1st Station
And so on

The number of stations must be previously declared using SetFrameStations

Enter 0 for any unneeded values in these arrays

The function returns zero if the forces are successfully set, otherwise it returns a
nonzero value.
VBA Example
Release Notes
Initial Release in version 16.0.0.
SetFrameForce
Syntax
SapObject.SapModel.ExternalAnalysisResults.SetFrameForce
VB6 Procedure
Function SetFrameForce(ByVal Name As String, ByVal InitialCase As String, ByVal
StepNum As Long, ByRef P() As Double, ByRef V2() As Double, ByRef V3() As
Double, ByRef T() As Double, ByRef M2() As Double, ByRef M3() As Double) As
Long
Parameters
Name
The name of an existing frame object.
InitialCase
The name of an existing external results load case for which user-supplied external
analysis results relevant to the object are available.
StepNum
The zero based index of a load case step: 0 for the first step, 1 for the second, and
so on.
P, V2, V3
These are one dimensional arrays that include the axial force, shear force in the local
2 direction, and shear force in the local 3 direction, respectively, for each frame
station.[F] These arrays are each expected to contain a number of values equal to
the previously declared number of stations at which external results are available for
the object see SapObject.SapModel.ExternalAnalysisResults.SetFrameStations()
for that declaration.
If any of these arrays is empty, the function substitutes zero values for the missing
values.
T, M2, M3
These are one dimensional arrays that include the torsion, moment about the local
2axis, and moment about the local 3-axis, respectively, for each frame station. [FL]
Again, these arrays are each expected to contain a number of values equal to
the previously declared number of stations at which external results are provided for
the object. If any of these arrays is empty, the function substitutes zero values for the
missing values.
Remarks
This function sets the external result forces for a given step of a given external results
load case on a frame object.
The function returns zero if the forces are successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetFrameExternalResultForces ()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)
'set frame external result forces at case first step
ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
SetFrameStations
Syntax
SapObject.SapModel.ExternalAnalysisResults.SetFrameStations
VB6 Procedure
Function SetFrameStations(Name As String, ByRef ObjSta() As Double) As Long
Parameters
Name
The name of an existing frame object.
ObjSta
This is an array that includes the distance measured from the I-end of the object to
the result location.
Remarks
This function sets the frame stations on a frame object for which user-supplied
external analysis results are available.
The function returns zero if the stations are successfully set, otherwise it returns a
nonzero value.
VBA Example
SubSetFrameExternalResultStations()

'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ObjSta() As Double = New Double() {0.0, 124.0}
Dim LoadCase() As String = New String() {"EXTERNAL"}
Dim P() As Double = New Double() {5.0, 5.0}
Dim V2() As Double = New Double() {-5.0, 5.0}
Dim V3() As Double = Nothing
Dim T() As Double = Nothing
Dim M2() As Double = Nothing
Dim M3() As Double = New Double() {100.0, 100.0}

'create Sap2000 object


SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart()

'create SapModel object


SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret =
SapModel.File.New2DFrame(e2DFrameType.PortalFrame, 3, 124, 3,
200)

'create load case for external results


ret =
SapModel.LoadCases.ExternalResults.SetCase("EXTERNAL")

'set cases and stations for frame external results


ret =
SapModel.ExternalAnalysisResults.PresetFrameCases("1", 1,
LoadCase)
ret =
SapModel.ExternalAnalysisResults.SetFrameStations("1", ObjSta)
'set frame external result forces at case first step
ret =
SapModel.ExternalAnalysisResults.SetFrameForce("1", "EXTERNAL",
0, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit(False)
SapModel = Nothing
SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.00.
AddByCoord
Syntax
SapObject.SapModel.FrameObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByVal xi As Double, ByVal yi As Double, ByVal zi As
Double, ByVal xj As Double, ByVal yj As Double, ByVal zj As Double, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "", Optional ByVal CSys As String = "Global") As Long
Parameters
xi, yi, zi
The coordinates of the I-End of the added frame object. The coordinates are in
the coordinate system defined by the CSys item.
xj, yj, zj
The coordinates of the J-End of the added frame object. The coordinates are in
the coordinate system defined by the CSys item.
Name
This is the name that the program ultimately assigns for the frame object. If no
UserName is specified, the program assigns a default name to the frame object.
If a UserName is specified and that name is not used for another frame, cable
or tendon object, the UserName is assigned to the frame object, otherwise a
default name is assigned to the frame object.
PropName
This is Default, None, or the name of a defined frame section property.
If it is Default, the program assigns a default section property to the frame
object. If it is None, no section property is assigned to the frame object. If it is
the name of a defined frame section property, that property is assigned to the
frame object.
UserName
This is an optional user specified name for the frame object. If a UserName is
specified and that name is already used for another frame object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the frame object end point
coordinates are defined.
Remarks
This function adds a new frame object whose end points are at the specified
coordinates.
The function returns zero if the frame object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddFrameObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add frame object by coordinates


ret = SapModel.FrameObj.AddByCoord(-300, 0, 0, -100, 0, 124,
Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
AddByPoint
Syntax
SapObject.SapModel.FrameObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByVal Point1 as String, ByVal Point2 as String, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "") As Long
Parameters
Point1
The name of a defined point object at the I-End of the added frame object.
Point2
The name of a defined point object at the J-End of the added frame object.
Name
This is the name that the program ultimately assigns for the frame object. If no
UserName is specified, the program assigns a default name to the frame object.
If a UserName is specified and that name is not used for another frame, cable
or tendon object, the UserName is assigned to the frame object, otherwise a
default name is assigned to the frame object.
PropName
This is Default, None, or the name of a defined frame section property.
If it is Default, the program assigns a default section property to the frame
object. If it is None, no section property is assigned to the frame object. If it is
the name of a defined frame section property, that property is assigned to the
frame object.
UserName
This is an optional user specified name for the frame object. If a UserName is
specified and that name is already used for another frame object, the program
ignores the UserName.
Remarks
This function adds a new frame object whose end points are specified by name.
The function returns zero if the frame object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddFrameObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add frame object by points


ret = SapModel.FrameObj.AddByPoint("1", "6", Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
ChangeName
Syntax
SapObject.SapModel.FrameObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined frame object.
NewName
The new name for the frame object.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangeFrameObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name
ret = SapModel.FrameObj.ChangeName("1", "MyFrame")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.FrameObj.Count
VB6 Procedure
Function Count(Optional ByVal MyType As String = "All") As Long
Parameters
MyType
This is All, Straight, or Curved.
All returns a count of all frame objects in the model, including both straight and
curved frame objects. Straight returns a count of all straight frame objects in the
model. Curved returns a count of all curved frame objects in the model.
Remarks
This function returns a count of the frame objects in the model. Depending on
the value of the MyType item, the count may be of all frame objects in the model,
just the straight frame objects in the model or just the curved frame objects in the
model.
VBA Example
Sub CountFrameObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of frame objects


Count = SapModel.FrameObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.FrameObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the frame object specified by the Name item is deleted.
If this item is Group, all of the frame objects in the group specified by the Name
item are deleted.
If this item is SelectedObjects, all selected frame objects are deleted, and the
Name item is ignored.
Remarks
The function deletes frame objects.
The function returns zero if the frame object is successfully deleted, otherwise it
returns a nonzero value.
VBA Example
Sub DeleteFrameObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete frame object


ret = SapModel.FrameObj.Delete("1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteFireproofing
Syntax
SapObject.SapModel.FrameObj.DeleteFireproofing
VB6 Procedure
Function DeleteFireproofing(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the fireproofing assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the fireproofing assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects, the fireproofing assignments are deleted for all
selected frame objects, and the Name item is ignored.
Remarks
This function deletes the fireproofing assignments for frame objects.
The function returns zero if the fireproofing assignments are successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeleteFireproofing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign fireproofing
ret = SapModel.FrameObj.SetFireproofing("ALL", 1, 2, 0,
8.68E-06, False, Group)

'delete fireproofing
ret = SapModel.FrameObj.DeleteFireproofing("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetFireproofing
SetFireproofing
DeleteLateralBracing
Syntax
SapObject.SapModel.FrameObj.DeleteLateralBracing
VB6 Procedure
Function DeleteLateralBracing(ByVal Name As String, Optional ByVal MyType
As Long = 3, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1, 2 or 3, indicating the bracing to be deleted.
1 = Delete point bracing
2 = Delete uniform bracing
3 = Delete both point and uniform bracing
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the lateral bracing assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the lateral bracing assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects then the lateral bracing assignments are deleted
for all selected frame objects, and the Name item is ignored.
Remarks
This function deletes the lateral bracing assignments for frame objects.
The function returns zero if the assignments are successfully deleted; otherwise
it returns a nonzero value.
VBA Example
Sub DeleteFrameLatealBracing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign frame lateral bracing


ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0.25,
0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 1, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 2, 1, 0.5, 1)

'delete frame lateral bracing


ret = SapModel.FrameObj.DeleteLateralBracing("8", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetLateralBracing
GetLateralBracing
DeleteLoadDeformation
Syntax
SapObject.SapModel.FrameObj.DeleteLoadDeformation
VB6 Procedure
Function DeleteLoadDeformation(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the deformation load assignments to the specified frame
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.FrameObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'delete frame deformation load


ret = SapModel.FrameObj.DeleteLoadDeformation("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
SetLoadDeformation
DeleteLoadDistributed
Syntax
SapObject.SapModel.FrameObj.DeleteLoadDistributed
VB6 Procedure
Function DeleteLoadDistributed(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the distributed load assignments to the specified frame
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame distributed loads


ret = SapModel.FrameObj.SetLoadDistributed("14", "DEAD", 1,
10, 0, 1, 0.08, 0.08)
ret = SapModel.FrameObj.SetLoadDistributed("15", "DEAD", 1,
10, 0, 1, 0.08, 0.08)

'delete frame distributed load


ret = SapModel.FrameObj.DeleteLoadDistributed("14", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDistributed
SetLoadDistributed
DeleteLoadDistributedWithGUID
Syntax
SapObject.SapModel.FrameObj.DeleteLoadDistributedWithGUID
VB6 Procedure
Function DeleteLoadDistributedWithGUID(ByVal Name As String, ByVal GUID
As String) As Long
Parameters
Name
The name of an existing frame object.
GUID
The global unique ID of one of the distributed loads on that frame object.
Remarks
This function deletes the distributed load assignment with the specified global
unique ID for the frame objects for the specified frame object.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.20.
See Also
GetLoadDistributedWithGUID
SetLoadDistributedWithGUID
DeleteLoadGravity
Syntax
SapObject.SapModel.FrameObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object,the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified frame objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame gravity loads


ret = SapModel.FrameObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete frame gravity load


ret = SapModel.FrameObj.DeleteLoadGravity("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadPoint
Syntax
SapObject.SapModel.FrameObj.DeleteLoadPoint
VB6 Procedure
Function DeleteLoadPoint(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the point load assignments to the specified frame objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFramePointLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame point loads


ret = SapModel.FrameObj.SetLoadPoint("14", "DEAD", 1, 10,
.5, 20)
ret = SapModel.FrameObj.SetLoadPoint("15", "DEAD", 1, 10,
.5, 20)

'delete frame point load


ret = SapModel.FrameObj.DeleteLoadPoint("14", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPoint
SetLoadPoint
DeleteLoadPointWithGUID {Frame Object}
Syntax
SapObject.SapModel.FrameObj.DeleteLoadPointWithGUID
VB6 Procedure
Function DeleteLoadPointWithGUID(ByVal Name As String, ByVal GUID As
String) As Long
Parameters
Name
The name of an existing frame object.
GUID
The global unique ID for one of the point loads on that frame object.
Remarks
This function deletes the point load assignment with the specified global unique
ID for the specified frame object.
The function returns zero if the load assignment is successfully deleted,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadPointWithGUID
SetLoadPointWithGUID
DeleteLoadStrain
Syntax
SapObject.SapModel.FrameObj.DeleteLoadStrain
VB6 Procedure
Function DeleteLoadStrain(ByVal Name As String, ByVal LoadPat As String,
ByVal DOF As Long, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom to which the strain load
is applied.
1= Strain11
2= Strain12
3= Strain13
4= Curvature1
5= Curvature2
6= Curvature3
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the strain load assignments to the specified frame objects,
for the specified load pattern, for the specified degree of freedom.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame strain load


ret = SapModel.FrameObj.SetLoadStrain("1", "DEAD", 1, 0.001)
ret = SapModel.FrameObj.SetLoadStrain("2", "DEAD", 1, 0.001)

'delete frame strain load


ret = SapModel.FrameObj.DeleteLoadStrain("1", "DEAD", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
SetLoadStrain
DeleteLoadTargetForce
Syntax
SapObject.SapModel.FrameObj.DeleteLoadTargetForce
VB6 Procedure
Function DeleteLoadTargetForce(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the target force assignments to the specified frame objects
for the specified load pattern.
The function returns zero if the target force assignments are successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 0.5
ret = SapModel.FrameObj.SetLoadTargetForce("1", "DEAD", DOF,
f, RD)
ret = SapModel.FrameObj.SetLoadTargetForce("2", "DEAD", DOF,
f, RD)

'delete frame target force


ret = SapModel.FrameObj.DeleteLoadTargetForce("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
SetLoadTargetForce
DeleteLoadTemperature
Syntax
SapObject.SapModel.FrameObj.DeleteLoadTemperature
VB6 Procedure
Function DeleteLoadTemperature(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the frame object
specified by the Name item.
If this item is Group, the load assignments are deleted for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
frame objects, and the Name item is ignored.
Remarks
This function deletes the temperature load assignments to the specified frame
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame temperature load


ret = SapModel.FrameObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'delete frame temperature load


ret = SapModel.FrameObj.DeleteLoadTemperature("3", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
SetLoadTemperature
DeleteMass
Syntax
SapObject.SapModel.FrameObj.DeleteMass
VB6 Procedure
Function DeleteMass(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the frame mass assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the frame mass assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects, the frame mass assignments are deleted for all
selected frame objects and the Name item is ignored.
Remarks
This function deletes the frame mass assignments for frame objects.
The function returns zero if the mass assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame mass


ret = SapModel.FrameObj.SetMass("ALL", .0001, False, Group)

'delete frame mass


ret = SapModel.FrameObj.DeleteMass("15")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
SetMass
DeleteModifiers
Syntax
SapObject.SapModel.FrameObj.DeleteModifiers
VB6 Procedure
Function DeleteModifiers(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the frame modifier assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the frame modifier assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects, the frame modifier assignments are deleted for
all selected frame objects, and the Name item is ignored.
Remarks
This function deletes the frame modifier assignments for frame objects.
The function returns zero if the modifier assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteFrameModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.FrameObj.SetModifiers("ALL", Value, Group)

'delete modifiers
ret = SapModel.FrameObj.DeleteModifiers("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
SetModifiers
DeletePDeltaForce
Syntax
SapObject.SapModel.FrameObj.DeletePDeltaForce
VB6 Procedure
Function DeletePDeltaForce(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the frame modifier assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the frame modifier assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects, the frame modifier assignments are deleted for
all selected frame objects, and the Name item is ignored.
Remarks
This function deletes the P-Delta force assignments for frame objects.
The function returns zero if the assignments are successfully deleted, otherwise
it returns a nonzero value.
VBA Example
Sub DeletePDeltaForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign P-Delta force


ret = SapModel.FrameObj.SetPDeltaForce("ALL", 100, 0, True,
, Group)

'delete P-Delta force


ret = SapModel.FrameObj.DeletePDeltaForce("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPDeltaForce
SetPDeltaForce
DeleteSpring
Syntax
SapObject.SapModel.FrameObj.DeleteSpring
VB6 Procedure
Function DeleteSpring(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the frame spring assignments are deleted for the frame
object specified by the Name item.
If this item is Group, the frame spring assignments are deleted for all frame
objects in the group specified by the Name item.
If this item is SelectedObjects, the frame spring assignments are deleted for all
selected frame objects and the Name item is ignored.
Remarks
This function deletes all spring assignments for the specified frame objects.
The function returns zero if the assignments are successfully deleted, otherwise
it returns a nonzero value.
VBA Example
Sub DeleteFrameSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign springs to frame


ReDim Vec(2)
ret = SapModel.FrameObj.SetSpring("ALL", 1, 1, 1, "", 1, 2,
0, Vec, 0, False, "Local", Group)

'delete springs
ret = SapModel.FrameObj.DeleteSpring("15")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
SetSpring
GetAutoMesh
Syntax
SapObject.SapModel.FrameObj.GetAutoMesh
VB6 Procedure
Function GetAutoMesh(ByVal Name As String, ByRef AutoMesh As Boolean,
ByRef AutoMeshAtPoints As Boolean, ByRef AutoMeshAtLines As Boolean,
ByRef NumSegs As Long, ByRef AutoMeshMaxLength As Double) As Long
Parameters
Name
The name of an existing frame object.
AutoMesh
This item is True if the frame object is to be automatically meshed by the
program when the analysis model is created.
AutoMeshAtPoints
This item is applicable only when the AutoMesh item is True. If this item is True,
the frame object is automatically meshed at intermediate joints along its length.
AutoMeshAtLines
This item is applicable only when the AutoMesh item is True. If this item is True,
the frame object is automatically meshed at intersections with other frames,
area object edges and solid object edges.
NumSegs
This item is applicable only when the AutoMesh item is True. It is the minimum
number of elements into which the frame object is automatically meshed. If this
item is zero, the number of elements is not checked when the automatic meshing
is done.
AutoMeshMaxLength
This item is applicable only when the AutoMesh item is True. It is the maximum
length of auto meshed frame elements. If this item is zero, the element length is
not checked when the automatic meshing is done. [L]
Remarks
This function retrieves the automatic meshing assignments to frame objects.
The function returns zero if the meshing assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoMesh As Boolean
Dim AutoMeshAtPoints As Boolean
Dim AutoMeshAtLines As Boolean
Dim NumSegs As Long
Dim AutoMeshMaxLength As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign automesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, True, True,
0, 0, Group)

'get automesh assignment


ret = SapModel.FrameObj.GetAutoMesh("3", AutoMesh,
AutoMeshAtPoints, AutoMeshAtLines,NumSegs, AutoMeshMaxLength)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetAutoMesh
GetCurved_1
Syntax
SapObject.SapModel.FrameObj.GetCurved_1
VB6 Procedure
Function GetCurved_1(ByRef NumberItems As Integer, ByRef MyName As
String(), ByRef MyType() As Integer, ByRef gx() As Double, ByRef gy() As
Double, ByRef gz() As Double, ByRef PointName() As String, ByRef Radius()
As Double, ByRef NumSegs() As Integer) As Long
Parameters
NumberItems
The number of curved frame objects returned.
MyName
This is a one-dimensional array of frame object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String
The array is dimensioned to (NumberNames 1) inside the Sap2000
program, filled with the names, and returned to the APIuser
MyType
This is an array that includes a numeric value indicating the curved frame type.
The type is 1, 2, 3, 4, or 5.
1= Circular Arc Specified by a Third Point Name
2= Circular Arc Specified by Third Point Coordinates
3= Circular Arc Specified by Planar Point Coordinates and Radius
4= Parabolic Arc Specified by a Third Point Name
5= Parabolic Arc Specified by Third Point Coordinates

MyTypes 1, 2, 4, and 5 all define the curve by three points. The three points are
the two end point of the frame object and a third point defined by naming an
existing point object or specifying point coordinates.
MyType 3 defines a circular curved frame by it end points, the coordinates of
another point that lies in the plane of the curve but not necessarily on the curved
frame, and a curve radius.
gx, gy, gz
These are arrays that include the point coordinates in the global coordinate
system. [L]
For MyType 1 and 4 these items do not apply.
For MyType 2 and 5 these are the coordinates of the third point on the curved
frame.
For MyType 3 these are the coordinates of the planar point that lies in the plane
of the curved frame.
PointName
This is an array that includes the name of the point object that is the third point
on the curved frame. This item applies for MyType 1 and 4. It does not apply for
MyType 2, 3 and 5.
Radius
This is an array of the radii of the circular curved frame. This item only applies
for MyType 3. [L]
NumSegs
This is an array that includes the number of segments into which the program
internally divides the curved frame.
Remarks
This function retrieves definition data for all curved frame objects and returns
the data in arrays.
The function returns zero if the curved frame object data is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCurvedFrames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyName() As String
Dim MyType() As Long
Dim gx() As Double
Dim gy() As Double
Dim gz() As Double
Dim PointName() As String
Dim Radius() As Double
Dim NumSegs() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set frames curved


ret = SapModel.FrameObj.SetCurved("13", 1, 0, 0, 0, "1", 0,
16)
ret = SapModel.FrameObj.SetCurved("14", 2, -200, 0, 176, "",
0, 16)
ret = SapModel.FrameObj.SetCurved("15", 3, 0, 0, 0, "", 100,
16)
ret = SapModel.FrameObj.SetCurved("16", 4, 0, 0, 0, "3", 0,
16)
ret = SapModel.FrameObj.SetCurved("17", 5, 0, 0, 176, "", 0,
16)
'get curved frame data
ret = SapModel.FrameObj.GetCurved_1(NumberItems, MyName,
MyType, gx, gy, gz, PointName, Radius, NumSegs)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0.
This function supercedes GetCurved.
See Also
SetStraight
SetCurved
GetType
GetDAMModifiers
Syntax

SapObject.SapModel.FrameObj.GetDAMModifiers
VB6 Procedure
Function GetDAMModifiers(ByVal Name As String, ByRef EAModifier As Double,
ByRef EIModifier As Double) As Long
Parameters
Name
The name of an existing frame section whose design type is Steel Frame design.

EAModifier
The modification factor for axial stiffness if the Direct Analysis method is used.

EIModifier
The modification factor for flexural stiffness if the Direct Analysis method is used.
Remarks
This function gets the modification factors for axial and flexural stiffness for a frame
object if the Direct Analysis method is used.

The function returns zero if the factors are successfully retrieved, otherwise it returns
a nonzero value. The function will return nonzero the modification factors are not
available for the frame object.
VBA Example
Sub GetDAMModifiers()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim EAModifier As Double
Dim EIModifier As Double

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'set the steel frame design code


ret =SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")

'save model
ret = SapModel.File.Save("C:\SapAPI\x.sdb")

'run analysis
ret =SapModel.Analyze.RunAnalysis

'run design
ret =SapModel.DesignSteel.StartDesign

'get direct analysis method modification factors


ret = SapModel.FrameObj.GetDAMModifiers("1", EAModifier,
EIModifier)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetDesignProcedure
Syntax
SapObject.SapModel.FrameObj.GetDesignProcedure
VB6 Procedure
Function GetDesignProcedure(ByVal Name As String, ByRef MyType As Long)
As Long
Parameters
Name
The name of an existing frame object.
MyType
This is 1, 2, 7, 8 or 9, indicating the design procedure for the specified frame
object.
1= Steel
2= Concrete
7= Aluminum
8= Cold Formed
9= No Design
Remarks
This function retrieves the design procedure for a frame object.
The function returns zero if the design procedure is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameObjDesignProcedure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get design procedure


ret = SapModel.FrameObj.GetDesignProcedure("8", MyType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
SetDesignProcedure
GetElm
Syntax
SapObject.SapModel.FrameObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef nelm As Long, ByRef Elm() as
String, ByRef RDI() As Double, ByRef RDJ() As Double) As Long
Parameters
Name
The name of an existing frame object.
nelm
The number of line elements created from the specified frame object.
Elm
An array that includes the name of a frame element created from the specified
frame object.
RDI
An array that includes the relative distance along the frame object to the I-End of
the frame element.
RDJ
An array that includes the relative distance along the line object to the J-End of
the frame element.
Remarks
This function retrieves the names of the frame elements (analysis model lines)
associated with a specified frame object in the object-based model. It also
retrieves information about the location of the frame elements along the frame
object.
This function returns zero if the frame element information is successfully
returned; otherwise it returns nonzero. An error occurs if the analysis model
does not exist.
VBA Example
Sub GetLineElementInfo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nelm As Long
Dim Elm() As String
Dim RDI() As Double
Dim RDJ() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element information


ret = SapModel.FrameObj.GetElm("5", nelm, Elm, RDI, RDJ)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEndLengthOffset
Syntax
SapObject.SapModel.FrameObj.GetEndLengthOffset
VB6 Procedure
Function GetEndLengthOffset(ByVal Name As String, ByRef AutoOffset As
Boolean, ByRef Length1 As Double, ByRef Length2 As Double, ByRef rz As
Double) As Long
Parameters
Name
The name of an existing frame object.
AutoOffset
If this item is True, the end length offsets are automatically determined by the
program from object connectivity.
Length1
The offset length along the 1-axis of the frame object at the I-End of the frame
object. [L]
Length2
The offset along the 1-axis of the frame object at the J-End of the frame object.
[L]
rz
The rigid zone factor. This is the fraction of the end offset length assumed to be
rigid for bending and shear deformations.
Remarks
This function retrieves the frame object end offsets along the 1-axis of the
object.
The function returns zero if the offsets are successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetFrameEndOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoOffset As Boolean
Dim Length1 As Double
Dim Length2 As Double
Dim rz As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get offsets
ret = SapModel.FrameObj.GetEndLengthOffset("15", AutoOffset,
Length1, Length2, rz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetEndLengthOffset
GetEndSkew
Syntax
SapObject.SapModel.FrameObj.GetEndSkew
VB6 Procedure
Function GetEndSkew(ByVal Name As String, ByRef SkewI As Double, ByRef
SkewJ As Double) As Long
Parameters
Name
The name of an existing frame object.
SkewI
The angle in degrees measured counter clockwise from the positive local 3-axis
to a line parallel to the I-End of the frame object (-90 < SkewI < 90). [deg]
SkewJ
The angle in degrees measured counter clockwise from the positive local 3-axis
to a line parallel to the J-End of the frame object (-90 < SkewJ < 90). [deg]
Remarks
This function retrieves frame object end skew assignments.
The function returns zero if the end skew data is successfully retrieved,
otherwise it returns a nonzero value.
End skew assignments are only applicable to straight frame objects. An error is
returned if skew data is requested for a curved frame object.
End skew data is only used in the program to plot the extruded view of bridge
objects that have been updated as spine models.
VBA Example
Sub GetFrameEndSkewData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SkewI As Double
Dim SkewJ As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get end skew data


ret = SapModel.FrameObj.GetEndSkew("15", SkewI, SkewJ)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetEndSkew
GetFireproofing_1
Syntax
SapObject.SapModel.FrameObj.GetFireProofing_1
VB6 Procedure
Function GetFireProofing_1(ByVal Name As String, ByRef MyType As Long,
ByRef Thickness As Double, ByRef Perimeter As Double, ByRef Density As
Double, ByRef tf As Boolean, ByRef IncludeInSelfWeight As Boolean, ByRef
IncludeInGravityLoads As Boolean, ByRef IncludeInThisLoadPattern As String)
As Long
Parameters
Name
The name of an existing frame object.
MyType
This is 1, 2 or 3, indicating the type of fireproofing assigned.
1 = Sprayed on - program calculate section perimeter
2 = Sprayed on - user provides section perimeter
3 = Concrete encased
Thickness
When MyType = 1 or MyType = 2 this is the thickness of the sprayed on
fireproofing. When MyType = 3 this is the concrete cover dimension. [L]
Perimeter
This item applies only when MyType = 2. It is the length of fireproofing applied
measured around the perimeter of the frame object cross-section. [L]
Density
This is the weight per unit volume of the fireproofing material. [F/L3]
tf
This item applies only when MyType = 1 or MyType = 3. If this item is True, the
fireproofing is assumed to be applied to the top flange of the section. If it is
False, the program assumes no fireproofing is applied to the section top flange.
This flag applies for I, channel and double channel sections.
IncludeInSelfWeight
If this item is True the fireproofing is included in the structure self weight.
IncludeInGravityLoads
If this item is True the fireproofing is included gravity loads applied in the X, Y
and Z directions.
IncludeInThisLoadPattern
This item is either None or the name of an existing load pattern. If it is the name
of a load pattern then the weight of the fireproofing is applied as a distributed
load in the global Z direction in the load pattern.
Remarks
This function gets the fireproofing assignment to an existing frame object.
The function returns zero if the fireproofing assignment is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFireproofing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim Thickness As Double
Dim Perimeter As Double
Dim Density As Double
Dim tf As Boolean
Dim IncludeInSelfWeight As Boolean
Dim IncludeInGravityLoads As Boolean
Dim IncludeInThisLoadPattern As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("Fireproofing",
LTYPE_SUPERDEAD)

'assign fireproofing, use in self weight and in load pattern


ret = SapModel.FrameObj.SetFireproofing_1("ALL", 1, 2, 0,
8.68E-06, False, True, False, "Fireproofing", Group)

'get fireproofing data for frame object 3


ret = SapModel. FrameObj.GetFireproofing_1("3", MyType,
Thickness, Perimeter, Density, tf, IncludeInSelfWeight,
IncludeInGravityLoads, IncludeInThisLoadPattern)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0. This function supercedes obsolete function
GetFireProofing
See Also
SetFireProofing_1
DeleteFireProofing
GetGUID
Syntax
SapObject.SapModel.FrameObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing frame object.
GUID
The GUID (Global Unique ID) for the specified frame object.
Remarks
This function retrieves the GUID for the specified frame object.
This function returns zero if the frame object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetFrameObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set program created GUID


ret = SapObject.SapModel.FrameObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.FrameObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetHingeAssigns
Syntax
SapObject.SapModel.FrameObj.GetHingeAssigns
VB6 Procedure
Function GetHingeAssigns(ByVal Name As String, ByRef NumberHinges As
Long, ByRef HingeNum() As Long, ByRef Prop() As String, ByRef MyType() As
Long, ByRef Behavior() As Long, ByRef Source() As String, ByRef RD() As
Double) As Long
Parameters
Name
The name of an existing frame object.
NumberHinges
The number of hinge assignments on the specified frame object.
HingeNum
An array that includes the hinge number for each hinge on the frame object.
Prop
An array that includes the name of the generated hinge property for each hinge
on the frame object.
MyType
An array that specifies the type of hinge for each hinge on the frame object. It is
one of the following:
1 = Axial P
2 = Shear V2
3 = Shear V3
4 = Torsion T
5 = Moment M2
6 = Moment M3
7 = Interacting P-M2
8 = Interacting P-M3
9 = Interacting M2-M3
10 = Interacting P-M2-M3
11 = Fiber P-M2-M3
Behavior
An array that specifies the behavior of the hinge for each hinge on the frame
object. It is one of the following:
1 = Force controlled
2 = Deformation controlled
Source
An array that indicates the source of the generated hinge property for each
hinge on the frame object. The source is either Auto or the name of a defined
(not generated) hinge property.
RD
An array that indicates the relative distance of each hinge along the frame
object.
Remarks
This function reports the hinge assignments for a specified frame object.
The function returns zero if the assignment data is successfully obtained;
otherwise it returns a nonzero value.
VBA Example
This example assumes that a file MyHinge.sdb exists.
Sub GetFrameHingeAssigns()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberHinges As Long
Dim HingeNum() As Long
Dim Prop() As String
Dim MyType() As Long
Dim Behavior() As Long
Dim Source() As String
Dim RD() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyHinge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get hinge data for the frame object named 1


ret = SapModel.FrameObj.GetHingeAssigns("1", NumberHinges,
HingeNum, Prop, MyType, Behavior, Source, RD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.20.
See Also
GetInsertionPoint
Syntax
SapObject.SapModel.FrameObj.GetInsertionPoint
VB6 Procedure
Function GetInsertionPoint(ByVal Name As String, ByRef CardinalPoint As
Long, ByRef Mirror2 As Boolean, ByRef StiffTransform As Boolean, ByRef
Offset1() As Double, ByRef Offset2() As Double, ByRef CSys As String) As
Long
Parameters
Name
The name of an existing frame object.
CardinalPoint
This is a numeric value from 1 to 11 that specifies the cardinal point for the
frame object. The cardinal point specifies the relative position of the frame
section on the line representing the frame object.
1 = bottom left
2 = bottom center
3 = bottom right
4 = middle left
5 = middle center
6 = middle right
7 = top left
8 = top center
9 = top right
10 = centroid
11 = shear center
Mirror2
If this item is True, the frame object section is assumed to be mirrored (flipped)
about its local 2-axis.
StiffTransform
If this item is True, the frame object stiffness is transformed for cardinal point
and joint offsets from the frame section centroid.
Offset1
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the I-End of the frame object. [L]
Offset1(0) = Offset in the 1-axis or X-axis direction
Offset1(1) = Offset in the 2-axis or Y-axis direction
Offset1(2) = Offset in the 3-axis or Z-axis direction
Offset2
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the J-End of the frame object. [L]
Offset2(0) = Offset in the 1-axis or X-axis direction
Offset2(1) = Offset in the 2-axis or Y-axis direction
Offset2(2) = Offset in the 3-axis or Z-axis direction
CSys
This is either Local or the name of a defined coordinate system. It is the
coordinate system in which the Offset1 and Offset2 items are specified.
Remarks
This function retrieves frame object insertion point assignments. The
assignments include the cardinal point and end joint offsets.
The function returns zero if the insertion point data is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameInsertionPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim CardinalPoint As Long
Dim Mirror2 As Boolean
Dim StiffTransform As Boolean
Dim Offset1() As Double
Dim Offset2() As Double
Dim CSys As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame insertion point


ReDim Offset1(2)
ReDim Offset2(2)
For i=0 To 2
Offset1(i)=10 + i
Offset2(i)=20 + i
Next i
ret = SapModel.FrameObj.SetInsertionPoint("15", 7, False,
True, Offset1, Offset2)

'get frame insertion point


ReDim Offset1(2)
ReDim Offset2(2)
ret = SapModel.FrameObj.GetInsertionPoint("15",
CardinalPoint, Mirror2, StiffTransform, Offset1, Offset2, CSys)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetInsertionPoint
GetLateralBracing
Syntax
SapObject.SapModel.FrameObj.GetLateralBracing
VB6 Procedure
Function GetLateralBracing(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef MyType() As Long, ByRef Loc()
As Long, ByRef RD1() As Double, ByRef RD2() As Double, ByRef Dist1() As
Double, ByRef Dist2() As Double) As Long
Parameters
Name
The name of an existing frame object.
NumberItems
The total number of bracing assignments retrieved for the specified frame
objects.
FrameName
This is an array that includes the name of the frame object associated with each
bracing assignment.
MyType
This is an array that includes 1 or 2, indicating the bracing type assigned.
1 = Point bracing
2 = Uniform bracing
Loc
This is an array that includes 1, 2 or 3; indicating the bracing location.
1 = Top
2 = Bottom
3 = All (top and bottom)
RD1
This is an array that includes the relative location of the point bracing (when
MyType = 1) or the relative location of the start of the uniform bracing (when
MyType = 2).
RD2
This is an array that includes the relative location of the start of the uniform
bracing (when MyType = 2).
This item does not apply for point bracing (when MyType = 1).
Dist1
This is an array that includes the actual location of the point bracing (when
MyType = 1) or the actual location of the start of the uniform bracing (when
MyType = 2). [L]
Dist2
This is an array that includes the actual location of the start of the uniform
bracing (when MyType = 2). [L]
This item does not apply for point bracing (when MyType = 1).
Remarks
This function retrieves the lateral bracing location assignments for frame
objects.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameLateralBracing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim MyType() As Long
Dim Loc() As Long
Dim RD1() As Double
Dim RD2() As Double
Dim Dist1() As Double
Dim Dist2() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign frame lateral bracing


ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0.25,
0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 1, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 2, 1, 0.5, 1)

'get frame lateral bracing


ret = SapModel.FrameObj.GetLateralBracing("8", NumberItems,
FrameName, MyType, Loc, RD1, RD2, Dist1, Dist2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetLateralBracing
DeleteLateralBracing
GetLoadDeformation
Syntax
SapObject.SapModel.FrameObj.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef dof1()
As Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4()
As Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef U1()
As Double, ByRef U2() As Double, ByRef U3() As Double, ByRef R1() As
Double, ByRef R2() As Double, ByRef R3() As Double, Optional ByVal ItemType
As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a deformation load.
dof1 = U1
dof2 = U2
dof3 = U3
dof4 = R1
dof5 = R2
dof6 = R3
U1, U2, U3, R1, R2, R3
These are arrays of deformation load values. The deformations specified for a
given degree of freedom are applicable only if the corresponding DOF item for
that degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.FrameObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'get frame deformation loads


ret = SapModel.FrameObj.GetLoadDeformation("3", NumberItems,
FrameName, LoadPat, dof1, dof2, dof3, dof4, dof5, dof6, U1, U2,
U3, R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDeformation
DeleteLoadDeformation
GetLoadDistributed
Syntax
SapObject.SapModel.FrameObj.GetLoadDistributed
VB6 Procedure
Function GetLoadDistributed(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef RD1()
As Double, ByRef RD2() As Double, ByRef Dist1() As Double, ByRef Dist2() As
Double, ByRef Val1() As Double, ByRef Val2() As Double, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of distributed loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
distributed load.
LoadPat
This is an array that includes the name of the coordinate system in which the
distributed loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of distributed load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
distributed load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11, indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RD1
This is an array that includes the relative distance from the I-End of the frame
object to the start of the distributed load.
RD2
This is an array that includes the relative distance from the I-End of the frame
object to the end of the distributed load.
Dist1
This is an array that includes the actual distance from the I-End of the frame
object to the start of the distributed load. [L]
Dist2
This is an array that includes the actual distance from the I-End of the frame
object to the end of the distributed load. [L]
Val1
This is an array that includes the load value at the start of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
Val2
This is an array that includes the load value at the end of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the distributed load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameDistributedLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim CSys() As String
Dim Dir() As Long
Dim RD1() As Double
Dim RD2() As Double
Dim Dist1() As Double
Dim Dist2() As Double
Dim Val1() As Double
Dim Val2() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame distributed loads


ret = SapModel.FrameObj.SetLoadDistributed("14", "DEAD", 1,
10, 0, 1, 0.08, 0.08)
ret = SapModel.FrameObj.SetLoadDistributed("15", "DEAD", 1,
10, 0, 1, 0.08, 0.08)

'get frame distributed loads


ret = SapModel.FrameObj.GetLoadDistributed("ALL",
NumberItems, FrameName, LoadPat, MyType, CSys, Dir, RD1, RD2,
Dist1, Dist2, Val1, Val2, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDistributed
DeleteLoadDistributed
GetLoadDistributedWithGUID {Frame Object}
Syntax
SapObject.SapModel.FrameObj.GetLoadDistributedWthGUID
VB6 Procedure
Function GetLoadDistributed(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef RD1()
As Double, ByRef RD2() As Double, ByRef Dist1() As Double, ByRef Dist2() As
Double, ByRef Val1() As Double, ByRef Val2() As Double, ByRef GUID() As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of distributed loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
distributed load.
LoadPat
This is an array that includes the name of the coordinate system in which the
distributed loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of distributed load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
distributed load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11, indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RD1
This is an array that includes the relative distance from the I-End of the frame
object to the start of the distributed load.
RD2
This is an array that includes the relative distance from the I-End of the frame
object to the end of the distributed load.
Dist1
This is an array that includes the actual distance from the I-End of the frame
object to the start of the distributed load. [L]
Dist2
This is an array that includes the actual distance from the I-End of the frame
object to the end of the distributed load. [L]
Val1
This is an array that includes the load value at the start of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
Val2
This is an array that includes the load value at the end of the distributed load.
[F/L] when MyType is 1 and [FL/L] when MyType is 2
GUID
This is an array that includes the global unique ID of the distributed load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function is identical to GetLoadDistributed but it includes an extra return
parameter, which includes the global unique IDs of the retrieved distributed
loads.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
SetLoadDistributedWithGUID
DeleteLoadDistributedWithGUID
GetLoadGravity
Syntax
SapObject.SapModel.FrameObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef FrameName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame gravity loads


ret = SapModel.FrameObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get frame gravity load


ret = SapModel.FrameObj.GetLoadGravity("3", NumberItems,
FrameName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadPoint
Syntax
SapObject.SapModel.FrameObj.GetLoadPoint
VB6 Procedure
Function GetLoadPoint(ByVal Name As String, ByRef NumberItems As Long,
ByRef FrameName() As String, ByRef LoadPat() As String, ByRef MyType() As
Long, ByRef CSys() As String, ByRef Dir() As Long, ByRef RelDist() As Double,
ByRef Dist() As Double, ByRef Val() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
NumberItems
The total number of point loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
point load.
LoadPat
This is an array that includes the name of the coordinate system in which the
point loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of point load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
point load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11 indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RelDist
This is an array that includes the relative distance from the I-End of the frame
object to the location where the point load is applied.
Dist
This is an array that includes the actual distance from the I-End of the frame
object to the location where the point load is applied. [L]
Val
This is an array that includes the value of the point load. [F] when MyType is 1
and [FL] when MyType is 2
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the point load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePointLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim CSys() As String
Dim Dir() As Long
Dim RelDist() As Double
Dim Dist() As Double
Dim Val() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame point loads


ret = SapModel.FrameObj.SetLoadPoint("14", "DEAD", 1, 10,
.5, 20)
ret = SapModel.FrameObj.SetLoadPoint("15", "DEAD", 1, 10,
.5, 20)

'get frame point loads


ret = SapModel.FrameObj.GetLoadPoint("ALL", NumberItems,
FrameName, LoadPat, MyType, CSys, Dir, RelDist, Dist, Val, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadPoint
DeleteLoadPoint
GetLoadPointWithGUID
Syntax
SapObject.SapModel.FrameObj.GetLoadPointWithGUID
VB6 Procedure
Function GetLoadPointWithGUID(ByVal Name As String, ByRef NumberItems
As Integer, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef
MyType() As Integer, ByRef CSys() As String, ByRef Dir() As Integer, ByRef
RelDist() As Double, ByRef Dist() As Double, ByRef Val() As Double, ByRef
GUID() As String, Optional ByVal ItemType As eItemType = eItemType.Objects)
As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
NumberItems
The total number of point loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
point load.
LoadPat
This is an array that includes the name of the coordinate system in which the
point loads are specified.
MyType
This is an array that includes 1 or 2, indicating the type of point load.
1 = Force
2 = Moment
CSys
This is an array that includes the name of the coordinate system in which each
point load is defined. It may be Local or the name of a defined coordinate
system.
Dir
This is an array that includes an integer between 1 and 11 indicating the
direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
RelDist
This is an array that includes the relative distance from the I-End of the frame
object to the location where the point load is applied.
Dist
This is an array that includes the actual distance from the I-End of the frame
object to the location where the point load is applied. [L]
Val
This is an array that includes the value of the point load. [F] when MyType is 1
and [FL] when MyType is 2
GUID
This is an array that includes the global unique ID of the point load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the point load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
SetLoadPointWithGUID
DeleteLoadPointWithGUID
GetLoadStrain
Syntax
SapObject.SapModel.FrameObj.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef FrameName() As String, ByRef LoadPat() As String, ByRef DOF() As
Long, ByRef Val() As Double, ByRef PatternName() As String, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
DOF
This is an array that includes 1, 2, 3, 4, 5 or 6, indicating the degree of freedom
associated with each strain load.
1= Strain11
2= Strain12
3= Strain13
4= Curvature1
5= Curvature2
6= Curvature3
Val
This is an array that includes the strain value. [L/L] for DOF = 1, 2 and 3 and
[1/L] for DOF = 4, 5 and 6
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to frame objects.
The function returns zero if the strain load assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetFrameStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim DOF() As Long
Dim Val() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame strain load


ret = SapModel.FrameObj.SetLoadStrain("1", "DEAD", 1, 0.001)

'get frame strain load


ret = SapModel.FrameObj.GetLoadStrain("1", NumberItems,
FrameName, LoadPat, DOF, Val, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadStrain
DeleteLoadStrain
GetLoadTargetForce
Syntax
SapObject.SapModel.FrameObj.GetLoadTargetForce
VB6 Procedure
Function GetLoadTargetForce(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef dof1()
As Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4()
As Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef P() As
Double, ByRef V2() As Double, ByRef V3() As Double, ByRef T() As Double,
ByRef M2() As Double, ByRef M3() As Double, ByRef T1() As Double, ByRef
T2() As Double, ByRef T3() As Double, ByRef T4() As Double, ByRef T5() As
Double, ByRef T6() As Double, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
target force.
LoadPat
This is an array that includes the name of the load pattern associated with each
target force.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a target force assignment.
dof1 = P
dof2 = V2
dof3 = V3
dof4 = T
dof5 = M2
dof6 = M3
P, V2, V3, T, M2, M3
These are arrays of target force values. The target forces specified for a given
degree of freedom are applicable only if the corresponding DOF item for that
degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
T1, T2, T3, T4, T5, T6
These are arrays of the relative distances along the frame objects where the target force
values apply. The relative distances specified for a given degree of freedom are applicable
only if the corresponding dofn item for that degree of freedom is True.
T1 = relative location for P target force
T2 = relative location for V2 target force
T3 = relative location for V3 target force
T4 = relative location for T target force
T5 = relative location for M2 target force
T6 = relative location for M3 target force
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the target force assignments to frame objects.
The function returns zero if the target force assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetFrameTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double
Dim T1() As Double
Dim T2() As Double
Dim T3() As Double
Dim T4() As Double
Dim T5() As Double
Dim T6() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 0.5
ret = SapModel.FrameObj.SetLoadTargetForce("1", "DEAD", DOF,
f, RD)

'get frame target force


ret = SapModel.FrameObj.GetLoadTargetForce("1", NumberItems,
FrameName, LoadPat, dof1, dof2, dof3, dof4, dof5, dof6, P, V2, V3,
T, M2, M3, T1, T2, T3, T4, T5, T6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTargetForce
DeleteLoadTargetForce
GetLoadTemperature
Syntax
SapObject.SapModel.FrameObj.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Val() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified frame objects.
FrameName
This is an array that includes the name of the frame object associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
MyType
This is an array that includes 1, 2 or 3, indicating the type of temperature load.
1 = Temperature
2 = Temperature gradient along local 2 axis
3 = Temperature gradient along local 3 axis
Val
This is an array that includes the temperature load value. [T] for MyType= 1 and
[T/L] for MyType= 2 and 3
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the frame object
specified by the Name item.
If this item is Group, the assignments are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected frame
objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to frame objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim LoadPat() As String
Dim MyType() As Long
Dim Val() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame temperature load


ret = SapModel.FrameObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'get frame temperature load


ret = SapModel.FrameObj.GetLoadTemperature("ALL",
NumberItems, FrameName, LoadPat, MyType, Val, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTemperature
DeleteLoadTemperature
GetLoadTransfer
Syntax
SapObject.SapModel.FrameObj.GetLoadTransfer
VB6 Procedure
Function GetLoadTransfer(ByVal Name As String, ByRef Val As Boolean) As Long
Parameters
Name
The name of an existing frame.

Val
This boolean value indicates if load is allowed to be transferred from area objects to
this frame object.
Remarks
This function returns the load transfer option for a frame object. It indicates whether
the frame receives load from an area object when the area object is loaded with a
load of type uniform to frame.

The function returns zero if the load transfer option is successfully returned, otherwise
it returns a nonzero value.
VBA Example
Sub GetLoadTransferOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim val As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'get the load transfer option to False for frame object 1


ret = SapModel.FrameObj.GetLoadTransfer("1", val)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.

See Also
SetLoadTransfer
GetLocalAxes
Syntax
SapObject.SapModel.FrameObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double, ByRef
Advanced As Boolean) As Long
Parameters
Name
The name of an existing frame object.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation or, if the Advanced item is True, from the
orientation determined by the plane reference vector. The rotation for a positive
angle appears counter clockwise when the local +1 axis is pointing toward you.
[deg]
Advanced
This item is True if the line object local axes orientation was obtained using
advanced local axes parameters.
Remarks
This function retrieves the frame local axis angle assignment for frame objects.
The function returns zero if the assignment is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetFrameLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double
Dim Advanced As boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get frame local axis angle


ret = SapModel.FrameObj.GetLocalAxes("3", Ang, Advanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetLocalAxesAdvanced
Syntax
SapObject.SapModel.FrameObj.GetLocalAxesAdvanced
VB6 Procedure
Function GetLocalAxesAdvanced(ByVal Name As String, ByRef Active As
Boolean, ByRef Plane2 As Long, ByRef PlVectOpt As Long, ByRef PlCSys As
String, ByRef PlDir() As Long, ByRef PlPt() As String, ByRef PlVect() As
Double) As Long
Parameters
Name
The name of an existing frame object.
Active
This is True if advanced local axes exist.
Plane2
This is 12 or 13, indicating that the local plane determined by the plane
reference vector is the 1-2 plane or the 1-3 plane. This item applies only when
the Active item is True.
PlVectOpt
This is 1, 2, or 3, indicating the plane reference vector option. This item applies
only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
PlCSys
The coordinate system used to define the plane reference vector coordinate
directions and the plane user vector. This item applies when the Active item is
True and the PlVectOpt item is 1 or 3.
PlDir
This is an array dimensioned to 1 (2 integers), indicating the plane reference
vector primary and secondary coordinate directions, PlDir(0) and PlDir(1)
respectively, taken at the object center in the specified coordinate system and
used to determine the plane reference vector. This item applies when the Active
item is True and the PlVectOpt item is 1. Possible coordinate direction values
are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the plane reference vector. Either of these joints may be specified as
None to indicate the center of the specified object. If both joints are specified as
None, they are not used to define the plane reference vector. This item applies
when the Active item is True and the PlVectOpt item is 2.
PlVect
This is an array dimensioned to 2 (3 doubles) that defines the plane reference
vector. This item applies when the Active item is True and the PlVectOpt item is
3.
Remarks
This function retrieves the advanced local axes assignments to frame objects.
The function returns zero if the advanced local axes assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetFrameAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double
Dim Ang As Double
Dim Advanced As Boolean
Dim Active As Boolean
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim PlDir() As Long
Dim PlPt() As String
Dim PlVect() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame advanced local axes


MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.FrameObj.SetLocalAxesAdvanced("3", True, 12,
1, "Global", MyPlDir, MyPlPt, MyPlVect)

'get frame local axis angle


ret = SapModel.FrameObj.GetLocalAxes("3", Ang, Advanced)
'get frame advanced local axes data
If Advanced Then
ret = SapModel.FrameObj.GetLocalAxesAdvanced("3", Active,
Plane2, PlVectOpt, PlCSys, PlDir, PlPt, PlVect)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetLocalAxesAdvanced
SetLocalAxes
GetLocalAxes
GetMass
Syntax
SapObject.SapModel.FrameObj.GetMass
VB6 Procedure
Function GetMass(ByVal Name As String, ByRef MassOverL As Double) As
Long
Parameters
Name
The name of an existing frame object.
MassOverL
The mass per unit length assigned to the frame object. [M/L]
Remarks
This function retrieves the frame mass per unit length assignment for frame
objects.
The function returns zero if the mass assignment is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MassOverL As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame mass


ret = SapModel.FrameObj.SetMass("ALL", .0001, False, Group)

'get frame mass assignment


ret = SapModel.FrameObj.GetMass("3", MassOverL)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMass
DeleteMass
GetMaterialOverwrite
Syntax
SapObject.SapModel.FrameObj.GetMaterialOverwrite
VB6 Procedure
Function GetMaterialOverwrite(ByVal Name As String, ByRef PropName As
String) As Long
Parameters
Name
The name of a defined frame object.
PropName
This is None, indicating that no material overwrite exists for the specified frame
object, or it is the name of an existing material property.
Remarks
This function retrieves the material overwrite assigned to a frame object, if any.
It returns None if there is no material overwrite assignment.
The function returns zero if the material overwrite assignment is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetFrameMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign material overwrite


ret = SapModel.FrameObj.SetMaterialOverwrite("3", "4000Psi")

'get material overwrite assignment


ret = SapModel.FrameObj.GetMaterialOverwrite("3", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMaterialOverwrite
GetMatTemp
Syntax
SapObject.SapModel.FrameObj.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing frame object.
Temp
This is the material temperature value assigned to the frame object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the frame object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the frame object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the frame object.
Remarks
This function retrieves the material temperature assignments to frame objects.
The function returns zero if the material temperature assignments are
successfully retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetFrameMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign material temperature


ret = SapModel.FrameObj.SetMatTemp("ALL", 50, , Group)

'get material temperature


ret = SapModel.FrameObj.GetMatTemp("3", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMatTemp
GetModifiers
Syntax
SapObject.SapModel.FrameObj.GetModifiers
VB6 Procedure
Function GetModifiers(ByVal Name As String, ByRef Value() As Double) As
Long
Parameters
Name
The name of an existing frame object.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier
Remarks
This function retrieves the frame modifier assignment for frame objects. The
default value for all modifiers is one.
The function returns zero if the modifier assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.FrameObj.SetModifiers("3", Value)

'get modifiers
ReDim Value(7)
ret = SapModel.FrameObj.GetModifiers("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetModifiers
DeleteModifiers
GetNameList
Syntax
SapObject.SapModel.FrameObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of frame object names retrieved by the program.
MyName
This is a one-dimensional array of frame object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the APIuser.
Remarks
This function retrieves the names of all defined frame objects.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetFrameObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get frame object names


ret = SapModel.FrameObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetNotionalSize
Syntax
SapObject.SapModel.PropFrame.GetNotionalSize
VB6 Procedure
Function GetNotionalSize(ByVal Name As String, ByRef stype As String, ByRef
Value As Double) As Long
Parameters
Name
The name of an existing frame section property.
stype
The type to define the notional size of a section. It can be:
"Auto" = Program will determine the notional size based on the average
thickness of an area element.
"User" = The notional size is based on the user-defined value.
"None" = Notional size will not be considered. In other words, the time-
dependent effect of this section will not be considered.
Value
For stype is "Auto", the Value represents for the scale factor to the program-
determined notional size; for stype is User, the Value represents for the user-
defined notional size [L]; for stype is None, the Value will not be used and can
be set to 1.
Remarks
This function retrieves the method to determine the notional size of a frame
section for the creep and shrinkage calculations. This function is currently
worked for the steel/aluminum sections - I/Wide Flange, Channel, Tee, Angle,
Double Angle, Double Channel, Pipe and Tube sections, and all the concrete
sections - Rectangular, Circular, Pipe, Tube, Precast I.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetFramePropNotionalSize() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim stype As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3,
200)

'assign parameters
ret = SapModel.PropFrame.SetNotionalSize("FSEC1", Auto,
1.1)

'get parameters
ret = SapModel.PropFrame.SetNotionalSize("FSEC1", stype,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0
See Also
SetNotionalSize
GetOutputStations
Syntax
SapObject.SapModel.FrameObj.GetOutputStations
VB6 Procedure
Function GetOutputStations(ByVal Name As String, ByRef MyType As Long,
ByRef MaxSegSize As Double, ByRef MinSections As Long, ByRef
NoOutPutAndDesignAtElementEnds As Boolean, ByRef
NoOutPutAndDesignAtPointLoads As Boolean) As Long
Parameters
Name
The name of an existing frame object.
MyType
This is either 1 or 2 indicating how the output stations are specified.
1 = maximum segment size, that is, maximum station spacing
2 = minimum number of stations
MaxSegSize
The maximum segment size, that is, the maximum station spacing. This item
applies only when MyType = 1. [L]
MinSections
The minimum number of stations. This item applies only when MyType = 2.
NoOutPutAndDesignAtElementEnds
If this item is True, no additional output stations are added at the ends of line
elements when the frame object is internally meshed.
NoOutPutAndDesignAtPointLoads
If this item is True, no additional output stations are added at point load
locations.
Remarks
This function retrieves frame object output station data.
The function returns zero if the data is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetFrameOutputStationData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim MaxSegSize As Double
Dim MinSections As Long
Dim NoOutPutAndDesignAtElementEnds As Boolean
Dim NoOutPutAndDesignAtPointLoads As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get frame output station data


ret = SapModel.FrameObj.GetOutputStations("15", MyType,
MaxSegSize, MinSections, NoOutPutAndDesignAtElementEnds,
NoOutPutAndDesignAtPointLoads)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOutputStations
GetPDeltaForce
Syntax
SapObject.SapModel.FrameObj.GetPDeltaForce
VB6 Procedure
Function GetPDeltaForce(ByVal Name As String, ByRef NumberForces As
Long, ByRef PDeltaForce() As Double, ByRef Dir() As Long, ByRef CSys() As
String) As Long
Parameters
Name
The name of an existing straight frame object.
NumberForces
The number of P-Delta forces assigned to the frame object.
PDeltaForce
This is an array of the P-Delta force values assigned to the frame object. [F]
Dir
This is an array that contains 0, 1, 2 or 3, indicating the direction of each P-
Delta force assignment.
0= Frame object local 1-axis direction
1= Projected X direction in CSys coordinate system
2= Projected Y direction in CSys coordinate system
3= Projected Z direction in CSys coordinate system
CSys
This is an array that contains the name of the coordinate system in which each
projected P-Delta force is defined. This item is blank when the Dir item is zero,
that is, when the P-Delta force is defined in the frame object local 1-axis
direction.
Remarks
This function retrieves the P-Delta force assignments to frame objects. P-Delta
forces do not apply to curved frame objects. If you request data for a curved
frame, an error is returned.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePDeltaForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberForces As Long
Dim PDeltaForce() As Double
Dim Dir() As Long
Dim CSys() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign P-Delta force


ret = SapModel.FrameObj.SetPDeltaForce("ALL", 100, 0, True,
, Group)

'get P-Delta force


ret = SapModel.FrameObj.GetPDeltaForce("3", NumberForces,
PDeltaForce, Dir, CSys)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPDeltaForce
DeletePDeltaForce
GetPoints
Syntax
SapObject.SapModel.FrameObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined frame object.
Point1
The name of the point object at the I-End of the specified frame object.
Point2
The name of the point object at the J-End of the specified frame object.
Remarks
This function retrieves the names of the point objects at each end of a specified
frame object.
The function returns zero if the point names are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point1 As String
Dim Point2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get names of points


ret = SapModel.FrameObj.GetPoints("3", Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetReleases
Syntax
SapObject.SapModel.FrameObj.GetReleases
VB6 Procedure
Function GetReleases(ByVal Name As String, ByRef ii() As Boolean, ByRef jj()
As Boolean, ByRef StartValue() As Double, ByRef EndValue() As Double) As
Long
Parameters
Name
The name of an existing frame object.
ii, jj
These are arrays of six booleans indicating the I-End and J-End releases for the
frame object.
ii(0) and jj(0) = U1 release
ii(1) and jj(1) = U2 release
ii(2) and jj(2) = U3 release
ii(3) and jj(3) = R1 release
ii(4) and jj(4) = R2 release
ii(5) and jj(5) = R3 release

StartValue, EndValue
These are arrays of six values indicating the I-End and J-End partial fixity
springs for the frame object.
StartValue(0) and EndValue(0) = U1 partial fixity [F/L]
StartValue(1) and EndValue(1) = U2 partial fixity [F/L]
StartValue(2) and EndValue(2) = U3 partial fixity [F/L]
StartValue(3) and EndValue(3) = R1 partial fixity [FL/rad]
StartValue(4) and EndValue(4) = R2 partial fixity [FL/rad]
StartValue(5) and EndValue(5) = R3 partial fixity [FL/rad]
Remarks
This function retrieves the frame object end release and partial fixity
assignments.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameEndReleases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign end releases


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(5) = True
jj(5) = True
ret = SapModel.FrameObj.SetReleases("13", ii, jj,
StartValue, EndValue)

'get end releases


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ret = SapModel.FrameObj.GetReleases("13", ii, jj,
StartValue, EndValue)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetReleases
GetSection
Syntax
SapObject.SapModel.FrameObj.GetSection
VB6 Procedure
Function GetSection(ByVal Name As String, ByRef PropName As String, ByRef
SAuto As String) As Long
Parameters
Name
The name of a defined frame object.
PropName
If no auto select list is assigned to the frame object, this is the name of the frame
section property assigned to the frame object. If an auto select list is assigned to
the frame object, this is the name of the frame section property, within the auto
select list, which is currently being used as the analysis property for the frame
object. If this item is None, no frame section property is assigned to the frame
object.
SAuto
This is the name of the auto select list assigned to the frame object, if any. If this
item is returned as a blank string, no auto select list is assigned to the frame
object.
Remarks
This function retrieves the frame section property assigned to a frame object.
The function returns zero if the frame object property is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameSectionProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim SAuto As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get frame section property


ret = SapModel.FrameObj.GetSection("3", PropName, SAuto)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSectionNonPrismatic
SetSection
GetSectionNonPrismatic
Syntax
SapObject.SapModel.FrameObj.GetSectionNonPrismatic
VB6 Procedure
Function GetSectionNonPrismatic(ByVal Name As String, ByRef PropName As
String, ByRef sVarTotalLength As Double, ByRef sVarRelStartLoc As Double)
As Long
Parameters
Name
The name of a defined frame object.
PropName
The name of the nonprismatic frame section property assigned to the frame
object.
sVarTotalLength
This is the total assumed length of the nonprismatic section. Enter 0 for this item
to indicate that the section length is the same as the frame object length.
sVarRelStartLoc
This is the relative distance along the nonprismatic section to the I-End (start) of
the frame object. This item is ignored when the sVarTotalLengthitem is 0.
Remarks
This function retrieves the nonprismatic frame section property data assigned to
a frame object.
The function returns zero if the nonprismatic frame object property data is
successfully retrieved, otherwise it returns a nonzero value.
The function returns an error if the section property assigned to the frame object
is not a nonprismatic property.
VBA Example
Sub GetFrameSectionNonPrismatic()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim StartSec() As String
Dim EndSec() As String
Dim MyLength() As Double
Dim MyType() As Long
Dim EI33() As Long
Dim EI22() As Long
Dim Color As Long
Dim Notes As String
Dim GUID As String
Dim PropName As String
Dim sVarTotalLength As Double
Dim sVarRelStartLoc As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC1", "A992Fy50",
24, 8, 0.5, 0.3, 8, 0.5)

'set new I-type frame section property


ret = SapModel.PropFrame.SetISection("ISEC2", "A992Fy50",
20, 8, 0.5, 0.3, 8, 0.5)
'set new nonprismatic frame section property
ReDim StartSec(2)
ReDim EndSec(2)
ReDim MyLength(2)
ReDim MyType(2)
ReDim EI33(2)
ReDim EI22(2)
StartSec(0) = "ISEC2"
EndSec(0) = "ISEC1"
MyLength(0) = 60
MyType(0) = 2
EI33(0)= 2
EI22(0)= 1

StartSec(1) = "ISEC1"
EndSec(1) = "ISEC1"
MyLength(1) = 1
MyType(1) = 1
EI33(1)= 2
EI22(1)= 1

StartSec(2) = "ISEC1"
EndSec(2) = "ISEC2"
MyLength(2) = 60
MyType(2) = 2
EI33(2)= 2
EI22(2)= 1

ret = SapModel.PropFrame.SetNonPrismatic("NP1", 3, StartSec,


EndSec, MyLength, MyType, EI33, EI22)

'set frame section property


ret = SapModel.FrameObj.SetSection("8", "NP1", Object, 0.1,
360)

'get nonprismatic frame section property


ret = SapModel.FrameObj.GetSectionNonPrismatic("8",
PropName, sVarTotalLength, sVarRelStartLoc)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSection
SetSection
GetSelected
Syntax
Sap2000.FrameObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing frame object.
Selected
This item returns True if the specified frame object is selected, otherwise it
returns False.
Remarks
This function retrieves the selected status for a frame object.
The function returns zero if the selected status is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set all frames selected


ret = SapModel.FrameObj.SetSelected("All", True, Group)

'get frame object selected status


ret = SapModel.FrameObj.GetSelected("8", Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetSpring
Syntax
SapObject.SapModel.FrameObj.GetSpring
VB6 Procedure
Function GetSpring(ByVal Name As String, ByRef NumberSprings As Long,
ByRef MyType() As Long, ByRef s() As Double, ByRef SimpleSpringType() As
Long, ByRef LinkProp() As String, ByRef SpringLocalOneType() As Long,
ByRef Dir() As Long, ByRef Plane23Angle() As Double, ByRef VecX() As
Double, ByRef VecY() As Double, ByRef VecZ() As Double, ByRef CSys() As
String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing frame object.
NumberSprings
The number of springs assignments made to the specified frame object.
MyType
Each value in this array is either 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
Each value in this array is the simple spring stiffness per unit length of the frame
object. This item applies only when the corresponding MyType = 1. [F/L2]
SimpleSpringType
Each value in this array is 1, 2 or 3, indicating the simple spring type. This item
applies only when the corresponding MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
Each value in this array is the name of the link property assigned to the spring.
This item applies only when the corresponding MyType = 2.
SpringLocalOneType
Each value in this array is 1, 2 or 3, indicating the method used to specify the
spring positive local 1-axis orientation.
1 = Parallel to frame object local axis
2 = In the frame object 2-3 plane
3 = User specified direction vector
Dir
Each value in this array is 1, 2, 3, -1, -2 or -3, indicating the frame object local
axis that corresponds to the positive local 1-axis of the spring. This item applies
only when the corresponding SpringLocalOneType = 1.
Plane23Angle
Each value in this array is the angle in the frame object 2-3 plane measured
counter clockwise from the frame positive 2-axis to the spring positive 1-axis.
This item applies only when the corresponding SpringLocalOneType = 2. [deg]
VecX
Each value in this array is the X-axis or frame local 1-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecY
Each value in this array is the Y-axis or frame local 2-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecZ
Each value in this array is the X-axis or frame local 3-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
CSys
Each value in this array is Local (meaning the frame object local coordinate
system) or the name of a defined coordinate system. This item is the coordinate
system in which the user specified direction vector, Vec, is specified. This item
applies only when the corresponding SpringLocalOneType = 3.
Ang
Each value in this array is the angle that the link local 2-axis is rotated from its
default orientation. This item applies only when the corresponding MyType = 2.
[deg]
Remarks
This function retrieves the spring assignments to a frame object.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double
Dim NumberSprings As Long
Dim MyType() As Long
Dim s() As Double
Dim SimpleSpringType() As Long
Dim LinkProp() As String
Dim SpringLocalOneType() As Long
Dim Dir() As Long
Dim Plane23Angle() As Double
Dim VecX() As Double
Dim VecY() As Double
Dim VecZ() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign springs to frame


ReDim Vec(2)
ret = SapModel.FrameObj.SetSpring("ALL", 1, 1, 1, "", 1, 2,
0, Vec, 0, False, "Local", Group)

'get spring assignments to frames


ret = SapModel.FrameObj.GetSpring("1", numbersprings,
MyType, s, SimpleSpringType, LinkProp, SpringLocalOneType, Dir,
Plane23Angle, VecX, VecY, VecZ, CSys, Ang)

'close Sap2000}
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSpring
DeleteSpring
GetTCLimits
Syntax
SapObject.SapModel.FrameObj.GetTCLimits
VB6 Procedure
Function GetTCLimits(ByVal Name As String, ByRef LimitCompressionExists
As Boolean, ByRef LimitCompression As Double, ByRef LimitTensionExists As
Boolean, ByRef LimitTension As Double) As Long
Parameters
Name
The name of an existing frame object.
LimitCompressionExists
This item is True if a compression force limit exists for the frame object.
LimitCompression
The compression force limit for the frame object. [F]
LimitTensionExists
This item is True if a tension force limit exists for the frame object.
LimitTension
The tension force limit for the frame object. [F]
Remarks
This function retrieves the tension/compression force limit assignments to frame
objects.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
Note that the tension and compression limits are used only in nonlinear
analyses.
VBA Example
Sub GetFrameTCLimits()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim LimitCompressionExists As Boolean
Dim LimitCompression As Double
Dim LimitTensionExists As Boolean
Dim LimitTension As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign tension/compression limits


ret = SapModel.FrameObj.SetTCLimits("1", False, 0, True,
100)

'get tension/compression limits


ret = SapModel.FrameObj.GetTCLimits("1",
LimitCompressionExists, LimitCompression, LimitTensionExists,
LimitTension)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetTCLimits
GetTransformationMatrix
Syntax
Sap2000.FrameObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing frame object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the frame object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the frame object local coordinate system.
If this item is False, the transformation maxtrix is between the present
coordinate system and the frame object local coordinate system.
Remarks
The function returns zero if the frame object transformation matrix is
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetFrameObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign frame object local axis angle


ret = SapModel.FrameObj.SetLocalAxes("3", 30)

'get frame object transformation matrix


ReDim Value(8)
ret = SapModel.FrameObj.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTrapezoidal
Syntax
SapObject.SapModel.PropFrame.GetTrapezoidal
VB6 Procedure
Function GetTrapezoidal(ByVal Name As String, ByRef FileName As String,
ByRef MatProp As String, ByRef t3 As Double, ByRef t2 As Double, ByRef t2b
As Double, ByRef Color As Long, ByRef Notes As String, ByRef GUID As
String) As Long
Parameters
Name
The name of an existing trapezoidal frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.

MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section top width. [L]
t2b
The section bottom width. [L]
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a trapezoidal frame
section.
The function returns zero if the section property is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropTrapezoidal()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim t3 As Double
Dim t2 As Double
Dim t2b As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTrapezoidal("R1", "4000Psi", 20,
20, 12)

'get frame section property data


ret = SapModel.PropFrame.SetTrapezoidal("R1", FileName,
MatProp, t3, t2, t2b, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0
See Also
SetTrapezoidal
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
GetTypeOAPI
Syntax
SapObject.SapModel.FrameObj.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef MyType As String) As
Long
Parameters
Name
The name of a defined frame object.
MyType
This is Straight or Curved, indicating the type of frame object.
Remarks
This function retrieves the type of frame object (straight or curved).
The function returns zero if the frame object type is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetFrameType()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get frame type


ret = SapModel.FrameObj.GetTypeOAPI("3", MyType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
SetStraight
SetCurved
GetCurved
SetAutoMesh
Syntax
SapObject.SapModel.FrameObj.SetAutoMesh
VB6 Procedure
Function SetAutoMesh(ByVal Name As String, ByVal AutoMesh As Boolean,
ByVal AutoMeshAtPoints As Boolean, ByVal AutoMeshAtLines As Boolean,
ByVal NumSegs As Long, ByVal AutoMeshMaxLength As Double, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
AutoMesh
This item is True if the frame object is to be automatically meshed by the
program when the analysis model is created.
AutoMeshAtPoints
This item is applicable only when the AutoMesh item is True. If this item is True,
the frame object is automatically meshed at intermediate joints along its length.
AutoMeshAtLines
This item is applicable only when the AutoMesh item is True. If this item is True,
the frame object is automatically meshed at intersections with other frames,
area object edges and solid object edges.
NumSegs
This item is applicable only when the AutoMesh item is True. It is the minimum
number of elements into which the frame object is automatically meshed. If this
item is zero, the number of elements is not checked when the automatic meshing
is done.
AutoMeshMaxLength
This item is applicable only when the AutoMesh item is True. It is the maximum
length of auto meshed frame elements. If this item is zero, the element length is
not checked when the automatic meshing is done. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function makes automatic meshing assignments to frame objects.
The function returns zero if the meshing options are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign automesh options


ret = SapModel.FrameObj.SetAutoMesh("ALL", True, True, True,
0, 0, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetAutoMesh
SetCurved
Syntax
SapObject.SapModel.FrameObj.SetCurved
VB6 Procedure
Function SetCurved(ByVal Name As String, ByVal MyType As Long, ByVal x As
Double, ByVal y As Double, ByVal z As Double, ByVal PointName As String,
ByVal Radius As Double, ByVal NumSegs As Long, Optional ByVal CSys As
String = "Global") As Long
Parameters
Name
The name of a defined curved frame object.
MyType
This is 1, 2, 3, 4, or 5, indicating the curved frame type.
1= Circular Arc Specified by a Third Point Name
2= Circular Arc Specified by Third Point Coordinates
3= Circular Arc Specified by Planar Point Coordinates and Radius
4= Parabolic Arc Specified by a Third Point Name
5= Parabolic Arc Specified by Third Point Coordinates

MyTypes 1, 2, 4, and 5 all define the curve by three points. The three points are
the two end point of the frame object and a third point defined by naming an
existing point object or specifying point coordinates.
MyType 3 defines a circular curved frame by it end points, the coordinates of
another point that lies in the plane of the curve but not necessarily on the curved
frame, and a curve radius.
x, y, z
These are point coordinates in the coordinate system specified by CSys. [L]
For MyType 1 and 4 these items do not apply.
For MyType 2 and 5 these are the coordinates of the third point on the curved
frame.
For MyType 3 these are the coordinates of the planar point that lies in the plane
of the curved frame.
PointName
This is the name of the point object that is the third point on the curved frame.
This item applies for MyType 1 and 4. It does not apply for MyType 2, 3 and 5.
Radius
The radius of the circular curved frame. This item only applies for MyType 3. [L]
NumSegs
This is the number of segments into which the program internally divides the
curved frame.
CSys
This is the coordinate system in which the coordinates x, y and z are defined.
Remarks
This function changes the curve data for a curved frame object and sets straight
frame objects to be curved.
The function returns zero if the frame object type is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameCurved()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set frame curved


ret = SapModel.FrameObj.SetCurved("13", 1, 0, 0, 0, "1", 0,
16)
ret = SapModel.FrameObj.SetCurved("14", 2, -200, 0, 176, "",
0, 16)
ret = SapModel.FrameObj.SetCurved("15", 3, 0, 0, 0, "", 100,
16)
ret = SapModel.FrameObj.SetCurved("16", 4, 0, 0, 0, "3", 0,
16)
ret = SapModel.FrameObj.SetCurved("17", 5, 0, 0, 176, "", 0,
16)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument CSys to be ByVal in version 12.0.1.
See Also
SetStraight
GetCurved
GetType
SetDesignProcedure
Syntax
SapObject.SapModel.FrameObj.SetDesignProcedure
VB6 Procedure
Function SetDesignProcedure(ByVal Name As String, ByVal MyType As Long,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1 or 2, indicating the design procedure type desired for the specified
frame object.
1 = Default from material
2 = No design
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected frame objects and the
Name item is ignored.
Remarks
This function sets the design procedure for frame objects.
The function returns zero if the design procedure is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameObjDesignProcedure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set design procedure


ret = SapModel.FrameObj.SetDesignProcedure("8", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
See Also
GetDesignProcedure
SetEndLengthOffset
Syntax
SapObject.SapModel.FrameObj.SetEndLengthOffset
VB6 Procedure
Function SetEndLengthOffset(ByVal Name As String, ByVal AutoOffset As
Boolean, ByVal Length1 As Double, ByVal Length2 As Double, ByVal rz As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
AutoOffset
If this item is True, the end length offsets are automatically determined by the
program from object connectivity, and the Length1, Length2 and rz items are
ignored.
Length1
The offset length along the 1-axis of the frame object at the I-End of the frame
object. [L]
Length2
The offset along the 1-axis of the frame object at the J-End of the frame object.
[L]
rz
The rigid zone factor. This is the fraction of the end offset length assumed to be
rigid for bending and shear deformations.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns frame object end offsets along the 1-axis of the object.
The function returns zero if the offsets are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameEndOffsets()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign offsets
ret = SapModel.FrameObj.SetEndLengthOffset("15", False, 12,
12, 0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEndLengthOffset
SetEndSkew
Syntax
SapObject.SapModel.FrameObj.SetEndSkew
VB6 Procedure
Function SetEndSkew(ByVal Name As String, ByVal SkewI As Double, ByVal
SkewJ As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
SkewI
The angle in degrees measured counter clockwise from the positive local 3-axis
to a line parallel to the I-End of the frame object (-90 < SkewI < 90). [deg]
SkewJ
The angle in degrees measured counter clockwise from the positive local 3-axis
to a line parallel to the J-End of the frame object (-90 < SkewJ < 90). [deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns frame object end skew data. End skew data is used in the
program to plot the extruded view of bridge objects that have been updated as
spine models only.
The function returns zero if the end skew data is successfully assigned,
otherwise it returns a nonzero value.
End skew assignments are applicable only to straight frame objects.
VBA Example
Sub AssignFrameEndSkewData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame end skew data


ret = SapModel.FrameObj.SetEndSkew("15", 10, 20)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEndSkew
SetFireproofing_1
Syntax
SapObject.SapModel.FrameObj.SetFireProofing_1
VB6 Procedure
Function SetFireProofing_1(ByVal Name As String, ByVal MyType As Long,
ByVal Thickness As Double, ByVal Perimeter As Double, ByVal Density As
Double, ByVal tf As Boolean, ByVal IncludeInSelfWeightAs Boolean, ByVal
IncludeInGravityLoads As Boolean, Optional ByVal IncludeInThisLoadPattern As
String = "None", Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object.
MyType
This is 1, 2 or 3, indicating the type of fireproofing assigned.
1 = Sprayed on - program calculate section perimeter
2 = Sprayed on - user provides section perimeter
3 = Concrete encased
Thickness
When MyType = 1 or MyType = 2 this is the thickness of the sprayed on
fireproofing. When MyType = 3 this is the concrete cover dimension. [L]
Perimeter
This item applies only when MyType = 2. It is the length of fireproofing applied
measured around the perimeter of the frame object cross-section. [L]
Density
This is the weight per unit volume of the fireproofing material. [F/L3]
tf
This item applies only when MyType = 1 or MyType = 3. If this item is True, the
fireproofing is assumed to be applied to the top flange of the section. If it is
False, the program assumes no fireproofing is applied to the section top flange.
This flag applies for I, channel and double channel sections.
IncludeInSelfWeight
If this item is True the fireproofing is included in the structure self weight.
IncludeInGravityLoads
If this item is True the fireproofing is included gravity loads applied in the X, Y
and Z directions.
IncludeInThisLoadPattern
This item is either None or the name of an existing load pattern. If it is the name
of a load pattern then the weight of the fireproofing is applied as a distributed
load in the global Z direction in the load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the fireproofing assignments to existing frame objects.
The function returns zero if the fireproofing assignments are successfully set,
otherwise it returns a nonzero value.
VBA Example
Sub SetFireproofing()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject =
CreateObject("CSI.SAP2000.API.SapObject")
'start Sap2000 application
SapObject.ApplicationStart
'create SapModel object
Set SapModel = SapObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)
'add new load pattern
ret = SapModel.LoadPatterns.Add("Fireproofing",
LTYPE_SUPERDEAD)
'assign fireproofing, use in self weight and in load
pattern
ret = SapModel.FrameObj.SetFireproofing_1("ALL", 1, 2,
0, 8.68E-06, False, True, False, "Fireproofing", Group)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0. This function supercedes obsolete function
SetFireProofing
See Also
GetFireProofing_1
DeleteFireProofing
SetGroupAssign
Syntax
SapObject.SapModel.FrameObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified frame objects are added to the group specified
by the GroupName item. If it is True, the frame objects are removed from the
group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the frame object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all frame objects in the group specified by the Name item
are added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected frame objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes frame objects from a specified group.
The function returns zero if the group assignment is successful, otherwise it
returns a nonzero value.
VBA Example
Sub AddFrameObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add frame objects to group


ret = SapModel.FrameObj.SetGroupAssign("8", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("10", "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.FrameObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing frame object.
GUID
The GUID (Global Unique ID) for the specified frame object.
Remarks
This function sets the GUID for the specified frame object. If the GUID is
passed in as a blank string, the program automatically creates a GUID for the
object.
This function returns zero if the frame object GUID is successfully set;
otherwise it returns nonzero.
VBA Example
Sub SetFrameObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set program created GUID


ret = SapObject.SapModel.FrameObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.FrameObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetInsertionPoint
Syntax
SapObject.SapModel.FrameObj.SetInsertionPoint
VB6 Procedure
Function SetInsertionPoint(ByVal Name As String, ByVal CardinalPoint As Long,
ByVal Mirror2 As Boolean, ByVal StiffTransform As Boolean, ByRef Offset1()
As Double, ByRef Offset2() As Double, Optional ByVal CSys As String =
"Local", Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
CardinalPoint
This is a numeric value from 1 to 11 that specifies the cardinal point for the
frame object. The cardinal point specifies the relative position of the frame
section on the line representing the frame object.
1 = bottom left
2 = bottom center
3 = bottom right
4 = middle left
5 = middle center
6 = middle right
7 = top left
8 = top center
9 = top right
10 = centroid
11 = shear center
Mirror2
If this item is True, the frame object section is assumed to be mirrored (flipped)
about its local 2-axis.
StiffTransform
If this item is True, the frame object stiffness is transformed for cardinal point
and joint offsets from the frame section centroid.
Offset1
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the I-End of the frame object. [L]
Offset1(0) = Offset in the 1-axis or X-axis direction
Offset1(1) = Offset in the 2-axis or Y-axis direction
Offset1(2) = Offset in the 3-axis or Z-axis direction
Offset2
This is an array of three joint offset distances, in the coordinate directions
specified by CSys, at the J-End of the frame object. [L]
Offset2(0) = Offset in the 1-axis or X-axis direction
Offset2(1) = Offset in the 2-axis or Y-axis direction
Offset2(2) = Offset in the 3-axis or Z-axis direction
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the Offset1 and Offset2 items are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns frame object insertion point data. The assignments include
the cardinal point and end joint offsets.
The function returns zero if the insertion point data is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameInsertionPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Offset1() As Double
Dim Offset2() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame insertion point


ReDim Offset1(2)
ReDim Offset2(2)
For i=0 To 2
Offset1(i)=10 + i
Offset2(i)=20 + i
Next i
ret = SapModel.FrameObj.SetInsertionPoint("15", 7, False,
True, Offset1, Offset2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetInsertionPoint
SetLateralBracing
Syntax
SapObject.SapModel.FrameObj.SetLateralBracing
VB6 Procedure
Function SetLateralBracing(ByVal Name As String, ByVal MyType As Long,
ByVal Loc As Long, ByVal MyDist1 As Double, ByVal MyDist2 As Double,
Optional ByVal RelDist As Boolean = True, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1 or 2, indicating the bracing type assigned.
1 = Point bracing
2 = Uniform bracing
Loc
This is 1, 2 or 3, indicating the bracing location.
1 = Top
2 = Bottom
3 = All (top and bottom)
MyDist1
When MyType = 1 this is the location of the point bracing.
When MyType = 2 this is the location of the start of the uniform bracing. [L] when
RelDist = False
MyDist2
This item is not used when MyType = 1.
When MyType = 2 this is the location of the end of the uniform bracing. [L] when
RelDist = False
RelDist
If this item is True, MyDist1 and MyDist2 are relative distances; otherwise they
are actual distances.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns a lateral bracing location to frame objects.
The function returns zero if the location is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameLateralBracing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign frame lateral bracing


ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 0.25,
0)
ret = SapModel.FrameObj.SetLateralBracing("8", 1, 3, 1, 0)
ret = SapModel.FrameObj.SetLateralBracing("8", 2, 1, 0.5, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetLateralBracing
DeleteLateralBracing
SetLoadDeformation
Syntax
SapObject.SapModel.FrameObj.SetLoadDeformation
VB6 Procedure
Function SetLoadDeformation(ByVal Name As String, ByVal LoadPat As String,
ByRef DOF() As Boolean, ByRef d() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is a array of boolean values indicating if the considered degree of freedom
has a deformation load.
DOF(1) = U1
DOF(2) = U2
DOF(3) = U3
DOF(4) = R1
DOF(5) = R2
DOF(6) = R3
d
This is a array of deformation load values. The deformations specified for a
given degree of freedom are applied only if the corresponding DOF item for that
degree of freedom is True.
d(1) = U1 deformation [L]
d(2) = U2 deformation [L]
d(3) = U3 deformation [L]
d(4) = R1 deformation [rad]
d(5) = R2 deformation [rad]
d(6) = R3 deformation [rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function assigns deformation loads to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.FrameObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
DeleteLoadDeformation
SetLoadDistributedWithGUID {Frame Object}
Syntax
SapObject.SapModel.FrameObj.SetLoadDistributedWithGUID
VB6 Procedure
Function SetLoadDistributedWithGUID(ByVal Name As String, ByVal LoadPat
As String, ByVal MyType As Long, ByVal Dir As Long, ByVal Dist1 As Double,
ByVal Dist2 As Double, ByVal Val1 As Double, ByVal Val2 As Double, ByRef
GUID As String, Optional ByVal CSys As String = "Global", Optional ByVal
RelDist As Boolean = True, Optional ByVal Replace As Boolean = True) As
Long
Parameters
Name
The name of an existing frame object.
LoadPat
The name of a defined load pattern.
MyType
This is 1 or 2, indicating the type of distributed load.
1 = Force per unit length
2 = Moment per unit length
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Dist1
This is the distance from the I-End of the frame object to the start of the
distributed load. This may be a relative distance (0 <= Dist1 <= 1) or an actual
distance, depending on the value of the RelDist item. [L] when RelDist is False
Dist2
This is the distance from the I-End of the frame object to the end of the
distributed load. This may be a relative distance (0 <= Dist2 <= 1) or an actual
distance, depending on the value of the RelDist item. [L] when RelDist is False
Val1
This is the load value at the start of the distributed load. [F/L] when MyType is 1
and [FL/L] when MyType is 2
Val2
This is the load value at the end of the distributed load. [F/L] when MyType is 1
and [FL/L] when MyType is 2
GUID
This is the global unique ID of a distributed load assigned to the frame object or
if it is not the global unique id of a distributed load assigned to the frame object
and it is not blank, the global unique ID which is assigned to the newly assigned
load. If left blank, a new load is assigned to the frame object and the value of this
parameter is set to the global unique ID of the newly assigned load.
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the loads are specified.
RelDist
If this item is True, the specified Dist item is a relative distance, otherwise it is an
actual distance.
Replace
If this item is True and the input GUID is not the GUID of any distributed load
assigned to the frame object, all previous distributed loads, if any, assigned to
the specified frame object, in the specified load pattern, are deleted before
making the new assignment. If the input GUID is the GUID of a distributed load
already assigned to the frame object, the parameters of the distributed load are
updated with the values provided and this item is ignored
Remarks
If the frame object is already assigned a distributed load with a global unique ID
matching the specified global unique ID, this function modifies that distributed
load. Otherwise, this function assigns a new distributed load to the frame object
and sets its global unique ID to the specified global unique ID.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadDistributedWithGUID
DeleteLoadDistributedWithGUID
SetLoadGravity
Syntax
SapObject.SapModel.FrameObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified
frame object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame gravity loads


ret = SapModel.FrameObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadPoint
Syntax
SapObject.SapModel.FrameObj.SetLoadPoint
VB6 Procedure
Function SetLoadPoint(ByVal Name As String, ByVal LoadPat As String, ByVal
MyType As Long, ByVal Dir As Long, ByVal Dist As Double, ByVal Val As
Double, Optional ByVal CSys As String = "Global", Optional ByVal RelDist As
Boolean = True, Optional ByVal Replace As Boolean = True, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is 1 or 2, indicating the type of point load.
1 = Force
2 = Moment
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Dist
This is the distance from the I-End of the frame object to the load location. This
may be a relative distance (0 <= Dist <= 1) or an actual distance, depending on
the value of the RelDist item. [L] when RelDist is False
Val
This is the value of the point load. [F] when MyType is 1 and [FL] when MyType
is 2
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the loads are specified.
RelDist
If this item is True, the specified Dist item is a relative distance, otherwise it is an
actual distance.
Replace
If this item is True, all previous loads, if any, assigned to the specified frame
object(s), in the specified load pattern, are deleted before making the new
assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns point loads to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFramePointLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame point loads


ret = SapModel.FrameObj.SetLoadPoint("15", "DEAD", 1, 10,
.5, 20)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPoint
DeleteLoadPoint
SetLoadPointWithGUID {Frame Object}
Syntax
SapObject.SapModel.FrameObj.SetLoadPointWithGUID
VB6 Procedure
Function SetLoadPointWithGUID(ByVal Name As String, ByVal LoadPat As
String, ByVal MyType As Integer, ByVal dir As Integer, ByVal dist As Double,
ByVal val As Double, ByRef GUID As String, Optional ByVal csys As String =
"Global", Optional ByVal RelDist As Boolean = True, Optional ByVal Replace As
Boolean = True) As Long
Parameters
Name
The name of an existing frame object.
LoadPat
The name of a defined load pattern.
MyType
This is 1 or 2, indicating the type of point load.
1 = Force
2 = Moment
Dir
This is an integer between 1 and 11, indicating the direction of the load.
1 = Local 1 axis (only applies when CSys is Local)
2 = Local 2 axis (only applies when CSys is Local)
3 = Local 3 axis (only applies when CSys is Local)
4 = X direction (does not apply when CSys is Local)
5 = Y direction (does not apply when CSys is Local)
6 = Z direction (does not apply when CSys is Local)
7 = Projected X direction (does not apply when CSys is Local)
8 = Projected Y direction (does not apply when CSys is Local)
9 = Projected Z direction (does not apply when CSys is Local)
10 = Gravity direction (only applies when CSys is Global)
11 = Projected Gravity direction (only applies when CSys is Global)

The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z
direction.
Dist
This is the distance from the I-End of the frame object to the load location. This
may be a relative distance (0 <= Dist <= 1) or an actual distance, depending on
the value of the RelDist item. [L] when RelDist is False
Val
This is the value of the point load. [F] when MyType is 1 and [FL] when MyType
is 2
GUID
This is the global unique ID of a point load assigned to the frame object or if it is
not the global unique id of a point load assigned to the frame object and it is not
blank, the global unique ID which is assigned to the newly assigned load. If left
blank, a new load is assigned to the frame object and the value of this parameter
is set to the global unique ID of the newly assigned load
CSys
This is Local or the name of a defined coordinate system. It is the coordinate
system in which the loads are specified.
RelDist
If this item is True, the specified Dist item is a relative distance, otherwise it is an
actual distance.
Replace
If this item is True and the input GUID is not the GUID of any point load assigned
to the frame object, all previous point loads, if any, assigned to the specified
frame object, in the specified load pattern, are deleted before making the new
assignment. If the input GUID is the GUID of a point load already assigned to
the frame object, the parameters of the point load are updated with the values
provided and this item is ignored.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
Remarks
This function assigns point loads to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadPointWithGUID
DeleteLoadPointWithGUID
SetLoadStrain
Syntax
SapObject.SapModel.FrameObj.SetLoadStrain
VB6 Procedure
Function SetLoadStrain(ByVal Name As String, ByVal LoadPat As String, ByVal
DOF As Long, ByVal Val As Double, Optional ByVal Replace As Boolean = True,
Optional ByVal PatternName As String = "", Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is 1, 2, 3, 4, 5 or 6, indicating the degree of freedom to which the strain load
is applied.
1= Strain11
2= Strain12
3= Strain13
4= Curvature1
5= Curvature2
6= Curvature3
Val
This is the strain load value. [L/L] for DOF = 1, 2 and 3 and [1/L] for DOF = 4, 5
and 6
Replace
If this item is True, all previous strain loads, if any, assigned to the specified
frame object(s), in the specified load pattern, for the specified degree of
freedom, are deleted before making the new assignment.
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the strain load
for the frame object is uniform along the object at the value specified by Val.
If PatternName is the name of a defined joint pattern, the strain load for the
frame object is based on the specified strain value multiplied by the pattern value
at the joints at each end of the frame object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns strain loads to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame strain load


ret = SapModel.FrameObj.SetLoadStrain("1", "DEAD", 1, 0.001)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
DeleteLoadStrain
SetLoadTargetForce
Syntax
SapObject.SapModel.FrameObj.SetLoadTargetForce
VB6 Procedure
Function SetLoadTargetForce(ByVal Name As String, ByVal LoadPat As String,
ByRef DOF() As Boolean, ByRef f() As Double, ByRef RD() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is a array of boolean values indicating if the considered degree of freedom
has a target force.
DOF(1) = P
DOF(2) = V2
DOF(3) = V3
DOF(4) = T
DOF(5) = M2
DOF(6) = M3
f
This is a array of target force values. The target forces specified for a given
degree of freedom are applied only if the corresponding DOF item for that
degree of freedom is True.
f(1) = P [F]
f(2) = V2 [F]
f(3) = V3 [F]
f(4) = T [FL]
f(5) = M2 [FL]
f(6) = M3 [FL]
RD
This is a array of relative distances along the frame objects where the target
force values apply. The relative distances specified for a given degree of
freedom are applicable only if the corresponding DOF item for that degree of
freedom is True. The relative distance must be between 0 and 1, 0 <= RD <=1.
RD(1) = relative location for P target force
RD(2) = relative location for V2 target force
RD(3) = relative location for V3 target force
RD(4) = relative location for T target force
RD(5) = relative location for M2 target force
RD(6) = relative location for M3 target force
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns target forces to frame objects.
The function returns zero if the target forces are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 0.5
ret = SapModel.FrameObj.SetLoadTargetForce("1", "DEAD", DOF,
f, RD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
DeleteLoadTargetForce
SetLoadTemperature
Syntax
SapObject.SapModel.FrameObj.SetLoadTemperature
VB6 Procedure
Function SetLoadTemperature(ByVal Name As String, ByVal LoadPat As String,
ByVal MyType As Long, ByVal Val As Double, Optional ByVal PatternName As
String = "", Optional ByVal Replace As Boolean = True, Optional ByVal ItemType
As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
MyType
This is 1, 2 or 3, indicating the type of temperature load.
1 = Temperature
2 = Temperature gradient along local 2 axis
3 = Temperature gradient along local 3 axis
Val
This is the temperature change value. [T] for MyType = 1 and [T/L] for MyType =
2 and 3
PatternName
This is blank or the name of a defined joint pattern. If it is blank the temperature
load for the frame object is uniform along the object at the value specified by Val.
If PatternName is the name of a defined joint pattern, the temperature load for
the frame object is based on the specified temperature value multiplied by the
pattern value at the joints at each end of the frame object.
Replace
If this item is True, all previous temperature loads, if any, assigned to the
specified frame object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns temperature loads to frame objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame temperature load


ret = SapModel.FrameObj.SetLoadTemperature("All", "DEAD", 1,
50, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
DeleteLoadTemperature
SetLoadTransfer
Syntax
SapObject.SapModel.FrameObj.SetLoadTransfer
VB6 Procedure
Function SetLoadTransfer(ByVal Name As String, ByVal Val As Boolean, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.

Val
This boolean value indicates if load is allowed to be transferred from area objects to
this frame object.

ItemType
This is one of the following items in the eItemType enumeration:

Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.

If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.

If this item is SelectedObjects, assignment is made to all selected frame objects, and
the Name item is ignored.
Remarks
This function returns the load transfer option for frame objects. It indicates whether
the frame receives load from an area object when the area object is loaded with a
load of type uniform to frame.

The function returns zero if the load transfer option is successfully returned, otherwise
it returns a nonzero value.
VBA Example
Sub GetLoadTransferOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'set the load transfer option to False for frame object 1


ret = SapModel.FrameObj.SetLoadTransfer("1", False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.

See Also
GetLoadTransfer
SetLocalAxes
Syntax
SapObject.SapModel.FrameObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal Ang As Double, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation or, if the Advanced item is True, from the
orientation determined by the plane reference vector. The rotation for a positive
angle appears counter clockwise when the local +1 axis is pointing toward you.
[deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns a local axis angle to frame objects.
The function returns zero if the local axis angle is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame local axis angle


ret = SapModel.FrameObj.SetLocalAxes("3", 30)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetLocalAxesAdvanced
Syntax
SapObject.SapModel.FrameObj.SetLocalAxesAdvanced
VB6 Procedure
Function SetLocalAxesAdvanced(ByVal Name As String, ByVal Active As
Boolean, ByVal Plane2 As Long, ByVal PlVectOpt As Long, ByVal PlCSys As
String, ByRef PlDir() As Long, ByRef PlPt() As String, ByRef PlVect() As
Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Active
This is True if advanced local axes exist.
Plane2
This is 12 or 13, indicating that the local plane determined by the plane
reference vector is the 1-2 plane or the 1-3 plane. This item applies only when
the Active item is True.
PlVectOpt
This is 1, 2, or 3, indicating the plane reference vector option. This item applies
only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
PlCSys
The coordinate system used to define the plane reference vector coordinate
directions and the plane user vector. This item applies when the Active item is
True and the PlVectOpt item is 1 or 3.
PlDir
This is an array dimensioned to 1 (2 integers), indicating the plane reference
vector primary and secondary coordinate directions, PlDir(0) and PlDir(1)
respectively, taken at the object center in the specified coordinate system and
used to determine the plane reference vector. This item applies when the Active
item is True and the PlVectOpt item is 1. Possible coordinate direction values
are:
1 = +X -1 = -X
2 = +Y -2 = -Y
3 = +Z -3 = -Z
4 = +CR -4 = -CR
5 = +CA -5 = -CA
6 = +CZ -6 = -CZ
7 = +SR -7 = -SR
8 = +SA -8 = -SA
9 = +SB -9 = -SB
PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the plane reference vector. Either of these joints may be specified as
None to indicate the center of the specified object. If both joints are specified as
None, they are not used to define the plane reference vector. This item applies
when the Active item is True and the PlVectOpt item is 2.
PlVect
This is an array dimensioned to 2 (3 doubles) that defines the plane reference
vector. This item applies when the Active item is True and the PlVectOpt item is
3.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected frame objects and the
Name item is ignored.
Remarks
This function assigns advanced local axes to frame objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame advanced local axes


MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.FrameObj.SetLocalAxesAdvanced("3", True, 12,
1, "Global", MyPlDir, MyPlPt, MyPlVect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetLocalAxesAdvanced
GetLocalAxes
SetMass
Syntax
SapObject.SapModel.FrameObj.SetMass
VB6 Procedure
Function SetMass(ByVal Name As String, ByVal MassOverL As Double,
Optional ByVal Replace As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MassOverL
The mass per unit length assigned to the frame object. [M/L]
Replace
If this item is True, all existing mass assignments to the frame object are
removed before assigning the specified mas. If it is False, the specified mass is
added to any existing mass already assigned to the frame object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function assigns mass per unit length to frame objects.
The function returns zero if the mass is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame mass


ret = SapModel.FrameObj.SetMass("ALL", .0001, False, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
DeleteMass
SetMaterialOverwrite
Syntax
SapObject.SapModel.FrameObj.SetMaterialOverwrite
VB6 Procedure
Function SetMaterialOverwrite(ByVal Name As String, ByVal PropName As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
This is None or a blank string, indicating that any existing material overwrites
assigned to the specified frame objects are to be removed, or it is the name of
an existing material property.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the material overwrite assignment for frame objects.
The function returns zero if the material overwrite assignment is successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameMaterialOverwrite()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign material overwrite


ret = SapModel.FrameObj.SetMaterialOverwrite("3", "4000Psi")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMaterialOverwrite
SetMatTemp
Syntax
SapObject.SapModel.FrameObj.SetMatTemp
VB6 Procedure
Function SetMatTemp(ByVal Name As String, ByVal Temp As Double, Optional
ByVal PatternName As String = "", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Temp
This is the material temperature value assigned to the frame object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the frame object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the frame object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the frame object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function assigns material temperatures to frame objects.
The function returns zero if the material temperatures are successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign material temperature


ret = SapModel.FrameObj.SetMatTemp("ALL", 50, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
SetModifiers
Syntax
SapObject.SapModel.FrameObj.SetModifiers
VB6 Procedure
Function SetModifiers(ByVal Name As String, ByRef Value() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Value
This is an array of eight unitless modifiers.
Value(0) = Cross sectional area modifier
Value(1) = Shear area in local 2 direction modifier
Value(2) = Shear area in local 3 direction modifier
Value(3) = Torsional constant modifier
Value(4) = Moment of inertia about local 2 axis modifier
Value(5) = Moment of inertia about local 3 axis modifier
Value(6) = Mass modifier
Value(7) = Weight modifier

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the frame modifier assignment for frame objects. The default
value for all modifiers is one.
The function returns zero if the modifier assignments are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignFrameModifiers()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign modifiers
ReDim Value(7)
For i = 0 To 7
Value(i) = 1
Next i
Value(5) = 100
ret = SapModel.FrameObj.SetModifiers("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetModifiers
DeleteModifiers
SetNotionalSize
Syntax
SapObject.SapModel.PropFrame.SetNotionalSize
VB6 Procedure
Function SetNotionalSize(ByVal Name As String, ByVal stype As String, ByVal
Value As Double) As Long
Parameters
Name
The name of an existing frame section property.
stype
The type to define the notional size of a section. It can be:
"Auto" = Program will determine the notional size based on the average
thickness of an area element.
"User" = The notional size is based on the user-defined value.
"None" = Notional size will not be considered. In other words, the time-
dependent effect of this section will not be considered.
Value
For stype is "Auto", the Value represents for the scale factor to the program-
determined notional size; for stype is User, the Value represents for the user-
defined notional size [L]; for stype is None, the Value will not be used and can
be set to 1.
Remarks
This function assigns the method to determine the notional size of a frame
section for the creep and shrinkage calculations. This function is currently
worked for the steel/aluminum sections - I/Wide Flange, Channel, Tee, Angle,
Double Angle, Double Channel, Pipe and Tube sections, and all the concrete
sections - Rectangular, Circular, Pipe, Tube, Precast I.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignFramePropNotionalSize() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim stype As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3,
200)

'assign parameters
stype = Auto
Value = 1.1
ret = SapModel.PropFrame.SetNotionalSize("FSEC1", stype,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0
See Also
GetNotionalSize
SetOutputStations
Syntax
SapObject.SapModel.FrameObj.SetOutputStations
VB6 Procedure
Function SetOutputStations(ByVal Name As String, ByVal MyType As Long,
ByVal MaxSegSize As Double, ByVal MinSections As Long, Optional ByVal
NoOutPutAndDesignAtElementEnds As Boolean = False, Optional ByVal
NoOutPutAndDesignAtPointLoads As Boolean = False, Optional ByVal ItemType
As eItemType = eItemType_Objects) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1 or 2, indicating how the output stations are specified.
1 = maximum segment size, that is, maximum station spacing
2 = minimum number of stations
MaxSegSize
The maximum segment size, that is, the maximum station spacing. This item
applies only when MyType = 1. [L]
MinSections
The minimum number of stations. This item applies only when MyType = 2.
NoOutPutAndDesignAtElementEnds
If this item is True, no additional output stations are added at the ends of line
elements when the frame object is internally meshed.
NoOutPutAndDesignAtPointLoads
If this item is True, no additional output stations are added at point load
locations.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function assigns frame object output station data.
The function returns zero if the data is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignFrameOutputStationData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign frame output station data


ret = SapModel.FrameObj.SetOutputStations("15", 1, 18, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOutputStations
SetPDeltaForce
Syntax
SapObject.SapModel.FrameObj.SetPDeltaForce
VB6 Procedure
Function SetPDeltaForce(ByVal Name As String, ByVal PDeltaForce As Double,
ByVal Dir As Long, ByVal Replace As Boolean, Optional ByVal CSys As String =
"Global", Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PDeltaForce
The P-Delta force assigned to the frame object. [F]
Dir
This is 0, 1, 2 or 3, indicating the direction of the P-Delta force assignment.
0= Frame object local 1-axis direction
1= Projected X direction in CSys coordinate system
2= Projected Y direction in CSys coordinate system
3= Projected Z direction in CSys coordinate system
Replace
If this item is True, all existing P-Delta force assignments to the frame object are
removed before assigning the specified P-Delta force. If it is False, the specified
P-Delta force is added to any existing P-Delta forces already assigned to the
frame object.
CSys
This is the name of the coordinate system in which the projected X, Y or Z
direction P-Delta forces are defined. This item does not apply if the Dir item is
zero (frame object local 1-axis direction).
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns P-Delta forces to straight frame objects. P-Delta force
assignments do not apply to curved frames.
The function returns zero if the assignments are successfully applied, otherwise
it returns a nonzero value.
VBA Example
Sub AssignFramePDeltaForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign P-Delta force


ret = SapModel.FrameObj.SetPDeltaForce("ALL", 100, 0, True,
, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPDeltaForce
DeletePDeltaForce
SetReleases
Syntax
SapObject.SapModel.FrameObj.SetReleases
VB6 Procedure
Function SetReleases(ByVal Name As String, ByRef ii() As Boolean, ByRef jj()
As Boolean, ByRef StartValue() As Double, ByRef EndValue() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ii, jj
These are arrays of six booleans indicating the I-End and J-End releases for the
frame object.
ii(0) and jj(0) = U1 release
ii(1) and jj(1) = U2 release
ii(2) and jj(2) = U3 release
ii(3) and jj(3) = R1 release
ii(4) and jj(4) = R2 release
ii(5) and jj(5) = R3 release

StartValue, EndValue
These are arrays of six values indicating the I-End and J-End partial fixity
springs for the frame object.
StartValue(0) and EndValue(0) = U1 partial fixity [F/L]
StartValue(1) and EndValue(1) = U2 partial fixity [F/L]
StartValue(2) and EndValue(2) = U3 partial fixity [F/L]
StartValue(3) and EndValue(3) = R1 partial fixity [FL/rad]
StartValue(4) and EndValue(4) = R2 partial fixity [FL/rad]
StartValue(5) and EndValue(5) = R3 partial fixity [FL/rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function makes end release and partial fixity assignments to frame objects.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
Partial fixity assignments are made to degrees of freedom that have been
released only.
Some release assignments would cause instability in the model. An error is
returned if this type of assignment is made. Unstable release assignments
include the following:
U1 released at both ends
U2 released at both ends
U3 released at both ends
R1 released at both ends
R2 released at both ends and U3 at either end
R3 released at both ends and U2 at either end
VBA Example
Sub SetFrameEndReleases()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ii() As Boolean
Dim jj() As Boolean
Dim StartValue() As Double
Dim EndValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign end releases


ReDim ii(5)
ReDim jj(5)
ReDim StartValue(5)
ReDim EndValue(5)
ii(5) = True
jj(5) = True
ret = SapModel.FrameObj.SetReleases("13", ii, jj,
StartValue, EndValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetReleases
SetSection
Syntax
SapObject.SapModel.FrameObj.SetSection
VB6 Procedure
Function SetSection(ByVal name As String, ByVal PropName As String, Optional
ByVal ItemType As eItemType = object, Optional ByVal sVarRelStartLoc As
Double = 0, Optional ByVal sVarTotalLength As Double = 0) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
This is None or the name of a frame section property to be assigned to the
specified frame object(s).
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
sVarTotalLength
This is the total assumed length of the nonprismatic section. Enter 0 for this item
to indicate that the section length is the same as the frame object length.
This item is applicable only when the assigned frame section property is a
nonprismatic section.
sVarRelStartLoc
This is the relative distance along the nonprismatic section to the I-End (start) of
the frame object. This item is ignored when the sVarTotalLengthitem is 0.
This item is applicable only when the assigned frame section property is a
nonprismatic section, and the sVarTotalLengthitem is greater than zero.
Remarks
This function assigns a frame section property to a frame object.
The function returns zero if the frame section property data is successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub SetFrameSectionProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\Example 1-022.sdb"
ret = SapModel.File.OpenFile(FileName)

'unlock model
ret = SapModel.SetModelIsLocked(False)

'set frame section property


ret = SapModel.FrameObj.SetSection("28", "W24X160")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSection
GetSectionNonPrismatic
SetSelected
Syntax
Sap2000.FrameObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified frame object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the frame object specified by
the Name item.
If this item is Group, the selected status is set for all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected frame
objects, and the Name item is ignored.
Remarks
This function sets the selected status for a frame object.
The function returns zero if the selected status is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set frame object selected


ret = SapModel.FrameObj.SetSelected("8", True)

'update view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
SetSpring
Syntax
SapObject.SapModel.FrameObj.SetSpring
VB6 Procedure
Function SetSpring(ByVal Name As String, ByVal MyType As Long,
ByVal s As Double, ByVal SimpleSpringType As Long, ByVal LinkProp
As String, ByVal SpringLocalOneType As Long, ByVal Dir As Long,
ByVal Plane23Angle As Double, ByRef Vec() As Double, ByVal Ang As
Double, ByVal Replace As Boolean, Optional ByVal CSys As String =
"Local", Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
The simple spring stiffness per unit length of the frame object. This item applies
only when MyType = 1. [F/L2]
SimpleSpringType
This is 1, 2 or 3, indicating the simple spring type. This item applies only when
MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
The name of the link property assigned to the spring. This item applies only when
MyType = 2.
SpringLocalOneType
This is 1, 2 or 3, indicating the method used to specify the spring positive local 1-
axis orientation.
1 = Parallel to frame object local axis
2 = In the frame object 2-3 plane
3 = User specified direction vector
Dir
This is 1, 2, 3, -1, -2 or -3, indicating the frame object local axis that
corresponds to the positive local 1-axis of the spring. This item applies only
when SpringLocalOneType = 1.
Plane23Angle
This is the angle in the frame object 2-3 plane measured counter clockwise from
the frame positive 2-axis to the spring positive 1-axis. This item applies only
when SpringLocalOneType = 2. [deg]
Vec
This is an array of three values that define the direction vector of the spring
positive local 1-axis. The direction vector is in the coordinate system specified
by the CSys item. This item applies only when SpringLocalOneType = 3.
Ang
This is the angle that the link local 2-axis is rotated from its default orientation.
This item applies only when MyType = 2. [deg]
Replace
If this item is True, all existing spring assignments to the frame object are
removed before assigning the specified spring. If it is False, the specified spring
is added to any existing springs already assigned to the frame object.
CSys
This is Local (meaning the frame object local coordinate system) or the name of
a defined coordinate system. This item is the coordinate system in which the
user specified direction vector, Vec, is specified. This item applies only when
SpringLocalOneType = 3.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function makes spring assignments to frame objects.
The function returns zero if the assignments are successfully applied, otherwise
it returns a nonzero value.
VBA Example
Sub AssignFrameSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign springs to frame


ReDim Vec(2)
ret = SapModel.FrameObj.SetSpring("ALL", 1, 1, 1, "", 1, 2,
0, Vec, 0, False, "Local", Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
DeleteSpring
SetStraight
Syntax
SapObject.SapModel.FrameObj.SetStraight
VB6 Procedure
Function SetStraight(ByVal Name As String) As Long
Parameters
Name
The name of a defined curved frame object.
Remarks
This function sets a curved frame object straight.
The function returns zero if the frame object type is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetFrameStraight()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set frame curved


ret = SapModel.FrameObj.SetCurved("15", 2, -200, 0, 300, "",
0, 16)

'set frame straight


ret = SapModel.FrameObj.SetStraight("15")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetCurved
GetCurved
GetType
SetTCLimits
Syntax
SapObject.SapModel.FrameObj.SetTCLimits
VB6 Procedure
Function SetTCLimits(ByVal Name As String, ByVal LimitCompressionExists As
Boolean, ByVal LimitCompression As Double, ByVal LimitTensionExists As
Boolean, ByVal LimitTension As Double, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
LimitCompressionExists
This item is True if a compression force limit exists for the frame object.
LimitCompression
The compression force limit for the frame object. [F]
LimitTensionExists
This item is True if a tension force limit exists for the frame object.
LimitTension
The tension force limit for the frame object. [F]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function makes tension/compression force limit assignments to frame
objects.
The function returns zero if the assignments are successfully applied, otherwise
it returns a nonzero value.
Note that the tension and compression limits are only used in nonlinear
analyses.
VBA Example
Sub AssignFrameTCLimits()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign tension/compression limits


ret = SapModel.FrameObj.SetTCLimits("1", False, 0, True,
100)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTCLimits
SetTrapezoidal
Syntax
SapObject.SapModel.PropFrame.SetTrapezoidal
VB6 Procedure
Function SetTrapezoidal(ByVal Name As String, ByVal MatProp As String, ByVal
t3 As Double, ByVal t2 As Double, ByVal t2b As Double, Optional ByVal Color As
Long = -1, Optional ByVal Notes As String = "", Optional ByVal GUID As String =
"") As Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
t3
The section depth. [L]
t2
The section top width. [L]
t2b
The section bottom width. [L]
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a solid trapezoidal frame section property. If this function
is called for an existing frame section property, all items for the section are reset
to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropTrapezoidal()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ret = SapModel.PropFrame.SetTrapezoidal("R1", "4000Psi", 20,
20, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.0
See Also
GetTrapezoidal
SetRebarBeam
SetRebarColumn
GetRebarBeam
GetRebarColumn
AddByCoord
Syntax
SapObject.SapModel.LinkObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByVal xi As Double, ByVal yi As Double, ByVal zi As
Double, ByVal xj As Double, ByVal yj As Double, ByVal zj As Double, ByRef
Name As String, Optional IsSingleJoint As Boolean = False, Optional ByVal
PropName As String = "Default", Optional ByVal UserName As String = "",
Optional ByVal CSys As String = "Global") As Long
Parameters
xi, yi, zi
The coordinates of the I-End of the added link object. The coordinates are in the
coordinate system defined by the CSys item.
xj, yj, zj
The coordinates of the J-End of the added link object. The coordinates are in the
coordinate system defined by the CSys item.
These coordinates are ignored if the IsSingleJoint item is True.
Name
This is the name that the program ultimately assigns for the link object. If no
UserName is specified, the program assigns a default name to the link object. If
a UserName is specified and that name is not used for another link object, the
UserName is assigned to the link object; otherwise a default name is assigned
to the link object.
IsSingleJoint
This item is True if a one-joint link is added and False if a two-joint link is added.
PropName
This is either Default or the name of a defined link property.
If it is Default the program assigns a default link property to the link object. If it is
the name of a defined link property, that property is assigned to the link object.
UserName
This is an optional user specified name for the link object. If a UserName is
specified and that name is already used for another link object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the link object end point coordinates
are defined.
Remarks
This function adds a new link object whose end points are at the specified
coordinates.
The function returns zero if the link object is successfully added; otherwise it
returns a nonzero value.
VBA Example
Sub AddLinkObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = New Sap200015.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by coordinates


ret = SapModel.LinkObj.AddByCoord(-288, 0, 288, 0, 0, 0,
Name1, True)
ret = SapModel.LinkObj.AddByCoord(-288, 0, 0, 0, 0, 144,
Name2)

'refresh view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
AddByPoint
Syntax
SapObject.SapModel.LinkObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByVal Point1 as String, ByVal Point2 as String, ByRef
Name As String, Optional IsSingleJoint As Boolean = False, Optional ByVal
PropName As String = "Default", Optional ByVal UserName As String = "") As
Long
Parameters
Point1
The name of a defined point object at the I-End of the added link object.
Point2
The name of a defined point object at the J-End of the added link object.
This item is ignored if the IsSingleJoint item is True.
Name
This is the name that the program ultimately assigns for the link object. If no
UserName is specified, the program assigns a default name to the link object. If
a UserName is specified and that name is not used for another link object, the
UserName is assigned to the link object; otherwise a default name is assigned
to the link object.
IsSingleJoint
This item is True if a one-joint link is added and False if a two-joint link is added.
PropName
This is either Default or the name of a defined link property.
If it is Default the program assigns a default link property to the link object. If it is
the name of a defined link property, that property is assigned to the link object.
UserName
This is an optional user specified name for the link object. If a UserName is
specified and that name is already used for another link object, the program
ignores the UserName.
Remarks
This function adds a new link object whose end points are specified by name.
The function returns zero if the link object is successfully added; otherwise it
returns a nonzero value.
VBA Example
Sub AddLinkObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
Count
Syntax
SapObject.SapModel.LinkObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns a count of the link objects in the model.
VBA Example
Sub CountLinkObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'refresh view
ret = SapModel.View.RefreshView

'get number of link objects


Count = SapModel.LinkObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ChangeName
Syntax
SapObject.SapModel.LinkObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined link object.
NewName
The new name for the link object.
Remarks
This function applies a new name to an link object.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeLinkObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'refresh view
ret = SapModel.View.RefreshView

'change name
ret = SapModel.LinkObj.ChangeName(Name, "MyLink")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.LinkObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the link object specified by the Name item is deleted.
If this item is Group, the all link objects in the group specified by the Name item
are deleted.
If this item is SelectedObjects, all selected link objects are deleted, and the
Name item is ignored.
Remarks
The function deletes link objects.
The function returns zero if the link objects are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteLinkObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name1, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name2)

'delete area object


ret = SapModel.LinkObj.Delete(Name1)

'refresh view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteLoadDeformation
Syntax
SapObject.SapModel.LinkObj.DeleteLoadDeformation
VB6 Procedure
Function DeleteLoadDeformation(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the link object
specified by the Name item.
If this item is Group, the load assignments are deleted for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
link objects, and the Name item is ignored.
Remarks
This function deletes the deformation load assignments to the specified link
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteLinkDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name1)
ret = SapModel.LinkObj.AddByPoint("2", "6", Name2)

'assign link deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.LinkObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'delete link deformation load


ret = SapModel.LinkObj.DeleteLoadDeformation(Name1, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
SetLoadDeformation
DeleteLoadGravity
Syntax
SapObject.SapModel.LinkObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the link object
specified by the Name item.
If this item is Group, the load assignments are deleted for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
link objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified link objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteLinkGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name1)
ret = SapModel.LinkObj.AddByPoint("2", "6", Name2)

'assign link gravity loads


ret = SapModel.LinkObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete link gravity load


ret = SapModel.LinkObj.DeleteLoadGravity(Name1, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadTargetForce
Syntax
SapObject.SapModel.LinkObj.DeleteLoadTargetForce
VB6 Procedure
Function DeleteLoadTargetForce(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the link object
specified by the Name item.
If this item is Group, the load assignments are deleted for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
link objects, and the Name item is ignored.
Remarks
This function deletes the target force assignments to the specified link objects
for the specified load pattern.
The function returns zero if the target force assignments are successfully
deleted; otherwise it returns a nonzero value.
VBA Example
Sub DeleteLinkTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name1)
ret = SapModel.LinkObj.AddByPoint("2", "6", Name2)

'assign link target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 1
ret = SapModel.LinkObj.SetLoadTargetForce("ALL", "DEAD",
DOF, f, RD, Group)

'delete link target force


ret = SapModel.LinkObj.DeleteLoadTargetForce(Name1, "DEAD")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
SetLoadTargetForce
GetElm
Syntax
SapObject.SapModel.LinkObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef Elm as String) As Long
Parameters
Name
The name of an existing link object.
Elm
The name of the link element created from the specified link object.
Remarks
This function retrieves the name of the link element (analysis model link)
associated with a specified link object in the object-based model.
This function returns zero if the link element name is successfully retrieved;
otherwise it returns nonzero. An error occurs if the analysis model does not
exist.
VBA Example
Sub GetLinkElementNameForLinkObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Elm As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get link element name


ret = SapModel.LinkObj.GetElm(Name, Elm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.LinkObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing link object.
GUID
The GUID (Global Unique ID) for the specified link object.
Remarks
This function retrieves the GUID for the specified link object.
This function returns zero if the link object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetLinkObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'set program created GUID


ret = SapObject.SapModel.LinkObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.LinkObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetLoadDeformation
Syntax
SapObject.SapModel.LinkObj.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef LinkName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef U1() As
Double, ByRef U2() As Double, ByRef U3() As Double, ByRef R1() As Double,
ByRef R2() As Double, ByRef R3() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified link objects.
LinkName
This is an array that includes the name of the link object associated with each
deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values, indicating if the considered degree of
freedom has a deformation load.
dof1 = U1
dof2 = U2
dof3 = U3
dof4 = R1
dof5 = R2
dof6 = R3
U1, U2, U3, R1, R2, R3
These are arrays of deformation load values. The deformations specified for a
given degree of freedom are applicable only if the corresponding DOF item for
that degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignments are retrieved for the link object specified
by the Name item.
If this item is Group, the assignments are retrieved for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected link
objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to link objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)
'assign link deformation loads
ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.LinkObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'get link deformation loads


ret = SapModel.LinkObj.GetLoadDeformation(Name, NumberItems,
LinkName, LoadPat, dof1, dof2, dof3, dof4, dof5, dof6, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDeformation
DeleteLoadDeformation
GetLoadGravity
Syntax
SapObject.SapModel.LinkObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef LinkName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified link objects.
LinkName
This is an array that includes the name of the link object associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the link object specified
by the Name item.
If this item is Group, the assignments are retrieved for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected link
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to link objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link gravity loads


ret = SapModel.LinkObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get link gravity load


ret = SapModel.LinkObj.GetLoadGravity(Name, NumberItems,
LinkName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadTargetForce
Syntax
SapObject.SapModel.LinkObj.GetLoadTargetForce
VB6 Procedure
Function GetLoadTargetForce(ByVal Name As String, ByRef NumberItems As
Long, ByRef LinkName() As String, ByRef LoadPat() As String, ByRef dof1() As
Boolean, ByRef dof2() As Boolean, ByRef dof3() As Boolean, ByRef dof4() As
Boolean, ByRef dof5() As Boolean, ByRef dof6() As Boolean, ByRef P() As
Double, ByRef V2() As Double, ByRef V3() As Double, ByRef T() As Double,
ByRef M2() As Double, ByRef M3() As Double, ByRef T1() As Double, ByRef
T2() As Double, ByRef T3() As Double, ByRef T4() As Double, ByRef T5() As
Double, ByRef T6() As Double, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified link objects.
LinkName
This is an array that includes the name of the link object associated with each
target force.
LoadPat
This is an array that includes the name of the load pattern associated with each
target force.
dof1, dof2, dof3, dof4, dof5, dof6
These are arrays of boolean values indicating if the considered degree of
freedom has a target force assignment.
dof1 = P
dof2 = V2
dof3 = V3
dof4 = T
dof5 = M2
dof6 = M3
P, V2, V3, T, M2, M3
These are arrays of target force values. The target forces specified for a given
degree of freedom are applicable only if the corresponding DOF item for that
degree of freedom is True.
U1 = U1 deformation [L]
U2 = U2 deformation [L]
U3 = U3 deformation [L]
R1 = R1 deformation [rad]
R2 = R2 deformation [rad]
R3 = R3 deformation [rad]
T1, T2, T3, T4, T5, T6
These are arrays of the relative distances along the link objects where the target force
values apply. The relative distances specified for a given degree of freedom are applicable
only if the corresponding dofn item for that degree of freedom is True.
T1 = relative location for P target force
T2 = relative location for V2 target force
T3 = relative location for V3 target force
T4 = relative location for T target force
T5 = relative location for M2 target force
T6 = relative location for M3 target force
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the link object specified
by the Name item.
If this item is Group, the assignments are retrieved for all link objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected link
objects, and the Name item is ignored.
Remarks
This function retrieves the target force assignments to link objects.
The function returns zero if the target force assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetLinkTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim NumberItems As Long
Dim LinkName() As String
Dim LoadPat() As String
Dim dof1() As Boolean
Dim dof2() As Boolean
Dim dof3() As Boolean
Dim dof4() As Boolean
Dim dof5() As Boolean
Dim dof6() As Boolean
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double
Dim T1() As Double
Dim T2() As Double
Dim T3() As Double
Dim T4() As Double
Dim T5() As Double
Dim T6() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 1
ret = SapModel.LinkObj.SetLoadTargetForce(Name, "DEAD", DOF,
f, RD)

'get link target force


ret = SapModel.LinkObj.GetLoadTargetForce(Name, NumberItems,
LinkName, LoadPat, dof1, dof2, dof3, dof4, dof5, dof6, P, V2, V3,
T, M2, M3, T1, T2, T3, T4, T5, T6)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTargetForce
DeleteLoadTargetForce
GetLocalAxes
Syntax
SapObject.SapModel.LinkObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double, ByRef
Advanced As Boolean) As Long
Parameters
Name
The name of an existing link object.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation or, if the Advanced item is True, from the
orientation determined by the plane reference vector. The rotation for a positive
angle appears counter clockwise when the local +1 axis is pointing toward you.
[deg]
Advanced
This item is True if the link object local axes orientation was obtained using
advanced local axes parameters.
Remarks
This function retrieves the local axis angle assignment for link objects.
The function returns zero if the assignment is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Ang As Double
Dim Advanced As boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link local axis angle


ret = SapModel.LinkObj.SetLocalAxes(Name, 30)

'get link local axis angle


ret = SapModel.LinkObj.GetLocalAxes(Name, Ang, Advanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetLocalAxesAdvanced
Syntax
SapObject.SapModel.LinkObj.GetLocalAxesAdvanced
VB6 Procedure
Function GetLocalAxesAdvanced(ByVal Name As String, ByRef Active As
Boolean, ByRef AxVectOpt As Long, ByRef AxCSys As String, ByRef AxDir()
As Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByRef Plane2 As
Long, ByRef PlVectOpt As Long, ByRef PlCSys As String, ByRef PlDir() As
Long, ByRef PlPt() As String, ByRef PlVect() As Double) As Long
Parameters
Name
The name of an existing link object.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2, or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12 or 13, indicating that the local plane determined by the plane
reference vector is the 1-2 or 1-3 plane. This item applies only when the Active
item is True.
Remarks
This function assigns advanced local axes to link objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub GetLinkAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName As String
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double
Dim Ang As Double
Dim Advanced As Boolean
Dim Active As Boolean
Dim AxVectOpt As Long
Dim AxCSys As String
Dim AxDir() As Long
Dim AxPt() As String
Dim AxVect() As Double
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim PlDir() As Long
Dim PlPt() As String
Dim PlVect() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)
'add link object by points
ret = SapModel.LinkObj.AddByPoint("1", "1", MyName)

'assign link advanced local axes


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.LinkObj.SetLocalAxesAdvanced(MyName, True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect)

'get link local axis angle


ret = SapModel.LinkObj.GetLocalAxes(MyName, Ang, Advanced)

'get link advanced local axes data


If Advanced Then
ret = SapModel.LinkObj.GetLocalAxesAdvanced(MyName,
Active, AxVectOpt, AxCSys, AxDir, AxPt, AxVect, Plane2, PlVectOpt,
PlCSys, PlDir, PlPt, PlVect)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetLocalAxesAdvanced
SetLocalAxes
GetNameList
Syntax
SapObject.SapModel.LinkObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of link object names retrieved by the program.
MyName
This is a one-dimensional array of link object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the APIuser.
Remarks
This function retrieves the names of all defined link objects.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetLinkObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("3", "", Name, True)
ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'get link object names


ret = SapModel.LinkObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.LinkObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined link object.
Point1
The name of the point object at the I-End of the specified link object.
Point2
The name of the point object at the J-End of the specified link object.
Remarks
This function retrieves the names of the point objects at each end of a specified
link object. If names of the two point objects are the same, the specified link
object is a one-joint link object.
The function returns zero if the point names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Point1 As String
Dim Point2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by coordinates


ret = SapModel.LinkObj.AddByCoord(-288, 0, 0, 0, 0, 144,
Name)

'get names of points


ret = SapModel.LinkObj.GetPoints(Name, Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.LinkObj.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined link object.
PropName
The name of the link property assigned to the link object.
Remarks
This function retrieves the link property assigned to a link object.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'get link property


ret = SapModel.LinkObj.GetProperty(Name, PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetPropertyFD
SetPropertyFD
GetPropertyFD
Syntax
SapObject.SapModel.LinkObj.GetPropertyFD
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined link object.
PropName
The name of the frequency dependent link property assigned to the link object.
This item is None if there is no frequency dependent link property assigned to
the link object.
Remarks
This function retrieves the frequency dependent link property assigned to a link
object.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetLinkObjectFDProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-012.sdb")

'get link frequency dependent property


ret = SapModel.LinkObj.GetPropertyFD("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetProperty
SetPropertyFD
GetSelected
Syntax
Sap2000.LinkObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing link object.
Selected
This item is True if the specified link object is selected; otherwise it is False.
Remarks
This function retrieves the selected status for a link object.
The function returns zero if the selected status is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetLinkObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'set link object selected


ret = SapModel.LinkObj.SetSelected("ALL", True, Group)

'get link object selected status


ret = SapModel.LinkObj.GetSelected(Name, Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetTransformationMatrix
Syntax
Sap2000.LinkObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing link object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the link object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the link object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system, and the link object local coordinate system.
Remarks
The function returns zero if the link object transformation matrix is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetLinkObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link object local axis angle


ret = SapModel.LinkObj.SetLocalAxes(Name, 30)

'get link object transformation matrix


ReDim Value(8)
ret = SapModel.LinkObj.GetTransformationMatrix(Name, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGroupAssign
Syntax
SapObject.SapModel.LinkObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified link objects are added to the group specified by
the GroupName item. If it is True, the link objects are removed from the group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the link object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all link objects in the group specified by the Name item are
added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected link objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes link objects from a specified group.
The function returns zero if the group assignment is successful; otherwise it
returns a nonzero value.
VBA Example
Sub AddLinkObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add link object to group


ret = SapModel.LinkObj.SetGroupAssign(Name, "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.LinkObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing link object.
GUID
The GUID (Global Unique ID) for the specified link object.
Remarks
This function sets the GUID for the specified link object. If the GUID is passed in
as a blank string, the program automatically creates a GUID for the object.
This function returns zero if the link object GUID is successfully set; otherwise it
returns nonzero.
VBA Example
Sub SetLinkObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'set program created GUID


ret = SapObject.SapModel.LinkObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.LinkObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetLoadDeformation
Syntax
SapObject.SapModel.LinkObj.SetLoadDeformation
VB6 Procedure
Function SetLoadDeformation(ByVal Name As String, ByVal LoadPat As String,
ByRef DOF() As Boolean, ByRef d() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is a array of boolean values indicating if the considered degree of freedom
has a deformation load.
DOF(1) = U1
DOF(2) = U2
DOF(3) = U3
DOF(4) = R1
DOF(5) = R2
DOF(6) = R3
d
This is a array of deformation load values. The deformations specified for a
given degree of freedom are applied only if the corresponding DOF item for that
degree of freedom is True.
d(1) = U1 deformation [L]
d(2) = U2 deformation [L]
d(3) = U3 deformation [L]
d(4) = R1 deformation [rad]
d(5) = R2 deformation [rad]
d(6) = R3 deformation [rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns deformation loads to link objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignLinkDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim d() As double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link deformation loads


ReDim DOF(5)
ReDim d(5)
DOF(0) = True
D(0) = 2
ret = SapModel.LinkObj.SetLoadDeformation("ALL", "DEAD",
DOF, d, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
DeleteLoadDeformation
SetLoadGravity
Syntax
SapObject.SapModel.LinkObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified link
object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to link objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignLinkGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link gravity loads


ret = SapModel.LinkObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadTargetForce
Syntax
SapObject.SapModel.LinkObj.SetLoadTargetForce
VB6 Procedure
Function SetLoadTargetForce(ByVal Name As String, ByVal LoadPat As String,
ByRef DOF() As Boolean, ByRef f() As Double, ByRef RD() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
DOF
This is a array of boolean values indicating if the considered degree of freedom
has a target force.
DOF(1) = P
DOF(2) = V2
DOF(3) = V3
DOF(4) = T
DOF(5) = M2
DOF(6) = M3
f
This is a array of target force values. The target forces specified for a given
degree of freedom are applied only if the corresponding DOF item for that
degree of freedom is True.
f(1) = P [F]
f(2) = V2 [F]
f(3) = V3 [F]
f(4) = T [FL]
f(5) = M2 [FL]
f(6) = M3 [FL]
RD
This is a array of relative distances along the link objects where the target force
values apply. The relative distances specified for a given degree of freedom are
applicable only if the corresponding DOF item for that degree of freedom is
True. The relative distance must be between 0 and 1, 0 <= RD <=1.
RD(1) = relative location for P target force
RD(2) = relative location for V2 target force
RD(3) = relative location for V3 target force
RD(4) = relative location for T target force
RD(5) = relative location for M2 target force
RD(6) = relative location for M3 target force
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns target forces to frame objects.
The function returns zero if the target forces are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignLinkTargetForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean
Dim f() As double
Dim RD() As double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link target force


ReDim DOF(5)
ReDim f(5)
ReDim RD(5)
DOF(0) = True
f(0) = 50
RD(0) = 1
ret = SapModel.LinkObj.SetLoadTargetForce(Name, "DEAD", DOF,
f, RD)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTargetForce
DeleteLoadTargetForce
SetLocalAxes
Syntax
SapObject.SapModel.LinkObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal Ang As Double, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation or, if the Advanced item is True, from the
orientation determined by the plane reference vector. The rotation for a positive
angle appears counter clockwise when the local +1 axis is pointing toward you.
[deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns a local axis angle to link objects.
The function returns zero if the local axis angle is successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignLinkLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'assign link local axis angle


ret = SapModel.LinkObj.SetLocalAxes(Name, 30)

'refresh view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetLocalAxesAdvanced
Syntax
SapObject.SapModel.LinkObj.SetLocalAxesAdvanced
VB6 Procedure
Function SetLocalAxesAdvanced(ByVal Name As String, ByVal Active As
Boolean, ByVal AxVectOpt As Long, ByVal AxCSys As String, ByRef AxDir() As
Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByVal Plane2 As
Long, ByVal PlVectOpt As Long, ByVal PlCSys As String, ByRef PlDir() As Long,
ByRef PlPt() As String, ByRef PlVect() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group depending on the value of the
ItemType item.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2, or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12 or 13, indicating that the local plane determined by the plane
reference vector is the 1-2 or 1-3 plane. This item applies only when the Active
item is True.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected link objects and the
Name item is ignored.
Remarks
This function assigns advanced local axes to link objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise, it returns a nonzero value.
VBA Example
Sub AssignLinkAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName As String
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "1", MyName)

'assign link advanced local axes


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.LinkObj.SetLocalAxesAdvanced(MyName, True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetLocalAxesAdvanced
GetLocalAxes
SetProperty
Syntax
SapObject.SapModel.LinkObj.SetProperty
VB6 Procedure
Function SetProperty(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
PropName
This is the name of a link property to be assigned to the specified link object(s).
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns a link property to link objects.
The function returns zero if the property is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'set link property


ret = SapModel.LinkObj.SetProperty(Name, "Link1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
GetPropertyFD
SetPropertyFD
SetPropertyFD
Syntax
SapObject.SapModel.LinkObj.SetPropertyFD
VB6 Procedure
Function SetPropertyFD(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
PropName
This is either None or the name of a frequency dependent link property to be
assigned to the specified link object(s). None means that no frequency
dependent link property is assigned to the link object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the link object specified by the
Name item.
If this item is Group, the assignment is made to all link objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected link objects,
and the Name item is ignored.
Remarks
This function assigns a frequency dependent link property to link objects.
The function returns zero if the property is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkObjectFDProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-012.sdb")

'set link frequency dependent property


ret = SapModel.LinkObj.SetPropertyFD("1", "None")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetProperty
GetPropertyFD
SetSelected
Syntax
Sap2000.LinkObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing link object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified link object is selected; otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the link object specified by the
Name item.
If this item is Group, the selected status is set for all link objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected link
objects, and the Name item is ignored.
Remarks
This function sets the selected status for link objects.
The function returns zero if the selected status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetLinkObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add link object by points


ret = SapModel.LinkObj.AddByPoint("1", "5", Name)

'set link object selected


ret = SapModel.LinkObj.SetSelected("ALL", True, Group)

'update view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
AddCartesian
Syntax
SapObject.SapModel.PointObj.AddCartesian
VB6 Procedure
Function AddCartesian(ByVal x As Double, ByVal y As Double, ByVal z As
Double, ByRef Name As String, Optional ByVal userName As String = "",
Optional ByVal csys As String = "Global", Optional ByVal MergeOff As Boolean =
False, Optional ByVal MergeNumber As Long = 0) As Long
Parameters
x
The X-coordinate of the added point object in the specified coordinate system.
[L]
y
The Y-coordinate of the added point object in the specified coordinate system.
[L]
z
The Z-coordinate of the added point object in the specified coordinate system.
[L]
Name
This is the name that the program ultimately assigns for the point object. If no
UserName is specified, the program assigns a default name to the point object.
If a UserName is specified and that name is not used for another point, the
UserName is assigned to the point; otherwise a default name is assigned to the
point.
If a point is merged with another point, this will be the name of the point object
with which it was merged.
UserName
This is an optional user specified name for the point object. If a UserName is
specified and that name is already used for another point object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the joint coordinates are defined.
MergeOff
If this item is False, a new point object that is added at the same location as an
existing point object will be merged with the existing point object (assuming the
two point objects have the same MergeNumber) and thus only one point object
will exist at the location.
If this item is True, the points will not merge and two point objects will exist at the
same location.
MergeNumber
Two points objects in the same location will merge only if their merge number
assignments are the same. By default all pointobjects have a merge number of
zero.
Remarks
This function adds a point object to a model. The added point object will be
tagged as a Special Point except if it was merged with another point object.
Special points are allowed to exist in the model with no objects connected to
them.
The function returns zero if the point object is successfully added or merged,
otherwise it returns a nonzero value.
VBA Example
Sub AddPointCartesian()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim x As Double, y As Double, z As Double
Dim Name as String
Dim MyName as String
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model blank from template


ret = SapModel.File.NewBlank

'add point object to model


x = 12
y = 37
z = 0
MyName = "A1"
ret = SapModel.PointObj.AddCartesian(x, y, z, Name, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddCylindrical
AddSpherical
GetCoordCartesian
GetSpecialPoint
SetSpecialPoint
AddCylindrical
Syntax
SapObject.SapModel.PointObj.AddCylindrical
VB6 Procedure
Function AddCylindrical(ByVal r As Double, ByVal Theta As Double, ByVal z As
Double, ByRef Name As String, Optional ByVal userName As String = "",
Optional ByVal csys As String = "Global", Optional ByVal MergeOff As Boolean =
False, Optional ByVal MergeNumber As Long = 0) As Long
Parameters
r
The radius for the added point object in the specified coordinate system. [L]
Theta
The angle for the added point object in the specified coordinate system. The
angle is measured in the XY plane from the positive global X axis. When looking
in the XY plane with the positive Z axis pointing toward you, a positive Theta
angle is counter clockwise. [deg]
z
The Z-coordinate of the added point object in the specified coordinate system.
[L]
Name
This is the name that the program ultimately assigns for the point object. If no
UserName is specified, the program assigns a default name to the point object.
If a UserName is specified and that name is not used for another point, the
UserName is assigned to the point; otherwise a default name is assigned to the
point.
If a point is merged with another point, this will be the name of the point object
with which it was merged.
UserName
This is an optional user specified name for the point object. If a UserName is
specified and that name is already used for another point object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the joint coordinates are defined.
MergeOff
If this item is False, a new point object that is added at the same location as an
existing point object will be merged with the existing point object (assuming the
two point objects have the same MergeNumber) and thus only one point object
will exist at the location.
If this item is True, the points will not merge and two point objects will exist at the
same location.
MergeNumber
Two points objects in the same location will merge only if their merge number
assignments are the same. By default all pointobjects have a merge number of
zero.
Remarks
This function adds a point object to a model. The added point object will be
tagged as a Special Point except if it was merged with another point object.
Special points are allowed to exist in the model with no objects connected to
them
The function returns zero if the point object is successfully added or merged,
otherwise it returns a nonzero value.
VBA Example
Sub AddPointCylindrical()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, Theta As Double, z As Double
Dim Name as String
Dim MyName as String
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model blank from template


ret = SapModel.File.NewBlank

'add point object to model


r = 12
Theta = 37
z = 0
MyName = "A1"
ret = SapModel.PointObj.AddCartesian(r, Theta, z, Name,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddCartesian
AddSpherical
GetCoordCylindrical
GetSpecialPoint
SetSpecialPoint
AddSpherical
Syntax
SapObject.SapModel.PointObj.AddSpherical
VB6 Procedure
Function AddSpherical(ByVal r As Double, ByVal a As Double, ByVal b As
Double, ByRef Name As String, Optional ByVal userName As String = "",
Optional ByVal csys As String = "Global", Optional ByVal MergeOff As Boolean =
False, Optional ByVal MergeNumber As Long = 0) As Long
Parameters
r
The radius for the added point object in the specified coordinate system. [L]
a
The plan angle for the added point object in the specified coordinate system.
This angle is measured in the XY plane from the positive global X axis. When
looking in the XY plane with the positive Z axis pointing toward you, a positive a
angle is counterclockwise. [deg]
b
The elevation angle for the added point object in the specified coordinate
system. This angle is measured in an X'Z plane that is perpendicular to the XY
plane with the positive X' axis oriented at angle a from the positive global X axis.
Angle b is measured from the positive global Z axis. When looking in the XZ
plane with the positive Y' axis pointing toward you, a positive b angle is counter
clockwise. [deg]
Name
This is the name that the program ultimately assigns for the point object. If no
UserName is specified, the program assigns a default name to the point object.
If a UserName is specified and that name is not used for another point, the
UserName is assigned to the point; otherwise a default name is assigned to the
point.
If a point is merged with another point, this will be the name of the point object
with which it was merged.
UserName
This is an optional user specified name for the point object. If a UserName is
specified and that name is already used for another point object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the joint coordinates are defined.
MergeOff
If this item is False, a new point object that is added at the same location as an
existing point object will be merged with the existing point object (assuming the
two point objects have the same MergeNumber) and thus only one point object
will exist at the location.
If this item is True, the points will not merge and two point objects will exist at the
same location.
MergeNumber
Two points objects in the same location will merge only if their merge number
assignments are the same. By default all pointobjects have a merge number of
zero.
Remarks
This function adds a point object to a model. The added point object will be
tagged as a Special Point except if it was merged with another point object.
Special points are allowed to exist in the model with no objects connected to
them
The function returns zero if the point object is successfully added or merged,
otherwise it returns a nonzero value.
VBA Example
Sub AddPointSpherical()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, a As Double, b As Double
Dim Name as String
Dim MyName as String
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model blank from template


ret = SapModel.File.NewBlank

'add point object to model


r = 12
a = 37
b = 23
MyName = "A1"
ret = SapModel.PointObj.AddSpherical(r, a, b, Name, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddCartesian
AddCylindrical
GetCoordSpherical
GetSpecialPoint
SetSpecialPoint
ChangeName
Syntax
SapObject.SapModel.PointObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a point object.
NewName
The new name for the point object.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangePointName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'change name of point object


ret = SapModel.PointObj.ChangeName("1", "A1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.PointObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns the total number of point objects in the model.
VBA Example
Sub CountPointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'return number of point objects


Count = SapModel.PointObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
CountConstraint
Syntax
SapObject.SapModel.PointObj.CountConstraint
VB6 Procedure
Function CountConstraint(ByRef Count As Long, Optional ByVal Name As String
= "") As Long
Parameters
Count
The number of counted constraints.
Name
This optional item is the name of an existing point object.
Remarks
If the Name item is provided, the Count item returns the total number of
constraint assignments made to the specified point object. If the Name item is
not specified, or is specified as an empty string, the Count item returns the total
number of constraint assignments to all point objects in the model. If the Name
item is specified but it is not recognized by the program as a valid point object,
an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountConstraintAssignments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add constraint definition


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'make constraint assignment


ret = SapModel.PointObj.SetConstraint("3", "Diaph1")

'get number of constraint assignments


ret = SapModel.PointObj.CountConstraint(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetConstraint
SetConstraint
DeleteConstraint
CountLoadDispl
Syntax
SapObject.SapModel.PointObj.CountLoadDispl
VB6 Procedure
Function CountLoadDispl(ByRef Count As Long, Optional ByVal Name As String
= "", Optional ByVal LoadPat As String = "") As Long
Parameters
Count
The number of counted ground displacement loads.
Name
This optional item is the name of an existing point object.
LoadPat
This optional item is the name of an existing load pattern.
Remarks
If neither the Name item nor the LoadPat item is provided, the Count item
returns the total number of ground displacement load assignments in the model.
If the Name item is provided but not the LoadPat item, the Count item returns the
total number of ground displacement load assignments made for the specified
point object.
If the Name item is not provided but the LoadPat item is specified, the Count
item returns the total number of ground displacement load assignments made to
all point objects for the specified load pattern.
If both the Name item and the LoadPat item are provided, the Count item returns
the total number of ground displacement load assignments made to the specified
point object for the specified load pattern.
If the Name item or the LoadPat item is provided but is not recognized by the
program as valid, an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountGroundDisplacementLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'get number of ground displacement loads


ret = SapModel.PointObj.CountLoadDispl(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDispl
SetLoadDispl
DeleteLoadDispl
CountLoadForce
Syntax
SapObject.SapModel.PointObj.CountLoadForce
VB6 Procedure
Function CountLoadForce(ByRef Count As Long, Optional ByVal Name As
String = "", Optional ByVal LoadPat As String = "") As Long
Parameters
Count
The number of counted point loads.
Name
This optional item is the name of an existing point object.
LoadPat
This optional item is the name of an existing load pattern.
Remarks
If neither the Name item nor the LoadPat item is provided, the Count item
returns the total number of point load assignments in the model.
If the Name item is provided but not the LoadPat item, the Count item returns the
total number of point load assignments made for the specified point object.
If the Name item is not provided but the LoadPat item is specified, the Count
item returns the total number of point load assignments made to all point objects
for the specified load pattern.
If both the Name item and the LoadPat item are provided,n the Count item
returns the total number of point load assignments made to the specified point
object for the specified load pattern.
If the Name item or the LoadPat item is provided but is not recognized by the
program as valid, an error is returned.
This function returns zero if the count is successfully completed, otherwise it
returns a nonzero value.
VBA Example
Sub CountPointLoads()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add point load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("3", "DEAD", Value)

'get number of point loads


ret = SapModel.PointObj.CountLoadForce(Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForce
SetLoadForce
DeleteLoadForce
CountPanelZone
Syntax
SapObject.SapModel.PointObj.CountPanelZone
VB6 Procedure
Function CountPanelZone() As Long
Parameters
None
Remarks
This function returns the total number of panel zone assignments to point objects
in the model.
VBA Example
Sub CountPanelZones()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long
Dim PropType as Long
Dim Thickness As Double
Dim Connectivity As Long
Dim LocalAxisFrom As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add panel zone assignment


PropType = 1 'elastic from column and doubler plate
Thickness = 2
Connectivity = 0 'beams to other objects
LocalAxisFrom = 0 'column
ret = SapModel.PointObj.SetPanelZone("3", PropType,
Thickness, 0, 0, "", Connectivity, LocalAxisFrom, 0)

'get number of panel zone assignments


Count = SapModel.PointObj.CountPanelZone

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPanelZone
SetPanelZone
DeletePanelZone
CountRestraint
Syntax
SapObject.SapModel.PointObj.CountRestraint
VB6 Procedure
Function CountRestraint() As Long
Parameters
None
Remarks
This function returns the total number of point objects in the model with restraint
assignments.
VBA Example
Sub CountRestrainedPointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Count as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get number of restrained point objects


Count = SapModel.PointObj.CountRestraint

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRestraint
SetRestraint
DeleteRestraint
CountSpring
Syntax
SapObject.SapModel.PointObj.CountSpring
VB6 Procedure
Function CountSpring() As Long
Parameters
None
Remarks
This function returns the total number of point objects in the model with spring
assignments.
VBA Example
Sub CountSpringSupportedPointObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim i As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint spring assignment


redim k(5)
For i = 0 to 5
k(i) = i + 1
Next i
ret = SapModel.PointObj.SetSpring("3", k)

'get number of point objects with spring assignments


Count = SapModel.PointObj.CountSpring

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
SetSpring
DeleteSpring
DeleteConstraint
Syntax
SapObject.SapModel.PointObj.DeleteConstraint
VB6 Procedure
Function DeleteConstraint(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object and the constraint
assignments to that point object are removed.
If Group is selected, the Name item refers to a group and the constraint
assignments to all point objects in the group are removed.
If SelectedObjects is selected, the Name item is ignored and the constraint
assignments to all selected point objects are removed.
Remarks
This function deletes all constraint assignments from the specified point
object(s).
The function returns zero if the constraint assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointConstraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add constraint definition


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'make constraint assignment


ret = SapModel.PointObj.SetConstraint("3", "Diaph1")

'delete constraint assignment


ret = SapModel.PointObj.DeleteConstraint("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetConstraint
SetConstraint
DeleteLoadDispl
Syntax
SapObject.SapModel.PointObj.DeleteLoadDispl
VB6 Procedure
Function DeleteLoadDispl(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The ground
displacement load assignments, for the specified load case, made to that point
object, are removed.
If Group is selected, the Name item refers to a group. The ground displacement
load assignments, for the specified load pattern, made to all point objects in the
group, are removed.
If SelectedObjects is selected, the Name item is ignored. The ground
displacement load assignments, for the specified load pattern, made to all
selected point objects, are removed.
Remarks
This function deletes all ground displacement load assignments, for the specified
load pattern, from the specified point object(s).
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointDisplLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'delete ground displacement load


ret = SapModel.PointObj.DeleteLoadDispl("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDispl
SetLoadDispl
DeleteLoadForce
Syntax
SapObject.SapModel.PointObj.DeleteLoadForce
VB6 Procedure
Function DeleteLoadForce(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The point load
assignments, for the specified load pattern, made to that point object, are
removed.
If Group is selected, the Name item refers to a group. The point load
assignments, for the specified load pattern, made to all point objects in the
group, are removed.
If SelectedObjects is selected, the Name item is ignored. The point load
assignments, for the specified load pattern, made to all selected point objects,
are removed.
Remarks
This function deletes all point load assignments, for the specified load pattern,
from the specified point object(s).
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add point load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("1", "DEAD", Value)

'delete point load


ret = SapModel.PointObj.DeleteLoadForce("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForce
SetLoadForce
DeleteLoadForceWithGUID {Point Object}
Syntax
SapObject.SapModel.PointObj.DeleteLoadForceWithGUID
VB6 Procedure
Function DeleteLoadForceWithGUID(ByVal Name As String, ByVal GUID As
String) As Long
Parameters
Name
The name of an existing point object.
GUID
The global unique ID of one of the point loads on that point object.
Remarks
This function deletes the point load assignment with the specified global unique
ID for the specified point object.
The function returns zero if the load assignment is successfully deleted,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadForceWithGUID
SetLoadForceWithGUID
DeleteMass
Syntax
SapObject.SapModel.PointObj.DeleteMass
VB6 Procedure
Function DeleteMass(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The mass
assignments for that point object are removed.
If Group is selected, the Name item refers to a group. The mass assignments
for all point objects in the group are removed.
If SelectedObjects is selected, the Name item is ignored. The mass
assignments for all selected point objects are removed.
Remarks
This function deletes all mass assignments from the specified point object(s).
The function returns zero if the mass assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add point mass


Redim Value(5)
Value(0) = 1
ret = SapModel.PointObj.SetMass("3", Value)

'delete point mass


ret = SapModel.PointObj.DeleteMass("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
SetMass
SetMassByVolume
SetMassByWeight
DeletePanelZone
Syntax
SapObject.SapModel.PointObj.DeletePanelZone
VB6 Procedure
Function DeletePanelZone(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The panel zone
assignments for that point object are removed.
If Group is selected, the Name item refers to a group. The panel zone
assignments for all point objects in the group are removed.
If SelectedObjects is selected, the Name item is ignored. The panel zone
assignments for all selected point objects are removed.
Remarks
This function deletes all panel zone assignments from the specified point
object(s).
The function returns zero if the panel zone assignments are successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeletePanelZone()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim PropType as Long
Dim Thickness As Double
Dim Connectivity As Long
Dim LocalAxisFrom As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add panel zone assignment


PropType = 1 'elastic from column and doubler plate
Thickness = 2
Connectivity = 0 'beams to other objects
LocalAxisFrom = 0 'column
ret = SapModel.PointObj.SetPanelZone("3", PropType,
Thickness, 0, 0, "", Connectivity, LocalAxisFrom, 0)

'delete panel zone


ret = SapModel.PointObj.DeletePanelZone("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPanelZone
SetPanelZone
DeletePatternValue
Syntax
SapObject.SapModel.PointObj.DeletePatternValue
VB6 Procedure
Function DeletePatternValue(ByVal Name As String, ByVal PatternName As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
PatternName
The name of a defined joint pattern.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The joint pattern
assignments, associated with the specified joint pattern, for that point object are
removed.
If Group is selected, the Name item refers to a group. The joint pattern
assignments, associated with the specified joint pattern, for all point objects in
the group, are removed.
If SelectedObjects is selected, the Name item is ignored. The joint pattern
assignments, associated with the specified joint pattern, for all selected point
objects, are removed.
Remarks
This function deletes all joint pattern assignments, associated with the specified
joint pattern, from the specified point object(s).
The function returns zero if the joint pattern assignments are successfully
deleted, otherwise it returns a nonzero value.
VBA Example
Sub DeletePointPatternAssigns()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern assignment


ret = SapModel.PointObj.SetPatternByXYZ("3", "Default", 0,
0, 10, 0)

'delete joint pattern assignment


ret = SapModel.PointObj.DeletePatternValue("3", "Default")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPatternValue
SetPatternByPressure
SetPatternByXYZ
DeleteRestraint
Syntax
SapObject.SapModel.PointObj.DeleteRestraint
VB6 Procedure
Function DeleteRestraint(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The restraint
assignments for that point object are removed.
If Group is selected, the Name item refers to a group. The restraint assignments
for all point objects in the group are removed.
If SelectedObjects is selected, the Name item is ignored. The restraint
assignments for all selected point objects are removed.
Remarks
This function deletes all restraint assignments from the specified point object(s).
The function returns zero if the restraint assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointRestraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'delete joint restraint assignment


ret = SapModel.PointObj.DeleteRestraint("1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRestraint
SetRestraint
DeleteSpecialPoint
Syntax
SapObject.SapModel.PointObj.DeleteSpecialPoint
VB6 Procedure
Function DeleteSpecialPoint(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the deletion applies to the point object specified by the
Name item.
If this item is Group, the deletion applies to all point objects in the group specified
by the Name item.
If this item is SelectedObjects, the deletion applies to all selected point objects,
and the Name item is ignored.
Remarks
The function deletes special point objects that have no other objects connected
to them.
The function returns zero if the function completes successfully, otherwise it
returns a nonzero value.
Point objects can be deleted only if they have no other objects (e.g., frame,
cable, tendon, area, solid link) connected to them. If a point object is not
specified to be a Special Point, the program automatically deletes that point
object when it has no other objects connected to it. If a point object is specified
to be a Special Point, to delete it, first delete all other objects connected to the
point and then call this function to delete the point.
VBA Example
Sub DeleteSpecialPointObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set as special point


ret = SapModel.PointObj.SetSpecialPoint("3", True)

'delete frame objects


ret = SapModel.FrameObj.Delete("2")
ret = SapModel.FrameObj.Delete("8")

'delete special point object


ret = SapModel.PointObj.DeleteSpecialPoint("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetSpecialPoint
GetSpecialPoint
DeleteSpring
Syntax
SapObject.SapModel.PointObj.DeleteSpring
VB6 Procedure
Function DeleteSpring(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
ItemType
This is one of the following items from the eItemType enumeration.
Object = 0
Group = 1
SelectedObjects = 2

If Object is selected, the Name item refers to a point object. The point spring
assignments for that point object are removed.
If Group is selected, the Name item refers to a group. The point spring
assignments for all point objects in the group are removed.
If SelectedObjects is selected, the Name item is ignored. The point spring
assignments for all selected point objects are removed.
Remarks
This function deletes all point spring assignments from the specified point
object(s).
The function returns zero if the restraint assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeletePointSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim i as Long
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint spring assignment


redim k(5)
For i = 0 to 5
k(i) = i + 1
Next i
ret = SapModel.PointObj.SetSpring("3", k)

'delete joint spring assignment


ret = SapModel.PointObj.DeleteSpring("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
SetSpring
SetSpringCoupled
GetCommonTo
Syntax
SapObject.SapModel.PointObj.GetCommonTo
VB6 Procedure
Function GetCommonTo(ByVal Name As String, ByRef CommonTo As Long) As
Long
Parameters
Name
The name of a point object or a group depending on the value selected for
ItemType item.
CommonTo
The total number of objects (line, area, solid and link) that connect to the
specified point object.
Remarks
This function returns the total number of objects (line, area, solid and link) that
connect to the specified point object.
The function returns zero if the CommonTo is successfully calculated, otherwise
it returns a nonzero value.
VBA Example
Sub GetPointCommonTo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CommonTo as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get CommonTo
ret = SapModel.PointObj.GetCommonTo("6", CommonTo)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetConnectivity
Syntax
SapObject.SapModel.PointObj.GetConnectivity
VB6 Procedure
Function GetConnectivity(ByVal Name As String, ByRef NumberItems As Long,
ByRef ObjectType() As Long, ByRef ObjectName() As String, ByRef
PointNumber() As Long) As Long
Parameters
Name
The name of an existing point object.
NumberItems
This is the total number of objects connected to the specified point object.
ObjectType
This is an array that includes the object type of each object connected to the
specified point object.
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6= Solid object
7 = Link object
ObjectName
This is an array that includes the object name of each object connected to the
specified point object.
PointNumber
This is an array that includes the point number within the considered object that
corresponds to the specified point object.
Remarks
This function returns a list of objects connected to a specified point object.
The function returns zero if the list is successfully filled; otherwise it returns
nonzero.
VBA Example
Sub GetPointObjectConnectivity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems as Long
Dim ObjectType() As Long
Dim ObjectName() As String
Dim PointNumber() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get objects connected to point object 11


ret = SapModel.PointObj.GetConnectivity("11", NumberItems,
ObjectType, ObjectName, PointNumber)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetConstraint
Syntax
SapObject.SapModel.PointObj.GetConstraint
VB6 Procedure
Function GetConstraint(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef ConstraintName() As String, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
NumberItems
This is the total number of constraint assignments returned.
PointName
This is an array that includes the name of the point object to which the specified
constraint assignment applies.
ConstraintName
This is an array that includes the name of the constraint that is assigned to the
point object specified by the PointName item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the constraint assignments are retrieved for the point object
specified by the Name item.
If this item is Group, the constraint assignments are retrieved for all point objects
in the group specified by the Name item.
If this item is SelectedObjects, the constraint assignments are retrieved for all
selected point objects and the Name item is ignored.
Remarks
This function returns a list of constraint assignments made to one or more
specified point objects.
The function returns zero if the constraint name list is successfully filled,
otherwise it returns nonzero.
The PointName and ConstraintName items are returned in one-dimensional
arrays. Each array is created as a dynamic array by the API user. In VBA a
dynamic string array is defined by:
Dim PointName() as String
The arrays are dimensioned to (NumberItems 1) inside the Sap2000 program,
filled with values, and returned to the API user.
The arrays are zero-based. Thus the first item is at array index 0, and the last
item is at array index (NumberItems - 1).
VBA Example
Sub GetConstraintAssignments()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
dim NumberItems as Long
Dim PointName() As String
Dim ConstraintName() As String
Dim i As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define a new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'define new constraint assignments


For i = 4 To 16 Step 4
ret = SapModel.PointObj.SetConstraint(Format(i),
"Diaph1")
Next i

'get constraint assignments


ret = SapModel.PointObj.GetConstraint("ALL", NumberItems,
PointName, ConstraintName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetConstraint
DeleteConstraint
GetCoordCartesian
Syntax
SapObject.SapModel.PointObj.GetCoordCartesian
VB6 Procedure
Function GetCoordCartesian(ByVal Name As String, ByRef x As Double, ByRef y As
Double, ByRef z As Double, Optional ByVal Csys As String = "Global") As Long
Parameters
Name
The name of a defined point object.
x
The X-coordinate of the specified point object in the specified coordinate system. [L]
y
The Y-coordinate of the specified point object in the specified coordinate system. [L]
z
The Z-coordinate of the specified point object in the specified coordinate system. [L]
Csys
The name of a defined coordinate system. If Csys is not specified, the Global
coordinate system is assumed.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise it
returns nonzero. If successful, the function returns the x, y and z coordinates of the
specified point object in the Present Units. The coordinates are reported in the
coordinate system specified by Csys.
VBA Example
Sub GetPointCoordCartesian
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim x As Double, y As Double, z As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get point coordinates of the point named "1" and display in a


message box
ret = SapModel.PointObj.GetCoordCartesian("1", x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCylindrical
GetCoordSpherical
GetNameList
GetCoordCylindrical
Syntax
SapObject.SapModel.PointObj.GetCoordCylindrical
VB6 Procedure
Function GetCoordCylindrical(ByVal Aame As String, ByRef r As Double, ByRef
Theta As Double, ByRef z As Double, Optional ByVal Csys As String = "Global") As
Long
Parameters
Name
The name of a defined point object.
r
The radius for the specified point object in the specified coordinate system. [L]
Theta
The angle for the specified point object in the specified coordinate system. The angle
is measured in the XY plane from the positive X axis. When looking in the XY plane
with the positive Z axis pointing toward you, a positive Theta angle is counter
clockwise [deg]
z
The Z-coordinate of the specified point object in the specified coordinate system. [L]
Csys
The name of a defined coordinate system. If Csys is not specified, the Global
coordinate system is assumed.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise it
returns nonzero. If successful, the function returns the r, theta and z coordinates of
the specified point object in the Present Units. The coordinates are reported in the
coordinate system specified by CSys.
VBA Example
Sub GetPointCoordCylindrical
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, Theta As Double, z As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'start a new template model


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get point coordinates of the point named "1" and display in a


message box
ret = SapModel.PointObj.GetCoordCylindrical("1", r, Theta,
z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
GetCoordSpherical
GetNameList
GetCoordSpherical
Syntax
SapObject.SapModel.PointObj.GetCoordSpherical
VB6 Procedure
Function GetCoordSpherical(ByVal Name As String, ByRef r As Double, ByRef
a As Double, ByRef b As Double, Optional ByVal CSys As String = "Global") As
Long
Parameters
Name
The name of an existing point object.
r
The radius for the point object in the specified coordinate system. [L]
a
The plan angle for the point object in the specified coordinate system. This angle
is measured in the XY plane from the positive global X axis. When looking in the
XY plane with the positive Z axis pointing toward you, a positive a angle is
counter clockwise. [deg]
b
The elevation angle for the point object in the specified coordinate system. This
angle is measured in an X'Z plane that is perpendicular to the XY plane with the
positive X' axis oriented at angle a from the positive global X axis. Angle b is
measured from the positive global Z axis. When looking in the XZ plane with the
positive Y' axis pointing toward you, a positive b angle is counter clockwise. [deg]
CSys
The name of the coordinate system in which the joint coordinates are returned.
Remarks
The function returns zero if the coordinates are successfully returned; otherwise
it returns nonzero. If successful, the function returns the r, a and b coordinates
of the specified point object in the Present Units. The coordinates are reported
in the coordinate system specified by CSys.
VBA Example
Sub GetPointCoordSpherical()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim r As Double, a As Double, b As Double
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get spherical point coordinates


ret = SapModel.PointObj.GetCoordSpherical("5", r, a, b)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
GetCoordCylindrical
GetNameList
GetElm
Syntax
SapObject.SapModel.PointObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef Elm as String) As Long
Parameters
Name
The name of an existing point object.
Elm
The name of the point element associated with the specified point object.
Remarks
This function retrieves the name of the point element (analysis model point)
associated with a specified point object in the object-based model.
This function returns zero if the point element name is successfully returned;
otherwise it returns nonzero. An error occurs if the analysis model does not
currently exist.
VBA Example
Sub GetPointElementName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Elm As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get point element name


ret = SapModel.PointObj.GetElm("5", Elm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.PointObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing point object.
GUID
The GUID (Global Unique ID) for the specified point object.
Remarks
This function retrieves the GUID for specified point object.
This function returns zero if the point object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetPointGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set program created GUID


ret = SapModel.PointObj.SetGUID("1")

'get GUID
ret = SapModel.PointObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
GetLoadDispl
Syntax
SapObject.SapModel.PointObj.GetLoadDispl
VB6 Procedure
Function GetLoadDispl(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef LoadPat() As String, ByRef LCStep() As
Long, ByRef CSys() As String, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
NumberItems
This is the total number of joint ground displacement assignments returned.
PointName
This is an array that includes the name of the point object to which the specified
ground displacement assignment applies.
LoadPat
This is an array that includes the name of the load pattern for the ground
displacement load.
LCStep
This is an array that includes the load pattern step for the ground displacement
load. In most cases, this item does not apply and will be returned as 0.
CSys
This is an array that includes the name of the coordinate system for the ground
displacement load. This is Local or the name of a defined coordinate system.
U1
This is an array that includes the assigned translational ground displacement in
the local 1-axis or coordinate system X-axis direction, depending on the
specified CSys. [L]
U2
This is an array that includes the assigned translational ground displacement in
the local 2-axis or coordinate system Y-axis direction, depending on the
specified CSys. [L]
U3
This is an array that includes the assigned translational ground displacement in
the local 3-axis or coordinate system Z-axis direction, depending on the
specified CSys. [L]
R1
This is an array that includes the assigned rotational ground displacement about
the local 1-axis or coordinate system X-axis, depending on the specified CSys.
[rad]
R2
This is an array that includes the assigned rotational ground displacement about
the local 2-axis or coordinate system Y-axis, depending on the specified CSys.
[rad]
R3
This is an array that includes the assigned rotational ground displacement about
the local 3-axis or coordinate system Z-axis, depending on the specified CSys.
[rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are retrieved for the point object
specified by the Name item.
If this item is Group, the assignments are retrieved for all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are retrieved for all
selected point objects, and the Name item is ignored.
Remarks
This function retrieves the ground displacement load assignments to point
objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointDisplLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PointName() As String
Dim LoadPat() As String
Dim LCStep() As Long
Dim CSys() As String
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'get ground displacement load


ret = SapModel.PointObj.GetLoadDispl("ALL", NumberItems,
PointName, LoadPat, LCStep, CSys, U1, U2, U3, R1, R2, R3, Group)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDispl
DeleteLoadDispl
GetLoadForce
Syntax
SapObject.SapModel.PointObj.GetLoadForce
VB6 Procedure
Function GetLoadForce(ByVal Name As String, ByRef NumberItems As Long,
ByRef PointName() As String, ByRef LoadPat() As String, ByRef LCStep() As
Long, ByRef CSys() As String, ByRef F1() As Double, ByRef F2() As Double,
ByRef F3() As Double, ByRef M1() As Double, ByRef M2() As Double, ByRef
M3() As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
NumberItems
This is the total number of joint force load assignments returned.
PointName
This is an array that includes the name of the point object to which the specified
load assignment applies.
LoadPat
This is an array that includes the name of the load pattern for the load.
LCStep
This is an array that includes the load pattern step for the load. In most cases,
this item does not apply and will be returned as 0.
CSys
This is an array that includes the name of the coordinate system for the load.
This is Local or the name of a defined coordinate system.
F1
This is an array that includes the assigned translational force in the local 1-axis
or coordinate system X-axis direction, depending on the specified CSys. [F]
F2
This is an array that includes the assigned translational force in the local 2-axis
or coordinate system Y-axis direction, depending on the specified CSys. [F]
F3
This is an array that includes the assigned translational force in the local 3-axis
or coordinate system Z-axis direction, depending on the specified CSys. [F]
M1
This is an array that includes the assigned moment about the local 1-axis or
coordinate system X-axis, depending on the specified CSys. [FL]
M2
This is an array that includes the assigned moment about the local 2-axis or
coordinate system Y-axis, depending on the specified CSys. [FL]
M3
This is an array that includes the assigned moment about the local 3-axis or
coordinate system Z-axis, depending on the specified CSys. [FL]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are retrieved for the point object
specified by the Name item.
If this item is Group, the assignments are retrieved for all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are retrieved for all
selected point objects, and the Name item is ignored.
Remarks
This function retrieves the joint force load assignments to point objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim PointName() As String
Dim LoadPat() As String
Dim LCStep() As Long
Dim CSys() As String
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint force load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("1", "DEAD", Value)

'get joint force load


ret = SapModel.PointObj.GetLoadForce("ALL", NumberItems,
PointName, LoadPat, LCStep, CSys, F1, F2, F3, M1, M2, M3, Group)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadForce
DeleteLoadForce
GetLoadForceWithGUID {Point Object}
Syntax
SapObject.SapModel.PointObj.GetLoadForceWithGUID
VB6 Procedure
Function GetLoadForceWithGUID(ByVal Name As String, ByRef NumberItems
As Integer, ByRef PointName() As String, ByRef LoadPat() As String, ByRef
LcStep() As Integer, ByRef CSys() As String, ByRef F1() As Double, ByRef F2()
As Double, ByRef F3() As Double, ByRef M1() As Double, ByRef M2() As
Double, ByRef M3() As Double, ByRef GUID() As String, Optional ByVal
ItemType As eItemType = eItemType.Objects) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
NumberItems
This is the total number of joint force load assignments returned.
PointName
This is an array that includes the name of the point object to which the specified
load assignment applies.
LoadPat
This is an array that includes the name of the load pattern for the load.
LCStep
This is an array that includes the load pattern step for the load. In most cases,
this item does not apply and will be returned as 0.
CSys
This is an array that includes the name of the coordinate system for the load.
This is Local or the name of a defined coordinate system.
F1
This is an array that includes the assigned translational force in the local 1-axis
or coordinate system X-axis direction, depending on the specified CSys. [F]
F2
This is an array that includes the assigned translational force in the local 2-axis
or coordinate system Y-axis direction, depending on the specified CSys. [F]
F3
This is an array that includes the assigned translational force in the local 3-axis
or coordinate system Z-axis direction, depending on the specified CSys. [F]
M1
This is an array that includes the assigned moment about the local 1-axis or
coordinate system X-axis, depending on the specified CSys. [FL]
M2
This is an array that includes the assigned moment about the local 2-axis or
coordinate system Y-axis, depending on the specified CSys. [FL]
M3
This is an array that includes the assigned moment about the local 3-axis or
coordinate system Z-axis, depending on the specified CSys. [FL]
GUID
This is an array that includes the global unique ID of the distributed load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are retrieved for the point object
specified by the Name item.
If this item is Group, the assignments are retrieved for all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are retrieved for all
selected point objects, and the Name item is ignored.
Remarks
This function retrieves the joint force load assignments to point objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
SetLoadForceWithGUID
DeleteLoadForceWithGUID
GetLocalAxes
Syntax
SapObject.SapModel.PointObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef a As Double, ByRef b As
Double, ByRef c As Double, ByRef Advanced As Boolean) As Long
Parameters
Name
The name of an existing point object.
a, b, c
The local axes of the point are defined by first setting the positive local 1, 2 and
3 axes the same as the positive global X, Y and Z axes and then doing the
following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
Advanced
This item is True if the point object local axes orientation was obtained using
advanced local axes parameters.
Remarks
This function retrieves the local axes angles for a point object.
The function returns zero if the local axes angles are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim a As Double, b As Double, c As Double
Dim Advanced As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get local axes assignments


ret = SapModel.PointObj.GetLocalAxes("1", a, b, c, Advanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetLocalAxesAdvanced
Syntax
SapObject.SapModel.PointObj.GetLocalAxesAdvanced
VB6 Procedure
Function GetLocalAxesAdvanced(ByVal Name As String, ByRef Active As
Boolean, ByRef AxVectOpt As Long, ByRef AxCSys As String, ByRef AxDir()
As Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByRef Plane2 As
Long, ByRef PlVectOpt As Long, ByRef PlCSys As String, ByRef PlDir() As
Long, ByRef PlPt() As String, ByRef PlVect() As Double) As Long
Parameters
Name
The name of an existing point object.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2, or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, or 3-2 plane. This item
applies only when the Active item is True.
Remarks
This function assigns advanced local axes to point objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub GetPointAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double
Dim a As Double, b As Double, c As Double
Dim Advanced As Boolean
Dim Active As Boolean
Dim AxVectOpt As Long
Dim AxCSys As String
Dim AxDir() As Long
Dim AxPt() As String
Dim AxVect() As Double
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim PlDir() As Long
Dim PlPt() As String
Dim PlVect() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point advanced local axes


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.PointObj.SetLocalAxesAdvanced("ALL", True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect, Group)

'get point local axes angles


ret = SapModel.PointObj.GetLocalAxes("1", a, b, c, Advanced)

'get point advanced local axes data


If Advanced Then
ret = SapModel.PointObj.GetLocalAxesAdvanced("3", Active,
AxVectOpt, AxCSys, AxDir, AxPt, AxVect, Plane2, PlVectOpt, PlCSys,
PlDir, PlPt, PlVect)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetLocalAxesAdvanced
SetLocalAxes
GetMass
Syntax
SapObject.SapModel.PointObj.GetMass
VB6 Procedure
Function GetMass(ByVal Name As String, ByRef m() As Double) As Long
Parameters
Name
The name of an existing point object.
m
This is an array of six mass assignment values.
Value(0) = U1 [M]
Value(1) = U2 [M]
Value(2) = U3 [M]
Value(3) = R1 [ML2]
Value(4) = R2 [ML2]
Value(5) = R3 [ML2]
Remarks
This function retrieves the point mass assignment values for a point object. The
masses are always returned in the point local coordinate system.
The function returns zero if the mass is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetPointMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i as long
Dim m() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point mass


Redim m(5)
For i = 0 to 5
m(i) = (i+1) / 10
Next i
ret = SapModel.PointObj.SetMass("3", m)

'get point mass


Redim m(5)
ret = SapModel.PointObj.GetMass("3", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMass
DeleteMass
SetMassByVolume
SetMassByWeight
GetMergeNumber
Syntax
SapObject.SapModel.PointObj.GetMergeNumber
VB6 Procedure
Function GetMergeNumber(ByVal Name As String, ByRef MergeNumber As
Long) As Long
Parameters
Name
The name of an existing point object.
MergeNumber
The merge number assigned to the specified point object.
Remarks
This function retrieves the merge number for a point object. By default the merge
number for a point is zero. Points with different merge numbers are not
automatically merged by the program.
The function returns zero if the merge number is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointMergeNumber()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim m As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set merge number


ret = SapModel.PointObj.SetMergeNumber("3", 2)

'get merge number


ret = SapModel.PointObj.GetMergeNumber("3", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMergeNumber
GetNameList
Syntax
SapObject.SapModel.PointObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of point object names retrieved by the program.
MyName
This is a one-dimensional array of point object names. The MyName array is
created as a dynamic, zero-based, array by the API user:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the API user.
Remarks
This function retrieves the names of all defined point objects.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetPointObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get point object names


ret = SapModel.PointObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetCoordCartesian
GetCoordCylindrical
GetPanelZone
Syntax
SapObject.SapModel.PointObj.GetPanelZone
VB6 Procedure
Function GetPanelZone(ByVal Name As String, ByRef PropType As Long,
ByRef Thickness As Double, ByRef K1 As Double, ByRef K2 As Double, ByRef
LinkProp As String, ByRef Connectivity As Long, ByRef LocalAxisFrom As
Long, ByRef LocalAxisAngle As Double) As Long
Parameters
Name
The name of an existing point object.
PropType
This is 0, 1, 2, or 3.
0= Properties are elastic from column
1= Properties are elastic from column and doubler plate
2= Properties are from specified spring stiffnesses
3= Properties are from a specified link property
Thickness
The thickness of the doubler plate. This item applies only when PropType = 1. [L]
K1
The spring stiffness for major axis bending (about the local 3 axis of the column
and panel zone). This item applies only when PropType = 2. [FL/rad]
K2
The spring stiffness for minor axis bending (about the local 2 axis of the column
and panel zone). This item applies only when PropType = 2. [FL/rad]
LinkProp
The name of the link property used to define the panel zone. This item applies
only when PropType = 3.
Connectivity
This is 0 or 1.
0 = Panel zone connects beams to other objects
1 = Panel zone connects braces to other objects
LocalAxisFrom
This is 0 or 1.
0 = Panel zone local axis angle is from column
1 = Panel zone local axis angle is user defined

The LocalAxisFrom item can be 1 only when the PropType item is 3.


LocalAxisAngle
This item applies only when PropType = 3 and LocalAxisFrom = 1. It is the angle
measured counter clockwise from the positive global X-axis to the local 2-axis of
the panel zone. [deg]
Remarks
This function retrieves the panel zone assignment data for a point object.
The function returns zero if the panel zone data is successfully retrieved,
otherwise it returns a nonzero value.
If no panel zone assignment is made to the point object, an error is returned.
VBA Example
Sub GetPanelZoneData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropType As Long
Dim Thickness As Double
Dim K1 As Double
Dim K2 As Double
Dim LinkProp As String
Dim Connectivity As Long
Dim LocalAxisFrom As Long
Dim LocalAxisAngle As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign panel zone


ret = SapModel.PointObj.SetPanelZone("3", 1, 2, 0, 0, "", 0,
0, 0)

'get panel zone data


ret = SapModel.PointObj.GetPanelZone("3", PropType,
Thickness, K1, K2, LinkProp, Connectivity, LocalAxisFrom,
LocalAxisAngle)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPanelZone
GetPatternValue
Syntax
SapObject.SapModel.PointObj.GetPatternValue
VB6 Procedure
Function GetPatternValue(ByVal Name As String, ByVal PatternName As String,
ByRef Value As Double) As Long
Parameters
Name
The name of an existing point object.
PatternName
The name of a defined joint pattern.
Value
The value that the specified point object has for the specified joint pattern.
Remarks
This function retrieves the joint pattern value for a specific point object and joint
pattern.
The function returns zero if the value is successfully retrieved, otherwise it
returns a nonzero value.
Joint pattern values are unitless.
VBA Example
Sub GetJointPatternData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern assignment


ret = SapModel.PointObj.SetPatternByXYZ("ALL", "Default", 0,
0, 10, 0, Group)

'get joint pattern assignment


ret = SapModel.PointObj.GetPatternValue("3", "Default",
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetPatternByPressure
SetPatternByXYZ
DeletePatternValue
GetRestraint
Syntax
SapObject.SapModel.PointObj.GetRestraint
VB6 Procedure
Function GetRestraint(ByVal Name As String, ByRef Value() As Boolean) As
Long
Parameters
Name
The name of an existing point object.
Value
This is an array of six restraint values.
Value(0) = U1
Value(1) = U2
Value(2) = U3
Value(3) = R1
Value(4) = R2
Value(5) = R3
Remarks
This function retrieves the restraint assignments for a point object. The restraint
assignments are always returned in the point local coordinate system.
The function returns zero if the restraint assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointRestraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get point object restraints


Redim Value(5)
ret = SapModel.PointObj.GetRestraint("5", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetRestraint
DeleteRestraint
GetSelected
Syntax
SapObject.SapModel.PointObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing point object.
Selected
This item returns True if the specified point object is selected, otherwise it
returns False.
Remarks
This function retrieves the selected status for a point object.
The function returns zero if the selected status is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetPointSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set point selected


ret = SapModel.PointObj.SetSelected("3", True)

'get point selected status


ret = SapModel.PointObj.GetSelected("3", Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetSpecialPoint
Syntax
SapObject.SapModel.PointObj.GetSpecialPoint
VB6 Procedure
Function GetSpecialPoint(ByVal Name As String, ByVal SpecialPoint As
Boolean) As Long
Parameters
Name
The name of an existing point object.
SpecialPoint
This item is True if the point object is specified as a special point, otherwise it is
False.
Remarks
This function retrieves the special point status for a point object.
The function returns zero if the special point status is successfully retrieved,
otherwise it returns a nonzero value.
Special points are allowed to exist in the model even if no objects (line, area,
solid, link) are connected to them. Points that are not special are automatically
deleted if no objects connect to them.
VBA Example
Sub GetSpecialPointStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SpecialPoint As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set as special point


ret = SapModel.PointObj.SetSpecialPoint("3", True)

'get special point status


ret = SapModel.PointObj.GetSpecialPoint("3", SpecialPoint)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSpecialPoint
DeleteSpecialPoint
GetSpring
Syntax
SapObject.SapModel.PointObj.GetSpring
VB6 Procedure
Function GetSpring(ByVal Name As String, ByRef k() As Double) As Long
Parameters
Name
The name of an existing point object.
k
This is an array of six spring stiffness values.
Value(0) = U1 [F/L]
Value(1) = U2 [F/L]
Value(2) = U3 [F/L]
Value(3) = R1 [FL/rad]
Value(4) = R2 [FL/rad]
Value(5) = R3 [FL/rad]
Remarks
This function retrieves uncoupled spring stiffness assignments for a point object,
that is, it retrieves the diagonal terms in the 6x6 spring matrix for the point object.
The spring stiffnesses reported are the sum of all springs assigned to the point
object. The spring stiffness values are reported in the point local coordinate
system.
The function returns zero if the stiffnesses are successfully retrieved, otherwise
it returns a nonzero value. If no springs exist at the point object, the function
returns a nonzero value.
VBA Example
Sub GetSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign spring to a point


ReDim k(5)
k(2) = 10
ret = SapModel.PointObj.SetSpring("3", k)

'get spring values


ReDim k(5)
ret = SapModel.PointObj.GetSpring("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpringCoupled
SetSpring
SetSpringCoupled
DeleteSpring
IsSpringCoupled
GetSpringCoupled
Syntax
SapObject.SapModel.PointObj.GetSpringCoupled
VB6 Procedure
Function GetSpringCoupled(ByVal Name As String, ByRef k() As Double) As
Long
Parameters
Name
The name of an existing point object.
k
This is an array of twenty one spring stiffness values.
Value(0) = U1U1 [F/L]
Value(1) = U1U2 [F/L]
Value(2) = U2U2 [F/L]
Value(3) = U1U3 [F/L]
Value(4) = U2U3 [F/L]
Value(5) = U3U3 [F/L]
Value(6) = U1R1 [F/rad]
Value(7) = U2R1 [F/rad]
Value(8) = U3R1 [F/rad]
Value(9) = R1R1 [FL/rad]
Value(10) = U1R2 [F/rad]
Value(11) = U2R2 [F/rad]
Value(12) = U3R2 [F/rad]
Value(13) = R1R2 [FL/rad]
Value(14) = R2R2 [FL/rad]
Value(15) = U1R3 [F/rad]
Value(16) = U2R3 [F/rad]
Value(17) = U3R3 [F/rad]
Value(18) = R1R3 [FL/rad]
Value(19) = R2R3 [FL/rad]
Value(20) = R3R3 [FL/rad]
Remarks
This function retrieves coupled spring stiffness assignments for a point object.
The spring stiffnesses reported are the sum of all springs assigned to the point
object. The spring stiffness values are reported in the point local coordinate
system.
The function returns zero if the stiffnesses are successfully retrieved, otherwise
it returns a nonzero value. If no springs exist at the point object, the function
returns a nonzero value.
VBA Example
Sub GetSpringCoupled()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign coupled spring to a point


ReDim k(20)
k(2) = 10
k(17) = 4
ret = SapModel.PointObj.SetSpringCoupled("3", k)

'get coupled spring values


ReDim k(20)
ret = SapModel.PointObj.GetSpringCoupled("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
SetSpring
SetSpringCoupled
DeleteSpring
IsSpringCoupled
GetTransformationMatrix
Syntax
SapObject.SapModel.PointObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing point object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the point object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array;
(Local1, Local2, Local3) are an item (such as a point load) in the point object
local coordinate system; and (GlobalX, GlobalY, GlobalZ) are the same item in
the global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the point object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system and the point object local coordinate system.
Remarks
The function returns zero if the point object transformation matrix is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetPointObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim Value() as double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set local axes


ret = SapModel.PointObj.SetLocalAxes("3", 33, 14, 12)

'get point object transformation matrix


redim Value(8)
ret = SapModel.PointObj.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
IsSpringCoupled
Syntax
SapObject.SapModel.PointObj.IsSpringCoupled
VB6 Procedure
Function IsSpringCoupled(ByVal Name As String, ByVal IsCoupled As Boolean)
As Long
Parameters
Name
The name of an existing point object.
IsCoupled
This item is True if the spring assigned to the specified point object is coupled,
otherwise it is False.
Remarks
This function indicates if the spring assignments to a point object are coupled,
that is, if they have off-diagonal terms in the 6x6 spring matrix for the point
object.
The function returns zero if the coupled status is successfully retrieved,
otherwise it returns a nonzero value. If no springs exist at the point object,n the
function returns a nonzero value.
VBA Example
Sub CheckIsSpringCoupled()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double
Dim IsCoupled As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign spring to a point


ReDim k(5)
k(2) = 10
ret = SapModel.PointObj.SetSpring("3", k)

'determine if spring is coupled


ret = SapModel.PointObj.IsSpringCoupled("3", IsCoupled)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
SetSpring
SetSpringCoupled
DeleteSpring
SetConstraint
Syntax
SapObject.SapModel.PointObj.SetConstraint
VB6 Procedure
Function SetConstraint(ByVal Name As String, ConstraintName As String,
Optional ByVal ItemType As eItemType = Object, Optional ByVal Replace As
Boolean = True) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
ConstraintName
The name of an existing joint constraint.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the constraint assignment is made to the point object
specified by the Name item.
If this item is Group, the constraint assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the constraint assignment is made to all selected
point objects and the Name item is ignored.
Replace
If this item is True, all previous joint constraints, if any, assigned to the specified
point object(s) are deleted before making the new assignment.
Remarks
This function makes joint constraint assignments to point objects.
The function returns 0 if the assignment is successfully made, otherwise it
returns nonzero.
VBA Example
Sub SetConstraintAssignment()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define a new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'define new constraint assignments


For i = 4 To 16 Step 4
ret = SapModel.PointObj.SetConstraint(Format(i),
"Diaph1")
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Replace to be ByVal in version 12.0.1.
See Also
GetConstraint
DeleteConstraint
SetGroupAssign
Syntax
SapObject.SapModel.PointObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional ByVal Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified point objects are added to the group specified
by the GroupName item. If it is True, the point objects are removed from the
group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the point object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all point objects in the group specified by the Name item are
added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected point objects are added or removed
from the group specified by the GroupName item and the Name item is ignored.
Remarks
This function adds or removes point objects from a specified group.
The function returns zero if the group assignment is successful, otherwise it
returns a nonzero value.
VBA Example
Sub AddPointObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add point objects to group


ret = SapModel.PointObj.SetGroupAssign("3", "Group1")
ret = SapModel.PointObj.SetGroupAssign("6", "Group1")
ret = SapModel.PointObj.SetGroupAssign("9", "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Remove to be ByVal in version 12.0.1.
See Also
SetGUID
Syntax
SapObject.SapModel.PointObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing point object.
GUID
The GUID (Global Unique ID) for the specified point object.
Remarks
This function sets the GUID for specified point object. If the GUID is passed in
as a blank string, the program automatically creates a GUID for the object.
This function returns zero if the point object GUID is successfully set; otherwise
it returns nonzero.
VBA Example
Sub SetPointGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set program created GUID


ret = SapModel.PointObj.SetGUID("1")

'get GUID
ret = SapModel.PointObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
SetLoadDispl
Syntax
SapObject.SapModel.PointObj.SetLoadDispl
VB6 Procedure
Function SetLoadDispl(ByVal Name As String, ByVal LoadPat As String, ByRef
Value() As Double, Optional ByVal Replace As Boolean = False, Optional ByVal
CSys As String = "Global", Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
LoadPat
The name of the load pattern for the ground displacement load.
Value
This is an array of six ground displacement load values.
Value(0) = U1 [L]
Value(1) = U2 [L]
Value(2) = U3 [L]
Value(3) = R1 [rad]
Value(4) = R2 [rad]
Value(5) = R3 [rad]
Replace
If this item is True, all previous ground displacement loads, if any, assigned to
the specified point object(s) in the specified load pattern are deleted before
making the new assignment.
CSys
The name of the coordinate system for the considered ground displacement
load. This is Local or the name of a defined coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignment is made to the point object specified by
the Name item.
If this item is Group, the load assignment is made to all point objects in the group
specified by the Name item.
If this item is SelectedObjects, the load assignment is made to all selected point
objects and the Name item is ignored.
Remarks
This function makes ground displacement load assignments to point objects.
The function returns zero if the load assignments are successfully made,
otherwise it returns a nonzero value.
VBA Example
Sub SetPointDisplLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add ground displacement load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadDispl("1", "DEAD", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDispl
DeleteLoadDispl
SetLoadForce
Syntax
SapObject.SapModel.PointObj.SetLoadForce
VB6 Procedure
Function SetLoadForce(ByVal Name As String, ByVal LoadPat As String, ByRef
Value() As Double, Optional ByVal Replace As Boolean = False, Optional ByVal
CSys As String = "Global", Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
LoadPat
The name of the load pattern for the point load.
Value
This is an array of six point load values.
Value(0) = F1 [F]
Value(1) = F2 [F]
Value(2) = F3 [F]
Value(3) = M1 [FL]
Value(4) = M2 [FL]
Value(5) = M3 [FL]
Replace
If this item is True, all previous point loads, if any, assigned to the specified point
object(s) in the specified load pattern are deleted before making the new
assignment.
CSys
The name of the coordinate system for the considered point load. This is Local
or the name of a defined coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignment is made to the point object specified by
the Name item.
If this item is Group, the load assignment is made to all point objects in the group
specified by the Name item.
If this item is SelectedObjects, the load assignment is made to all selected point
objects and the Name item is ignored.
Remarks
This function makes point load assignments to point objects.
The function returns zero if the load assignments are successfully made,
otherwise it returns a nonzero value.
VBA Example
Sub SetPointForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double
Dim LoadPat As String
Dim LCStep As Long
Dim CSys As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add point load


Redim Value(5)
Value(0) = 10
ret = SapModel.PointObj.SetLoadForce("1", "DEAD", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForce
DeleteLoadForce
SetLoadForceWithGUID {Point Object}
Syntax
SapObject.SapModel.PointObj.SetLoadForceWithGUID
VB6 Procedure
Function SetLoadForceWithGUID(ByVal Name As String, ByVal LoadPat As
String, ByRef Value() As Double, ByRef GUID As String, Optional ByVal Replace
As Boolean = False, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of an existing point object.
LoadPat
The name of the load pattern for the point load.
Value
This is an array of six point load values.
Value(0) = F1 [F]
Value(1) = F2 [F]
Value(2) = F3 [F]
Value(3) = M1 [FL]
Value(4) = M2 [FL]
Value(5) = M3 [FL]
GUID
This is the global unique ID of a load force assigned to the point object or if it is
not the global unique id of a load force assigned to the point object and it is not
blank, the global unique ID which is assigned to the newly assigned load. If left
blank, a new load is assigned to the point object and the value of this parameter
is set to the global unique ID of the newly assigned load.
Replace
If this item is True and the input GUID is not the GUID of any load force
assigned to the point object, all previous loads force, if any, assigned to the
specified point object, in the specified load pattern, are deleted before making
the new assignment. If the input GUID is the GUID of a load force already
assigned to the point object, the parameters of the distributed load are updated
with the values provided and this item is ignored.
CSys
The name of the coordinate system for the considered point load. This is Local
or the name of a defined coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignment is made to the point object specified by
the Name item.
If this item is Group, the load assignment is made to all point objects in the group
specified by the Name item.
If this item is SelectedObjects, the load assignment is made to all selected point
objects and the Name item is ignored.
Remarks
This function makes point load assignments to point objects.
The function returns zero if the load assignments are successfully made,
otherwise it returns a nonzero value.
Release Notes
Initial release in version 17.2.0.
See Also
GetLoadForceWithGUID
DeleteLoadForceWithGUID
SetLocalAxes
Syntax
SapObject.SapModel.PointObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal a As Double, ByVal b As
Double, ByVal c As Double, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
a, b, c
The local axes of the point are defined by first setting the positive local 1, 2 and
3 axes the same as the positive global X, Y and Z axes and then doing the
following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the local axes assignment is made to the point object
specified by the Name item.
If this item is Group, the local axes assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the local axes assignment is made to all selected
point objects and the Name item is ignored.
Remarks
This function sets the local axes angles for point objects.
The function returns zero if the local axes angles are successfully set, otherwise
it returns a nonzero value.
VBA Example
Sub SetPointLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set local axes


ret = SapModel.PointObj.SetLocalAxes("ALL", 90, 0, 0, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetLocalAxesAdvanced
Syntax
SapObject.SapModel.PointObj.SetLocalAxesAdvanced
VB6 Procedure
Function SetLocalAxesAdvanced(ByVal Name As String, ByVal Active As
Boolean, ByVal AxVectOpt As Long, ByVal AxCSys As String, ByRef AxDir() As
Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByVal Plane2 As
Long, ByVal PlVectOpt As Long, ByVal PlCSys As String, ByRef PlDir() As Long,
ByRef PlPt() As String, ByRef PlVect() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2 or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers), indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, 0r 3-2 plane. This item
applies only when the Active item is True.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the point object specified by the
Name item.
If this item is Group, the assignment is made to all point objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected point objects and the
Name item is ignored.
Remarks
This function assigns advanced local axes to point objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub AssignPointAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point advanced local axes


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.PointObj.SetLocalAxesAdvanced("ALL", True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetLocalAxesAdvanced
GetLocalAxes
SetMass
Syntax
SapObject.SapModel.PointObj.SetMass
VB6 Procedure
Function SetMass(ByVal Name As String, ByRef m() As Double, Optional ByVal
ItemType As eItemType = object, Optional ByVal IsLocalCSys As Boolean =
True, Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
m
This is an array of six mass assignment values.
Value(0) = U1 [M]
Value(1) = U2 [M]
Value(2) = U3 [M]
Value(3) = R1 [ML2]
Value(4) = R2 [ML2]
Value(5) = R3 [ML2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the mass assignment is made to the point object specified
by the Name item.
If this item is Group, the mass assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the mass assignment is made to all selected point
objects and the Name item is ignored.
IsLocalCSys
If this item is True, the specified mass assignments are in the point object local
coordinate system. If it is False, the assignments are in the Global coordinate
system.
Replace
If this item is True, all existing point mass assignments to the specified point
object(s) are deleted prior to making the assignment. If it is False, the mass
assignments are added to any existing assignments.
Remarks
This function assigns point mass to a point object.
The function returns zero if the mass is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignPointMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
dim i as long
Dim m() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point mass


Redim m(5)
For i = 0 to 5
m(i) = (i+1) / 10
Next i
ret = SapModel.PointObj.SetMass("3", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMass
DeleteMass
SetMassByVolume
SetMassByWeight
SetMassByVolume
Syntax
Sap2000.PointObj.SetMassByVolume
VB6 Procedure
Function SetMassByVolume(ByVal Name As String, ByVal MatProp As String,
ByRef m() As Double, Optional ByVal ItemType As eItemType = Object, Optional
ByVal IsLocalCSys As Boolean = True, Optional ByVal Replace As Boolean =
False) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
MatProp
The name of an existing material property.
m
This is an array of six mass assignment values.
Value(0) = U1 [L3]
Value(1) = U2 [L3]
Value(2) = U3 [L3]
Value(3) = R1 [L5]
Value(4) = R2 [L5]
Value(5) = R3 [L5]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the mass assignment is made to the point object specified
by the Name item.
If this item is Group, the mass assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the mass assignment is made to all selected point
objects and the Name item is ignored.
IsLocalCSys
If this item is True, the specified mass assignments are in the point object local
coordinate system. If it is False, the assignments are in the Global coordinate
system.
Replace
If this item is True, all existing point mass assignments to the specified point
object(s) are deleted prior to making the assignment. If it is False, the mass
assignments are added to any previously existing assignments.
Remarks
This function assigns point mass to a point object. The program calculates the
mass by multiplying the specified values by the mass per unit volume of the
specified material property.
The function returns zero if the mass is successfully assigned; otherwise, it
returns a nonzero value.
VBA Example
Sub AssignPointMassByVolume()
'dimension variables
Dim SapObject as cOAPI
Dim ret As Long
Dim i as long
Dim m() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point mass


Redim m(5)
For i = 0 to 5
m(i) = 20000 * (i+1)
Next i
ret = SapModel.PointObj.SetMassByVolume("3", "4000psi", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetMass
SetMassByWeight
GetMass
DeleteMass
SetMassByWeight
Syntax
Sap2000.PointObj.SetMassByWeight
VB6 Procedure
Function SetMassByWeight(ByVal Name As String, ByRef m() As Double,
Optional ByVal ItemType As eItemType = Object, Optional ByVal IsLocalCSys As
Boolean = True, Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group, depending on the value of the
ItemType item.
m
This is an array of six mass assignment values.
Value(0) = U1 [F]
Value(1) = U2 [F]
Value(2) = U3 [F]
Value(3) = R1 [FL2]
Value(4) = R2 [FL2]
Value(5) = R3 [FL2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the mass assignment is made to the point object specified
by the Name item.
If this item is Group, the mass assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the mass assignment is made to all selected point
objects and the Name item is ignored.
IsLocalCSys
If this item is True, the specified mass assignments are in the point object local
coordinate system. If it is False, the assignments are in the Global coordinate
system.
Replace
If this item is True, all existing point mass assignments to the specified point
object(s) are deleted prior to making the assignment. If it is False, the mass
assignments are added to any previously existing assignments.
Remarks
This function assigns point mass to a point object. The program calculates the
mass by dividing the specified values by the acceleration of gravity.
The function returns zero if the mass is successfully assigned; otherwise. it
returns a nonzero value.
VBA Example
Sub AssignPointMassByWeight()
'dimension variables
Dim SapObject as cOAPI
Dim ret As Long
Dim i as long
Dim m() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point mass


Redim m(5)
For i = 0 to 2
m(i) = i+1
Next i
ret = SapModel.PointObj.SetMassByWeight("3", m)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetMass
SetMassByVolume
GetMass
DeleteMass
SetMergeNumber
Syntax
SapObject.SapModel.PointObj.SetMergeNumber
VB6 Procedure
Function SetMergeNumber(ByVal Name As String, ByVal MergeNumber As
Long, Optional ByVal ItemType As eItemType = object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
MergeNumber
The merge number for the specified point object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the merge number assignment is made to the point object
specified by the Name item.
If this item is Group, the merge number assignment is made to all point objects in
the group specified by the Name item.
If this item is SelectedObjects, the merge number assignment is made to all
selected point objects and the Name item is ignored.
Remarks
This function assigns a merge number to a point object. By default the merge
number for a point is zero. Points with different merge numbers are not
automatically merged by the program.
The function returns zero if the merge number is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignPointMergeNumber()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set merge number


ret = SapModel.PointObj.SetMergeNumber("3", 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMergeNumber
SetPanelZone
Syntax
SapObject.SapMdel.PointObj.SetPanelZone
VB6 Procedure
Function SetPanelZone(ByVal Name As String, ByVal PropType As Long, ByVal
Thickness As Double, ByVal K1 As Double, ByVal K2 As Double, ByVal LinkProp
As String, ByVal Connectivity As Long, ByVal LocalAxisFrom As Long, ByVal
LocalAxisAngle As Double, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing point object.
PropType
This is 0, 1, 2, or 3.
0= Properties are elastic from column
1= Properties are elastic from column and doubler plate
2= Properties are from specified spring stiffnesses
3= Properties are from a specified link property
Thickness
The thickness of the doubler plate. This item applies only when PropType = 1. [L]
K1
The spring stiffness for major axis bending (about the local 3 axis of the column
and panel zone). This item applies only when PropType = 2. [FL/rad]
K2
The spring stiffness for minor axis bending (about the local 2 axis of the column
and panel zone). This item applies only when PropType = 2. [FL/rad]
LinkProp
The name of the link property used to define the panel zone. This item applies
only when PropType = 3.
Connectivity
This is 0 or 1.
0 = Panel zone connects beams to other objects
1 = Panel zone connects braces to other objects
LocalAxisFrom
This is 0 or 1.
0 = Panel zone local axis angle is from column
1 = Panel zone local axis angle is user defined

The LocalAxisFrom item can be 1 only when the PropType item is 3.


LocalAxisAngle
This item applies only when PropType = 3 and LocalAxisFrom = 1. It is the angle
measured counter clockwise from the positive global X-axis to the local 2-axis of
the panel zone. [deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the panel zone assignment is made to the point object
specified by the Name item.
If this item is Group, the panel zone assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the panel zone assignment is made to all selected
point objects and the Name item is ignored.
Remarks
This function makes panel zone assignments to point objects. Any existing panel
zone assignments are replaced by the new assignments.
The function returns zero if the panel zone data is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignPanelZoneData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign panel zone


ret = SapModel.PointObj.SetPanelZone("3", 1, 2, 0, 0, "", 0,
0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPanelZone
SetPatternByPressure
Syntax
SapObject.SapModel.PointObj.SetPatternByPressure
VB6 Procedure
Function SetPatternByPressure(ByVal Name As String, ByVal PatternName As
String, ByVal Z As Double, ByVal w As Double, u As Double, r As Long, Optional
ByVal ItemType As eItemType = Object, Optional ByVal Restriction As Long = 0,
Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
PatternName
The name of a defined joint pattern.
z
The Z coordinate at zero pressure in the present coordinate system. [L]
w
A weight per unit volume. [F/L3]
u
An added uniform force per unit area. [F/L2]
r
This is 0, 1, or 2.
0 = All values are used
1 = Negative values are set to zero
2 = Positive values are set to zero

This restriction applies before the pattern value has been added to any existing
pattern value assigned to the point object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the joint pattern assignment is made to the point object
specified by the Name item.
If this item is Group, the joint pattern assignment is made to all point objects in
the group specified by the Name item.
If this item is SelectedObjects, the joint pattern assignment is made to all
selected point objects and the Name item is ignored.
Restriction
This is 0, 1, or 2.
0 = All values are used
1 = Negative values are set to zero
2 = Positive values are set to zero

This restriction applies after the pattern value has been added to any existing
pattern value assigned to the point object. This restriction applies even if there
was no existing joint pattern value on the point object.
Replace
If this item is True, the joint pattern value calculated as shown in the Remarks
section replaces any previous joint pattern value for the point object.
If this item is False, the joint pattern value calculated as shown in the Remarks
section is added to any previous joint pattern value for the point object and then
the Restriction items are checked.
Remarks
This function sets the joint pattern value for a specified point object and joint
pattern.
The joint pattern value is calculated as:
Value = [(z zpoint) * w] + u
where z, w and u are described in the Parameters section and zpoint is the Z
coordinate of the considered point object in the present coordinate system. All
appropriate unit conversions are used to calculate the value in the database
units, but thereafter it is assumed to be unitless.
The function returns zero if the pattern value is successfully assigned, otherwise
it returns a nonzero value.
VBA Example
Sub SetJointPatternByPressure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern assignment


ret = SapModel.PointObj.SetPatternByPressure("ALL",
"Default", 0, 20, 1, 0, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPatternValue
SetPatternByXYZ
DeletePatternValue
GetPresentCoordSystem
SetPresentCoordSystem
SetPatternByXYZ
Syntax
SapObject.Sap2000.PointObj.SetPatternByXYZ
VB6 Procedure
Function SetPatternByXYZ(ByVal Name As String, ByVal PatternName As
String, ByVal a As Double, ByVal b As Double, ByVal c As Double, ByVal d As
Double, Optional ByVal ItemType As eItemType = object, Optional ByVal
Restriction As Long = 0, Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
PatternName
The name of a defined joint pattern.
a
The value a in the equation shown in the Remarks section. [1/L]
b
The value b in the equation shown in the Remarks section. [1/L]
c
The value c in the equation shown in the Remarks section. [1/L]
d
The value d in the equation shown in the Remarks section. This item is unitless.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the joint pattern assignment is made to the point object
specified by the Name item.
If this item is Group, the joint pattern assignment is made to all point objects in
the group specified by the Name item.
If this item is SelectedObjects, the joint pattern assignment is made to all
selected point objects and the Name item is ignored.
Restriction
This is either 0, 1, or 2.
0 = All values are used
1 = Negative values are set to zero
2 = Positive values are set to zero
Replace
If this item is True, the joint pattern value calculated as shown in the Remarks
section replaces any previous joint pattern value for the point object.
If this item is False, the joint pattern value calculated as shown in the Remarks
section is added to any previous joint pattern value for the point object and then
the Restriction items are checked.
Remarks
This function sets the joint pattern value for a specified point object and joint
pattern.
The joint pattern value is calculated as:
Value = ax + by + cz + d
where a, b, c and d are function input parameters and x, y and z are the
coordinates of the considered point object in the present coordinate system
The function returns zero if the pattern value is successfully assigned, otherwise
it returns a nonzero value.
VBA Example
Sub SetJointPatternByXYZ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint pattern assignment


ret = SapModel.PointObj.SetPatternByXYZ("ALL", "Default", 0,
0, 10, 0, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPatternValue
SetPatternByPressure
DeletePatternValue
GetPresentCoordSystem
SetPresentCoordSystem
SetRestraint
Syntax
SapObject.SapModel.PointObj.SetRestraint
VB6 Procedure
Function SetRestraint(ByVal Name As String, ByRef Value() As Boolean,
Optional ByVal ItemType As eItemType = object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
Value
This is an array of six restraint values.
Value(0) = U1
Value(1) = U2
Value(2) = U3
Value(3) = R1
Value(4) = R2
Value(5) = R3
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the restraint assignment is made to the point object
specified by the Name item.
If this item is Group, the restraint assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the restraint assignment is made to all selected
point objects and the Name item is ignored.
Remarks
This function assigns the restraint assignments for a point object. The restraint
assignments are always set in the point local coordinate system.
The function returns zero if the restraint assignments are successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignPointRestraints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign point object restraints


Redim Value(5)
For i = 0 to 5
Value(i) = True
Next i
ret = SapModel.PointObj.setRestraint("1", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetRestraint
DeleteRestraint
SetSelected
Syntax
SapObject.SapModel.PointObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
Selected
This item is True if the specified point object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the point object specified by
the Name item.
If this item is Group, the selected status is set for all point objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected point
objects and the Name item is ignored.
Remarks
This function sets the selected status for a point object.
The function returns zero if the selected status is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetPointSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set point selected


ret = SapModel.PointObj.SetSelected("3", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
SetSpecialPoint
Syntax
SapObject.SapModel.PointObj.SetSpecialPoint
VB6 Procedure
Function SetSpecialPoint(ByVal Name As String, ByVal SpecialPoint As
Boolean, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
SpecialPoint
This item is True if the point object is specified as a special point, otherwise it is
False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the special point status is set for the point object specified
by the Name item.
If this item is Group, the special point status is set for all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the special point status is set for all selected point
objects and the Name item is ignored.
Remarks
This function sets the special point status for a point object.
The function returns zero if the special point status is successfully set, otherwise
it returns a nonzero value.
Special points are allowed to exist in the model even if no objects (line, area,
solid, link) are connected to them. Points that are not special are automatically
deleted if no objects connect to them.
VBA Example
Sub SetSpecialPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set as special point


ret = SapModel.PointObj.SetSpecialPoint("3", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpecialPoint
DeleteSpecialPoint
SetSpring
Syntax
SapObject.SapModel.PointObj.SetSpring
VB6 Procedure
Function SetSpring(ByVal Name As String, ByRef k() As Double, Optional ByVal
ItemType As eItemType = object, Optional ByVal IsLocalCSys As Boolean =
False, Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
k
This is an array of six spring stiffness values.
Value(0) = U1 [F/L]
Value(1) = U2 [F/L]
Value(2) = U3 [F/L]
Value(3) = R1 [FL/rad]
Value(4) = R2 [FL/rad]
Value(5) = R3 [FL/rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the spring assignment is made to the point object specified
by the Name item.
If this item is Group, the spring assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the spring assignment is made to all selected
point objects and the Name item is ignored.
IsLocalCSys
If this item is True, the specified spring assignments are in the point object local
coordinate system. If it is False, the assignments are in the Global coordinate
system.
Replace
If this item is True, all existing point spring assignments to the specified point
object(s) are deleted prior to making the assignment. If it is False, the spring
assignments are added to any existing assignments.
Remarks
This function assigns coupled springs to a point object.
The function returns zero if the stiffnesses are successfully assigned, otherwise
it returns a nonzero value.
VBA Example
Sub AssignPointSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign spring to a point


ReDim k(5)
k(2) = 10
ret = SapModel.PointObj.SetSpring("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
SetSpringCoupled
DeleteSpring
IsSpringCoupled
SetSpringCoupled
Syntax
SapObject.SapModel.PointObj.SetSpringCoupled
VB6 Procedure
Function SetSpringCoupled(ByVal Name As String, ByRef k() As Double,
Optional ByVal ItemType As eItemType = object, Optional ByVal IsLocalCSys As
Boolean = False, Optional ByVal Replace As Boolean = False) As Long
Parameters
Name
The name of an existing point object or group depending on the value of the
ItemType item.
k
This is an array of twenty one spring stiffness values.
Value(0) = U1U1 [F/L]
Value(1) = U1U2 [F/L]
Value(2) = U2U2 [F/L]
Value(3) = U1U3 [F/L]
Value(4) = U2U3 [F/L]
Value(5) = U3U3 [F/L]
Value(6) = U1R1 [F/rad]
Value(7) = U2R1 [F/rad]
Value(8) = U3R1 [F/rad]
Value(9) = R1R1 [FL/rad]
Value(10) = U1R2 [F/rad]
Value(11) = U2R2 [F/rad]
Value(12) = U3R2 [F/rad]
Value(13) = R1R2 [FL/rad]
Value(14) = R2R2 [FL/rad]
Value(15) = U1R3 [F/rad]
Value(16) = U2R3 [F/rad]
Value(17) = U3R3 [F/rad]
Value(18) = R1R3 [FL/rad]
Value(19) = R2R3 [FL/rad]
Value(20) = R3R3 [FL/rad]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the spring assignment is made to the point object specified
by the Name item.
If this item is Group, the spring assignment is made to all point objects in the
group specified by the Name item.
If this item is SelectedObjects, the spring assignment is made to all selected
point objects and the Name item is ignored.
IsLocalCSys
If this item is True, the specified spring assignments are in the point object local
coordinate system. If it is False, the assignments are in the Global coordinate
system.
Replace
If this item is True, all existing point spring assignments to the specified point
object(s) are deleted prior to making the assignment. If it is False, the spring
assignments are added to any existing assignments.
Remarks
This function assigns coupled springs to a point object.
The function returns zero if the stiffnesses are successfully assigned, otherwise
it returns a nonzero value.
VBA Example
Sub AssignCoupledSpring()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim k() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign coupled spring to a point


ReDim k(20)
k(2) = 10
k(17) = 4
ret = SapModel.PointObj.SetSpringCoupled("3", k)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
GetSpringCoupled
SetSpring
DeleteSpring
IsSpringCoupled
AddByCoord
Syntax
SapObject.SapModel.SolidObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByRef x() As Double, ByRef y() As Double, ByRef z() As
Double, ByRef Name As String, Optional ByVal PropName As String = "Default",
Optional ByVal UserName As String = "", Optional ByVal CSys As String =
"Global") As Long
Parameters
x, y, z
These are arrays of x, y and z coordinates, respectively, for the corner points of
the solid object. The coordinates are in the coordinate system defined by the
CSys item.
Name
This is the name that the program ultimately assigns for the solid object. If no
UserName is specified, the program assigns a default name to the solid object.
If a UserName is specified and that name is not used for another solid object,
the UserName is assigned to the solid object; otherwise a default name is
assigned to the solid object.
PropName
This is either Default or the name of a defined solid property.
If it is Default, the program assigns a default solid property to the solid object. If it
is the name of a defined solid property, that property is assigned to the solid
object.
UserName
This is an optional user specified name for the solid object. If a UserName is
specified and that name is already used for another solid object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the solid object point coordinates
are defined.
Remarks
This function adds a new solid object whose corner points are at the specified
coordinates. Note that solid objects always are defined with eight corner points.
The function returns zero if the solid object is successfully added; otherwise it
returns a nonzero value.
VBA Example
Sub AddSolidObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewBlank

'add solid object by coordinates


ReDim x(7)
ReDim y(7)
ReDim z(7)
x(0) = 0: y(0) = 0: z(0) = 0
x(1) = 100: y(1) = 0: z(1) = 0
x(2) = 0: y(2) = 100: z(2) = 0
x(3) = 100: y(3) = 100: z(3) = 0
x(4) = 0: y(4) = 0: z(4) = 100
x(5) = 100: y(5) = 0: z(5) = 100
x(6) = 0: y(6) = 100: z(6) = 100
x(7) = 100: y(7) = 100: z(7) = 100
ret = SapModel.SolidObj.AddByCoord(x, y, z, Name)

'refresh view
ret = SapModel.View.RefreshView(0, False)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
AddByPoint
Syntax
SapObject.SapModel.SolidObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByRef Point() as String, ByRef Name As String, Optional
ByVal PropName As String = "Default", Optional ByVal UserName As String = "")
As Long
Parameters
Point
This is an array containing the names of the eight point objects that define the
corner points of the added solid object.
Name
This is the name that the program ultimately assigns for the solid object. If no
UserName is specified, the program assigns a default name to the solid object.
If a UserName is specified and that name is not used for another solid object,
the UserName is assigned to the solid object; otherwise a default name is
assigned to the solid object.
PropName
This is either Default or the name of a defined solid property.
If it is Default, the program assigns a default solid property to the solid object. If it
is the name of a defined solid property, that property is assigned to the solid
object.
UserName
This is an optional user specified name for the solid object. If a UserName is
specified and that name is already used for another solid object, the program
ignores the UserName.
Remarks
This function adds a new solid object whose corner points are specified by
name.
The function returns zero if the solid object is successfully added; otherwise it
returns a nonzero value.
VBA Example
Sub AddSolidObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(Openframe, 2, 144, 3, 288, 2,
288)

'add solid object by points


Redim Point(7)
Point(0) = "1"
Point(1) = "10"
Point(2) = "4"
Point(3) = "13"
Point(4) = "2"
Point(5) = "11"
Point(6) = "5"
Point(7) = "14"
ret = SapModel.SolidObj.AddByPoint(Point, Name)

'refresh view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
ChangeName
Syntax
SapObject.SapModel.SolidObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined solid object.
NewName
The new name for the solid object.
Remarks
This function applies a new name to a solid object.
The function returns zero if the new name is successfully applied; otherwise it
returns a nonzero value.
VBA Example
Sub ChangeSolidObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'change name
ret = SapModel.SolidObj.ChangeName("1", "MySolid")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.SolidObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns a count of the solid objects in the model.
VBA Example
Sub CountSolidObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'return number of solid objects


Count = SapModel.SolidObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.SolidObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the solid object specified by the Name item is deleted.
If this item is Group, the all solid objects in the group specified by the Name item
are deleted.
If this item is SelectedObjects, all selected solid objects are deleted, and the
Name item is ignored.
Remarks
The function deletes solid objects.
The function returns zero if the solid objects are successfully deleted; otherwise
it returns a nonzero value.
VBA Example
Sub DeleteSolidObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'delete solid object


ret = SapModel.SolidObj.Delete("2")

'update view
ret = SapModel.View.RefreshView(0, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteLoadGravity
Syntax
SapObject.SapModel.SolidObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the load assignments are deleted for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
solid objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified solid objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object gravity loads


ret = SapModel.SolidObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete solid object gravity load


ret = SapModel.SolidObj.DeleteLoadGravity("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadPorePressure
Syntax
SapObject.SapModel.SolidObj.DeleteLoadPorePressure
VB6 Procedure
Function DeleteLoadPorePressure(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the load assignments are deleted for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
solid objects, and the Name item is ignored.
Remarks
This function deletes the pore pressure load assignments to the specified solid
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object pore pressure load


ret = SapModel.SolidObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'delete solid object pore pressure load


ret = SapModel.SolidObj.DeleteLoadPorePressure("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
SetLoadPorePressure
DeleteLoadStrain
Syntax
SapObject.SapModel.SolidObj.DeleteLoadStrain
VB6 Procedure
Function DeleteLoadStrain(ByVal Name As String, ByVal LoadPat As String,
ByVal Component As Long, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Component
This is 1, 2, 3, 4, 5 or 6, indicating the component for which the strain load is to
be deleted.
1= Strain11
2= Strain22
3= Strain33
4= Strain12
5= Strain13
6= Strain23
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the load assignments are deleted for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
solid objects, and the Name item is ignored.
Remarks
This function deletes the strain load assignments to the specified solid objects,
for the specified load pattern, for the specified components.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object strain load


ret = SapModel.SolidObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'delete solid object strain load


ret = SapModel.SolidObj.DeleteLoadStrain("1", "DEAD", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
SetLoadStrain
DeleteLoadSurfacePressure
Syntax
SapObject.SapModel.SolidObj.DeleteLoadSurfacePressure
VB6 Procedure
Function DeleteLoadSurfacePressure(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the load assignments are deleted for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
solid objects, and the Name item is ignored.
Remarks
This function deletes the surface pressure load assignments to the specified
solid objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object surface pressure load


ret = SapModel.SolidObj.SetLoadSurfacePressure("ALL",
"DEAD", 1, .1, , , Group)

'delete solid object surface pressure load


ret = SapModel.SolidObj.DeleteLoadSurfacePressure("1",
"DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
SetLoadSurfacePressure
DeleteLoadTemperature
Syntax
SapObject.SapModel.SolidObj.DeleteLoadTemperature
VB6 Procedure
Function DeleteLoadTemperature(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the load assignments are deleted for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
solid objects, and the Name item is ignored.
Remarks
This function deletes the temperature load assignments to the specified solid
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted;
otherwise it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object temperature load


ret = SapModel.SolidObj.SetLoadTemperature("All", "DEAD",
50, , , Group)

'delete solid object temperature load


ret = SapModel.SolidObj.DeleteLoadTemperature("1", "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
SetLoadTemperature
DeleteSpring
Syntax
SapObject.SapModel.SolidObj.DeleteSpring
VB6 Procedure
Function DeleteSpring(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the spring assignments are deleted for the solid object
specified by the Name item.
If this item is Group, the spring assignments are deleted for all solid objects in
the group specified by the Name item.
If this item is SelectedObjects, the spring assignments are deleted for all
selected solid objects, and the Name item is ignored.
Remarks
This function deletes all spring assignments for the specified solid objects.
The function returns zero if the assignments are successfully deleted; otherwise
it returns a nonzero value.
VBA Example
Sub DeleteSolidObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign springs to solid objects


ReDim Vec(2)
ret = SapModel.SolidObj.SetSpring("1", 1, 1, 1, "", 1, 1, 3,
True, Vec, 0, False, "Local")
ret = SapModel.SolidObj.SetSpring("5", 1, 1, 1, "", 1, 1, 3,
True, Vec, 0, False, "Local")

'delete springs
ret = SapModel.SolidObj.DeleteSpring("1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
SetSpring
GetAutoMesh
Syntax
SapObject.SapModel.SolidObj.GetAutoMesh
VB6 Procedure
Function GetAutoMesh(ByVal Name As String, ByRef MeshType As Long,
ByRef n1 As Long, ByRef n2 As Long, ByRef MaxSize1 As Double, ByRef
MaxSize2 As Double, ByRef RestraintsOnEdge As Boolean, ByRef
RestraintsOnFace As Boolean) As Long
Parameters
Name
The name of an existing solid object.
MeshType
This item is 0, 1 or 2, indicating the automatic mesh type for the solid object.
0 = No automatic meshing
1 = Mesh solid into a specified number of objects
2 = Mesh solid into objects of a specified maximum size

n1
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 2.
n2
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 3.
n3
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 5.
MaxSize1
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 2. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize2
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 3. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize3
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 5. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
RestraintsOnEdge
If this item is True, and if both points along an edge of the original solid object
have the same restraint/constraint, then, if the an added point on that edge and
the original corner points have the same local axes definition, the program
assigns the restraint/constraint to the added point.
RestraintsOnFace
If this item is True, and if all corner points on an solid object face have the same
restraint/constraint, then, if an added point on that face and the original corner
points for the face have the same local axes definition, the program assigns the
restraint/constraint to the added point.
Remarks
This function retrieves the automatic meshing assignments to solid objects.
The function returns zero if the meshing assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MeshType As Long
Dim n1 As Long
Dim n2 As Long
Dim n3 As Long
Dim MaxSize1 As Double
Dim MaxSize2 As Double
Dim MaxSize3 As Double
Dim RestraintsOnEdge As Boolean
Dim RestraintsOnFace As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 3, 3,3, , , ,
, , Group)

'get auto mesh options for solid object


ret = SapModel.SolidObj.GetAutoMesh("1", MeshType, n1, n2,
n3, MaxSize1, MaxSize2, MaxSize3, RestraintsOnEdge,
RestraintsOnFace)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetAutoMesh
GetEdgeConstraint
Syntax
SapObject.SapModel.SolidObj.GetEdgeConstraint
VB6 Procedure
Function GetEdgeConstraint(ByVal Name As String, ByRef ConstraintExists As
Boolean) As Long
Parameters
Name
The name of an existing solid object.
ConstraintExists
This item is True if an automatic edge constraint is generated by the program for
the solid object in the analysis model.
Remarks
This function retrieves the generated edge constraint assignments to solid
objects.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjEdgeConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ConstraintExists As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto edge constraint option


ret = SapModel.SolidObj.SetEdgeConstraint("ALL", True,
Group)

'get auto edge constraint option


ret = SapModel.SolidObj.GetEdgeConstraint("1",
ConstraintExists)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetEdgeConstraint
GetElm
Syntax
SapObject.SapModel.SolidObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef nelm As Long, ByRef Elm() as
String) As Long
Parameters
Name
The name of an existing solid object.
nelm
The number of solid elements created from the specified solid object.
Elm
An array that includes the name of a solid element created from the specified
solid object.
Remarks
This function retrieves the names of the solid elements (analysis model solid)
associated with a specified solid object in the object-based model.
This function returns zero if the solid element information is successfully
returned; otherwise it returns nonzero. An error occurs if the analysis model
does not exist.
VBA Example
Sub GetSolidElementInfoForSolidObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nelm As Long
Dim Elm() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get solid element information


ret = SapModel.SolidObj.GetElm("1", nelm, Elm)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.SolidObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing solid object.
GUID
The GUID (Global Unique ID) for the specified solid object.
Remarks
This function retrieves the GUID for the specified solid object.
This function returns zero if the solid object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetSolidObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'set program created GUID


ret = SapObject.SapModel.SolidObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.SolidObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetLoadGravity
Syntax
SapObject.SapModel.SolidObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef SolidName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified solid objects.
SolidName
This is an array that includes the name of the solid object associated with each
gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the solid object specified
by the Name item.
If this item is Group, the assignments are retrieved for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected solid
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to solid objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object gravity loads


ret = SapModel.SolidObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get solid object gravity load


ret = SapModel.SolidObj.GetLoadGravity("1", NumberItems,
SolidName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadPorePressure
Syntax
SapObject.SapModel.SolidObj.GetLoadPorePressure
VB6 Procedure
Function GetLoadPorePressure(ByVal Name As String, ByRef NumberItems As
Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
NumberItems
The total number of pore pressure loads retrieved for the specified solid objects.
SolidName
This is an array that includes the name of the solid object associated with each
pore pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
pore pressure load.
Value
This is an array that includes the pore pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
pore pressure load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the solid object specified
by the Name item.
If this item is Group, the assignments are retrieved for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected solid
objects, and the Name item is ignored.
Remarks
This function retrieves the pore pressure load assignments to solid objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object pore pressure load


ret = SapModel.SolidObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'get solid object pore pressure load


ret = SapModel.SolidObj.GetLoadPorePressure("ALL",
NumberItems, SolidName, LoadPat, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadPorePressure
DeleteLoadPorePressure
GetLoadStrain
Syntax
SapObject.SapModel.SolidObj.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Component()
As Long, ByRef Value() As Double, ByRef PatternName() As String, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified solid objects.
SolidName
This is an array that includes the name of the solid object associated with each
strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Component
This is 1, 2, 3, 4, 5 or 6, indicating the component to which the strain load is
applied.
1= Strain11
2= Strain22
3= Strain33
4= Strain12
5= Strain13
6= Strain23
Value
This is an array that includes the strain value. [L/L]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the solid object specified
by the Name item.
If this item is Group, the assignments are retrieved for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected solid
objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to solid objects.
The function returns zero if the strain load assignments are successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Component() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object strain load


ret = SapModel.SolidObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'get solid object strain load


ret = SapModel.SolidObj.GetLoadStrain("1", NumberItems,
SolidName, LoadPat, Component, Value, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadStrain
DeleteLoadStrain
GetLoadSurfacePressure
Syntax
SapObject.SapModel.SolidObj.GetLoadSurfacePressure
VB6 Procedure
Function GetLoadSurfacePressure(ByVal Name As String, ByRef NumberItems
As Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef
Face() As Long, ByRef Value() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
NumberItems
The total number of surface pressure loads retrieved for the specified solid
objects.
SolidName
This is an array that includes the name of the solid object associated with each
surface pressure load.
LoadPat
This is an array that includes the name of the load pattern associated with each
surface pressure load.
Face
This is an array that includes 1, 2, 3, 4, 5 or 6, indicating the solid object face to
which the specified load assignment applies.
Value
This is an array that includes the surface pressure load value. [F/L2]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
surface pressure load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the solid object specified
by the Name item.
If this item is Group, the assignments are retrieved for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected solid
objects, and the Name item is ignored.
Remarks
This function retrieves the surface pressure load assignments to solid objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Face() As Long
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object surface pressure load


ret = SapModel.SolidObj.SetLoadSurfacePressure("ALL",
"DEAD", 1, .1, , , Group)

'get solid object surface pressure load


ret = SapModel.SolidObj.GetLoadSurfacePressure("ALL",
NumberItems, SolidName, LoadPat, Face, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadSurfacePressure
DeleteLoadSurfacePressure
GetLoadTemperature
Syntax
SapObject.SapModel.SolidObj.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef SolidName() As String, ByRef LoadPat() As String, ByRef Value()
As Double, ByRef PatternName() As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified solid objects.
SolidName
This is an array that includes the name of the solid object associated with each
temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
Value
This is an array that includes the temperature load value. [T]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the solid object specified
by the Name item.
If this item is Group, the assignments are retrieved for all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected solid
objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to solid objects.
The function returns zero if the load assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim SolidName() As String
Dim LoadPat() As String
Dim Value() As Double
Dim PatternName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object temperature load


ret = SapModel.SolidObj.SetLoadTemperature("All", "DEAD",
50, , , Group)

'get solid object temperature load


ret = SapModel.SolidObj.GetLoadTemperature("ALL",
NumberItems, SolidName, LoadPat, Value, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTemperature
DeleteLoadTemperature
GetLocalAxes
Syntax
SapObject.SapModel.SolidObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef a As Double, ByRef b As
Double, ByRef c As Double, ByRef Advanced As Boolean) As Long
Parameters
Name
The name of an existing solid object.
a, b, c
The local axes of the solid object are defined by first setting the positive local 1,
2 and 3 axes the same as the positive global X, Y and Z axes and then doing the
following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
Advanced
This item is True if the solid object local axes orientation was obtained using
advanced local axes parameters.
Remarks
This function retrieves the local axes angles for a solid object.
The function returns zero if the local axes angles are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim a As Double, b As Double, c As Double
Dim Advanced As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign local axes angles


ret = SapModel.SolidObj.SetLocalAxes("ALL", 30, 40, 50,
Group)

'get local axes assignments


ret = SapModel.SolidObj.GetLocalAxes("1", a, b, c, Advanced)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetLocalAxesAdvanced
Syntax
SapObject.SapModel.SolidObj.GetLocalAxesAdvanced
VB6 Procedure
Function GetLocalAxesAdvanced(ByVal Name As String, ByRef Active As
Boolean, ByRef AxVectOpt As Long, ByRef AxCSys As String, ByRef AxDir()
As Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByRef Plane2 As
Long, ByRef PlVectOpt As Long, ByRef PlCSys As String, ByRef PlDir() As
Long, ByRef PlPt() As String, ByRef PlVect() As Double) As Long
Parameters
Name
The name of an existing solid object.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2 or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers) indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings), indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, 0r 3-2 plane. This item
applies only when the Active item is True.
Remarks
This function assigns advanced local axes to solid objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double
Dim a As Double, b As Double, c As Double
Dim Advanced As Boolean
Dim Active As Boolean
Dim AxVectOpt As Long
Dim AxCSys As String
Dim AxDir() As Long
Dim AxPt() As String
Dim AxVect() As Double
Dim Plane2 As Long
Dim PlVectOpt As Long
Dim PlCSys As String
Dim PlDir() As Long
Dim PlPt() As String
Dim PlVect() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)
'assign solid advanced local axes
MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.SolidObj.SetLocalAxesAdvanced("ALL", True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect, Group)

'get local axes assignments


ret = SapModel.SolidObj.GetLocalAxes("1", a, b, c, Advanced)

'get solid advanced local axes data


If Advanced Then
ret = SapModel.SolidObj.GetLocalAxesAdvanced("3", Active,
AxVectOpt, AxCSys, AxDir, AxPt, AxVect, Plane2, PlVectOpt, PlCSys,
PlDir, PlPt, PlVect)
End If

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
SetLocalAxesAdvanced
SetLocalAxes
GetMatTemp
Syntax
SapObject.SapModel.SolidObj.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing solid object.
Temp
This is the material temperature value assigned to the solid object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the solid object is uniform over the object at the value specified
by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the solid object may vary. The material temperature at each corner point of
the solid object is equal to the specified temperature multiplied by the pattern
value at the associated point object. The material temperature at other points in
the solid object is calculated by interpolation from the corner points.
Remarks
This function retrieves the material temperature assignments to solid objects.
The function returns zero if the material temperature assignments are
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign material temperature


ret = SapModel.SolidObj.SetMatTemp("ALL", 50, , Group)

'get material temperature


ret = SapModel.SolidObj.GetMatTemp("3", Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMatTemp
GetNameList
Syntax
SapObject.SapModel.SolidObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of solid object names retrieved by the program.
MyName
This is a one-dimensional array of solid object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the SAP2000 program,


filled with the names, and returned to the APIuser.
Remarks
This function retrieves the names of all defined solid objects.
The function returns zero if the names are successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetSolidObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'get solid object names


ret = SapModel.SolidObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.SolidObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point() As String) As Long
Parameters
Name
The name of a defined solid object.
Point
This is an array containing the names of the corner point objects of the solid
object.
Remarks
This function retrieves the names of the corner point objects of a solid object.
The function returns zero if the point object names are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberPoints As Long
Dim Point() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'get names of points


ReDim Point(7)
ret = SapModel.SolidObj.GetPoints("1", Point)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.SolidObj.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined solid object.
PropName
The name of the solid property assigned to the solid object.
Remarks
This function retrieves the solid property assigned to a solid object.
The function returns zero if the property is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSolidObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'get solid property


ret = SapModel.SolidObj.GetProperty("1", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetSelected
Syntax
Sap2000.SolidObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing solid object.
Selected
This item is True if the specified solid object is selected; otherwise it is False.
Remarks
This function retrieves the selected status for a solid object.
The function returns zero if the selected status is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'set all solid objects selected


ret = SapModel.SolidObj.SetSelected("ALL", True, Group)

'get solid object selected status


ret = SapModel.SolidObj.GetSelected("1", Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetSpring
Syntax
SapObject.SapModel.SolidObj.GetSpring
VB6 Procedure
Function GetSpring(ByVal Name As String, ByRef NumberSprings As Long,
ByRef MyType() As Long, ByRef s() As Double, ByRef SimpleSpringType() As
Long, ByRef LinkProp() As String, ByRef Face() As Long, ByRef
SpringLocalOneType() As Long, ByRef Dir() As Long, ByRef Outward() As
Boolean, ByRef VecX() As Double, ByRef VecY() As Double, ByRef VecZ() As
Double, ByRef CSys() As String, ByRef Ang() As Double) As Long
Parameters
Name
The name of an existing solid object.
NumberSprings
The number of springs assignments made to the specified solid object.
MyType
Each value in this array is either 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
Each value in this array is the simple spring stiffness per unit area of the
specified solid object face. This item applies only when the corresponding
MyType = 1. [F/L3]
SimpleSpringType
Each value in this array is 1, 2 or 3, indicating the simple spring type. This item
applies only when the corresponding MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
Each value in this array is the name of the link property assigned to the spring.
This item applies only when the corresponding MyType = 2.
Face
This is 1, 2, 3, 4, 5 or 6, indicating the solid object face to which the specified
spring assignment applies.
SpringLocalOneType
Each value in this array is 1, 2 or 3, indicating the method used to specify the
spring positive local 1-axis orientation.
1 = Parallel to solid object local axis
2 = Normal to specified solid object face
3 = User specified direction vector
Dir
Each value in this array is 1, 2, 3, -1, -2 or -3, indicating the solid object local
axis that corresponds to the positive local 1-axis of the spring. This item applies
only when the corresponding SpringLocalOneType = 1.
Outward
Each value in this array is True if the spring positive local 1 axis is outward from
the specified solid object face. This item applies only when SpringLocalOneType
= 2.
VecX
Each value in this array is the X-axis or solid object local 1-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecY
Each value in this array is the Y-axis or solid object local 2-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
VecZ
Each value in this array is the X-axis or solid object local 3-axis component
(depending on the CSys specified) of the user specified direction vector for the
spring local 1-axis. The direction vector is in the coordinate system specified by
the CSys item. This item applies only when the corresponding
SpringLocalOneType = 3.
CSys
Each value in this array is Local (meaning the solid object local coordinate
system) or the name of a defined coordinate system. This item is the coordinate
system in which the user specified direction vector, Vec, is specified. This item
applies only when the corresponding SpringLocalOneType = 3.
Ang
Each value in this array is the angle that the link local 2-axis is rotated from its
default orientation. This item applies only when the corresponding MyType = 2.
[deg]
Remarks
This function retrieves the spring assignments to a solid object face.
The function returns zero if the assignments are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double
Dim NumberSprings As Long
Dim MyType() As Long
Dim s() As Double
Dim SimpleSpringType() As Long
Dim LinkProp() As String
Dim Face() As Long
Dim SpringLocalOneType() As Long
Dim Dir() As Long
Dim Outward() As Boolean
Dim VecX() As Double
Dim VecY() As Double
Dim VecZ() As Double
Dim CSys() As String
Dim Ang() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign springs to solid objects


ReDim Vec(2)
ret = SapModel.SolidObj.SetSpring("1", 1, 1, 1, "", 1, 1, 3,
True, Vec, 0, False, "Local")
'get spring assignments to solid objects
ret = SapModel.SolidObj.GetSpring("1", NumberSprings,
MyType, s, SimpleSpringType, LinkProp, Face, SpringLocalOneType,
Dir, Outward, VecX, VecY, VecZ, CSys, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSpring
DeleteSpring
GetTransformationMatrix
Syntax
Sap2000.SolidObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing solid object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the solid object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the solid object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system and the solid object local coordinate system.
Remarks
The function returns zero if the solid object transformation matrix is successfully
retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetSolidObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'get solid object transformation matrix


ReDim Value(8)
ret = SapModel.SolidObj.GetTransformationMatrix("3", Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetAutoMesh
Syntax
SapObject.SapModel.SolidObj.SetAutoMesh
VB6 Procedure
Function SetAutoMesh(ByVal Name As String, ByVal MeshType As Long,
Optional ByVal n1 As Long = 2, Optional ByVal n2 As Long = 2, Optional ByVal
n3 As Long = 2, Optional ByVal MaxSize1 As Double = 0, Optional ByVal
MaxSize2 As Double = 0, Optional ByVal MaxSize3 As Double = 0, Optional
ByVal RestraintsOnEdge As Boolean = False, Optional ByVal RestraintsOnFace
As Boolean = False) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
MeshType
This item is 0, 1 or 2, indicating the automatic mesh type for the solid object.
0 = No automatic meshing
1 = Mesh solid into a specified number of objects
2 = Mesh solid into objects of a specified maximum size

n1
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 2.
n2
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 3.
n3
This item applies when MeshType = 1. It is the number of objects created along
the edge of the meshed solid object that runs from point 1 to point 5.
MaxSize1
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 2. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize2
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 3. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
MaxSize3
This item applies when MeshType = 2. It is the maximum size of objects created
along the edge of the meshed solid object that runs from point 1 to point 5. [L]
If this item is input as 0, the default value is used. The default value is 48 inches
if the database units are English or 120 centimeters if the database units are
metric.
RestraintsOnEdge
If this item is True, and if both points along an edge of the original solid object
have the same restraint/constraint, then, if the an added point on that edge and
the original corner points have the same local axes definition, the program
assigns the restraint/constraint to the added point.
RestraintsOnFace
If this item is True, and if all corner points on an solid object face have the same
restraint/constraint, then, if an added point on that face and the original corner
points for the face have the same local axes definition, the program assigns the
restraint/constraint to the added point.
Remarks
This function makes automatic meshing assignments to solid objects.
The function returns zero if the meshing options are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSolidObjAutoMesh()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto mesh options


ret = SapModel.SolidObj.SetAutoMesh("ALL", 1, 3, 3,3, , , ,
, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetAutoMesh
SetEdgeConstraint
Syntax
SapObject.SapModel.SolidObj.SetEdgeConstraint
VB6 Procedure
Function SetEdgeConstraint(ByVal Name As String, ByVal ConstraintExists As
Boolean, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
ConstraintExists
This item is True if an automatic edge constraint is generated by the program for
the solid object in the analysis model.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function makes generated edge constraint assignments to solid objects.
The function returns zero if the edge constraint option is successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSolidObjAutoEdgeConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign auto edge constraint option


ret = SapModel.SolidObj.SetEdgeConstraint("ALL", True,
Group)
ret = SapModel.SolidObj.SetEdgeConstraint("1", False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetEdgeConstraint
SetGroupAssign
Syntax
SapObject.SapModel.SolidObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified solid objects are added to the group specified
by the GroupName item. If it is True, the solid objects are removed from the
group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the solid object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all solid objects in the group specified by the Name item are
added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected solid objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes solid objects from a specified group.
The function returns zero if the group assignment is successful; otherwise it
returns a nonzero value.
VBA Example
Sub AddSolidObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add solid objects to group


ret = SapModel.SolidObj.SetGroupAssign("1", "Group1")
ret = SapModel.SolidObj.SetGroupAssign("2", "Group1")
ret = SapModel.SolidObj.SetGroupAssign("3", "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.SolidObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing solid object.
GUID
The GUID (Global Unique ID) for the specified solid object.
Remarks
This function sets the GUID for the specified solid object. If the GUID is passed
in as a blank string, the program automatically creates a GUID for the object.
This function returns zero if the solid object GUID is successfully set; otherwise
it returns nonzero.
VBA Example
Sub SetSolidObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'set program created GUID


ret = SapObject.SapModel.SolidObj.SetGUID("1")

'get GUID
ret = SapObject.SapModel.SolidObj.GetGUID("1", GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetLoadGravity
Syntax
SapObject.SapModel.SolidObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified
solid object(s), in the specified load pattern, are deleted before making the new
assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to solid objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSolidObjectGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object gravity loads


ret = SapModel.SolidObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadPorePressure
Syntax
SapObject.SapModel.SolidObj.SetLoadPorePressure
VB6 Procedure
Function SetLoadPorePressure(ByVal Name As String, ByVal LoadPat As
String, ByVal Value As Double, Optional ByVal PatternName As String = "",
Optional ByVal Replace As Boolean = True, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
This is the pore pressure value. [F/L2]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the pore
pressure load for the solid object is uniform over the object at the value specified
by Value.
If PatternName is the name of a defined joint pattern, the pore pressure load for
the solid object is based on the specified pore pressure value multiplied by the
pattern value at the corner point objects of the solid object.
Replace
If this item is True, all previous pore pressure loads, if any, assigned to the
specified solid object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns pore pressure loads to solid objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSolidObjectPorePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object pore pressure load


ret = SapModel.SolidObj.SetLoadPorePressure("ALL", "DEAD",
.1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadPorePressure
DeleteLoadPorePressure
SetLoadStrain
Syntax
SapObject.SapModel.SolidObj.SetLoadStrain
VB6 Procedure
Function SetLoadStrain(ByVal Name As String, ByVal LoadPat As String, ByVal
Component As Long, ByVal Value As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal PatternName As String = "", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Component
This is 1, 2, 3, 4, 5 or 6, indicating the component to which the strain load is
applied.
1= Strain11
2= Strain22
3= Strain33
4= Strain12
5= Strain13
6= Strain23
Value
This is the strain load value. [L/L]
Replace
If this item is True, all previous strain loads, if any, assigned to the specified solid
object(s), in the specified load pattern, for the specified degree of freedom, are
deleted before making the new assignment.
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the strain load
for the solid object is uniform over the object at the value specified by Value.
If PatternName is the name of a defined joint pattern, the strain load for the solid
object is based on the specified strain value multiplied by the pattern value at the
corner point objects of the solid object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns strain loads to solid objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSolidObjectStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object strain load


ret = SapModel.SolidObj.SetLoadStrain("ALL", "DEAD", 1,
0.001, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
DeleteLoadStrain
SetLoadSurfacePressure
Syntax
SapObject.SapModel.SolidObj.SetLoadSurfacePressure
VB6 Procedure
Function SetLoadSurfacePressure(ByVal Name As String, ByVal LoadPat As
String, ByVal Face As Long, ByVal Value As Double, Optional ByVal
PatternName As String = "", Optional ByVal Replace As Boolean = True,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Face
This is 1, 2, 3, 4, 5 or 6, indicating the solid object face to which the specified
load assignment applies.
Value
This is the surface pressure value. [F/L2]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the surface
pressure load for the solid object is uniform over the object at the value specified
by Value.
If PatternName is the name of a defined joint pattern, the surface pressure load
for the solid object is based on the specified surface pressure value multiplied by
the pattern value at the corner point objects of the solid object.
Replace
If this item is True, all previous surface pressure loads, if any, assigned to the
specified solid object(s), on the specified face, in the specified load pattern, are
deleted before making the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns surface pressure loads to solid objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSolidObjectSurfacePressureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object surface pressure load


ret = SapModel.SolidObj.SetLoadSurfacePressure("ALL",
"DEAD", 1, .1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadSurfacePressure
DeleteLoadSurfacePressure
SetLoadTemperature
Syntax
SapObject.SapModel.SolidObj.SetLoadTemperature
VB6 Procedure
Function SetLoadTemperature(ByVal Name As String, ByVal LoadPat As String,
ByVal Value As Double, Optional ByVal PatternName As String = "", Optional
ByVal Replace As Boolean = True, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Value
This is the temperature change value. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the temperature
load for the solid object is uniform over the object at the value specified by Value.
If PatternName is the name of a defined joint pattern, the temperature load for
the solid object is based on the specified temperature value multiplied by the
pattern value at the corner point objects of the solid object.
Replace
If this item is True, all previous temperature loads, if any, assigned to the
specified solid object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns temperature loads to solid objects.
The function returns zero if the loads are successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub AssignSolidObjectTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid object temperature load


ret = SapModel.SolidObj.SetLoadTemperature("All", "DEAD",
50, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
DeleteLoadTemperature
SetLocalAxes
Syntax
SapObject.SapModel.SolidObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal a As Double, ByVal b As
Double, ByVal c As Double, Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
a, b, c
The local axes of the solid object are defined by first setting the positive local 1,
2 and 3 axes the same as the positive global X, Y and Z axes and then doing the
following: [deg]
1. Rotate about the 3 axis by angle a.
2. Rotate about the resulting 2 axis by angle b.
3. Rotate about the resulting 1 axis by angle c.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the local axes assignment is made to the solid object
specified by the Name item.
If this item is Group, the local axes assignment is made to all solid objects in the
group specified by the Name item.
If this item is SelectedObjects, the local axes assignment is made to all selected
solid objects, and the Name item is ignored.
Remarks
This function sets the local axes angles for solid objects.
The function returns zero if the local axes angles are successfully set; otherwise
it returns a nonzero value.
VBA Example
Sub SetSolidLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign local axes angles


ret = SapModel.SolidObj.SetLocalAxes("1", 30, 40, 50)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetLocalAxesAdvanced
Syntax
SapObject.SapModel.SolidObj.SetLocalAxesAdvanced
VB6 Procedure
Function SetLocalAxesAdvanced(ByVal Name As String, ByVal Active As
Boolean, ByVal AxVectOpt As Long, ByVal AxCSys As String, ByRef AxDir() As
Long, ByRef AxPt() As String, ByRef AxVect() As Double, ByVal Plane2 As
Long, ByVal PlVectOpt As Long, ByVal PlCSys As String, ByRef PlDir() As Long,
ByRef PlPt() As String, ByRef PlVect() As Double, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
Active
This is True if advanced local axes exist.
AxVectOpt, PlVectOpt
This is 1, 2, or 3, indicating the axis/plane reference vector option. This item
applies only when the Active item is True.
1 = Coordinate direction
2 = Two joints
3 = User vector
AxCSys, PlCSys
The coordinate system used to define the axis/plane reference vector
coordinate directions and the axis/plane user vector. This item applies when the
Active item is True and the AxVectOpt/PlVectOpt item is 1 or 3.
AxDir, PlDir
This is an array dimensioned to 1 (2 integers) indicating the axis/plane
reference vector primary and secondary coordinate directions, PlDir(0) and
PlDir(1) respectively, taken at the object center in the specified coordinate
system and used to determine the plane reference vector. This item applies
when the Active item is True and the AxVectOpt/PlVectOpt item is 1. Possible
coordinate direction values are:
1= +X -1 = -X
2= +Y -2 = -Y
3= +Z -3 = -Z
4= +CR -4 = -CR
5= +CA -5 = -CA
6= +CZ -6 = -CZ
7= +SR -7 = -SR
8= +SA -8 = -SA
9= +SB -9 = -SB
AxPt, PlPt
This is an array dimensioned to 1 (2 strings) indicating the labels of two joints
that define the axis/plane reference vector. Either of these joints may be
specified as None to indicate the center of the specified object. If both joints are
specified as None, they are not used to define the plane reference vector. This
item applies when the Active item is True and the AxVectOpt/PlVectOpt item is 2.
AxVect, PlVect
This is an array dimensioned to 2 (3 doubles) that defines the axis/plane
reference vector. This item applies when the Active item is True and the
AxVectOpt/PlVectOpt item is 3.
Plane2
This is 12, 13, 21, 23, 31 or 32, indicating that the local plane determined by the
plane reference vector is the 1-2, 1-3, 2-1, 2-3, 3-1, or 3-2 plane. This item
applies only when the Active item is True.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selection = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is Selection, assignment is made to all selected solid objects and the
Name item is ignored.
Remarks
This function assigns advanced local axes to solid objects.
The function returns zero if the advanced local axes assignments are assigned
successfully; otherwise it returns a nonzero value.
VBA Example
Sub AssignSolidAdvancedLocalAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyAxDir(1) As Long
Dim MyAxPt(1) As String
Dim MyAxVect(2) As Double
Dim MyPlDir(1) As Long
Dim MyPlPt(1) As String
Dim MyPlVect(2) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign solid advanced local axes


MyAxVect(0)=0.707
MyAxVect(1)=0.707
MyAxVect(2)=0
MyPlDir(0) = 2
MyPlDir(1) = 3
ret = SapModel.SolidObj.SetLocalAxesAdvanced("ALL", True, 3,
"Global", MyAxDir, MyAxPt, MyAxVect, 12, 1, "Global", MyPlDir,
MyPlPt, MyPlVect, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
See Also
GetLocalAxesAdvanced
GetLocalAxes
SetMatTemp
Syntax
SapObject.SapModel.SolidObj.SetMatTemp
VB6 Procedure
Function SetMatTemp(ByVal Name As String, ByVal Temp As Double, Optional
ByVal PatternName As String = "", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
Temp
This is the material temperature value assigned to the solid object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the solid object is uniform over the object at the value specified
by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the solid object may vary. The material temperature at each corner point of
the solid object is equal to the specified temperature multiplied by the pattern
value at the associated point object. The material temperature at other points in
the solid object is calculated by interpolation from the corner points.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns material temperatures to solid objects.
The function returns zero if the material temperatures are successfully
assigned; otherwise it returns a nonzero value.
VBA Example
Sub AssignSolidObjectMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign material temperature


ret = SapModel.SolidObj.SetMatTemp("ALL", 50, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
SetProperty
Syntax
SapObject.SapModel.SolidObj.SetProperty
VB6 Procedure
Function SetProperty(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
PropName
This is the name of a solid property to be assigned to the specified solid
object(s).
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function assigns a solid property to solid objects.
The function returns zero if the property is successfully assigned; otherwise it
returns a nonzero value.
VBA Example
Sub SetSolidObjectProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'set solid property


ret = SapModel.SolidObj.SetProperty("1", "Solid1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
SetSelected
Syntax
Sap2000.SolidObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified solid object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the solid object specified by
the Name item.
If this item is Group, the selected status is set for all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected solid
objects, and the Name item is ignored.
Remarks
This function sets the selected status for solid objects.
The function returns zero if the selected status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetSolidObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'set solid objects selected


ret = SapModel.SolidObj.SetSelected("ALL", True, Group)

'update window
ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
SetSpring
Syntax
SapObject.SapModel.SolidObj.SetSpring
VB6 Procedure
Function SetSpring(ByVal Name As String, ByVal MyType As Long, ByVal s As
Double, ByVal SimpleSpringType As Long, ByVal LinkProp As String, ByVal Face
as Long, ByVal SpringLocalOneType As Long, ByVal Dir As Long, ByVal
Outward As Boolean, ByRef Vec() As Double, ByVal Ang As Double, ByVal
Replace As Boolean, Optional ByVal CSys As String = "Local", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing solid object or group, depending on the value of the
ItemType item.
MyType
This is either 1 or 2, indicating the spring property type.
1 = Simple spring
2 = Link property
s
The simple spring stiffness per unit area of the specified solid object face. This
item applies only when MyType = 1. [F/L3]
SimpleSpringType
This is 1, 2 or 3, indicating the simple spring type. This item applies only when
MyType = 1.
1 = Spring resists tension and compression
2 = Spring resists compression only
3 = Spring resists tension only
LinkProp
The name of the link property assigned to the spring. This item applies only when
MyType = 2.
Face
This is 1, 2, 3, 4, 5 or 6, indicating the solid object face to which the specified
spring assignment applies.
SpringLocalOneType
This is 1, 2 or 3, indicating the method used to specify the spring positive local 1-
axis orientation.
1 = Parallel to solid object local axis
2 = Normal to specified solid object face
3 = User specified direction vector
Dir
This is 1, 2, 3, -1, -2 or -3, indicating the solid object local axis that corresponds
to the positive local 1-axis of the spring. This item applies only when
SpringLocalOneType = 1.
Outward
This item is True if the spring positive local 1 axis is outward from the specified
solid object face. This item applies only when SpringLocalOneType = 2.
Vec
This is an array of three values that define the direction vector of the spring
positive local 1-axis. The direction vector is in the coordinate system specified
by the CSys item. This item applies only when SpringLocalOneType = 3.
Ang
This is the angle that the link local 2-axis is rotated from its default orientation.
This item applies only when MyType = 2. [deg]
Replace
If this item is True, all existing spring assignments to the solid object are
removed before assigning the specified spring. If it is False, the specified spring
is added to any existing springs already assigned to the solid object.
CSys
This is Local (meaning the solid object local coordinate system) or the name of a
defined coordinate system. This item is the coordinate system in which the user
specified direction vector, Vec, is specified. This item applies only when
SpringLocalOneType = 3.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the solid object specified by the
Name item.
If this item is Group, the assignment is made to all solid objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected solid objects,
and the Name item is ignored.
Remarks
This function makes spring assignments to solid objects. The springs are
assigned to a specified solid object face.
The function returns zero if the assignments are successfully applied; otherwise
it returns a nonzero value.
VBA Example
Sub AssignSolidObjectSprings()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Vec() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewSolidBlock(300, 400, 200, , , 2, 2,
2)

'assign springs to solid objects


ReDim Vec(2)
ret = SapModel.SolidObj.SetSpring("1", 1, 1, 1, "", 1, 1, 3,
True, Vec, 0, False, "Local")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSpring
DeleteSpring
AddByCoord
Syntax
SapObject.SapModel.TendonObj.AddByCoord
VB6 Procedure
Function AddByCoord(ByVal xi As Double, ByVal yi As Double, ByVal zi As
Double, ByVal xj As Double, ByVal yj As Double, ByVal zj As Double, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "", Optional ByVal CSys As String = "Global") As Long
Parameters
xi, yi, zi
The coordinates of the I-End of the added tendon object. The coordinates are in
the coordinate system defined by the CSys item.
xj, yj, zj
The coordinates of the J-End of the added tendon object. The coordinates are in
the coordinate system defined by the CSys item.
Name
This is the name that the program ultimately assigns for the tendon object. If no
UserName is specified, the program assigns a default name to the tendon
object. If a UserName is specified and that name is not used for another frame,
cable or tendon object, the UserName is assigned to the tendon object;
otherwise a default name is assigned to the tendon object.
PropName
This is Default, None or the name of a defined tendon property.
If it is Default, the program assigns a default tendon property to the tendon
object. If it is None, no tendon property is assigned to the tendon object. If it is
the name of a defined tendon property, that property is assigned to the tendon
object.
UserName
This is an optional user specified name for the tendon object. If a UserName is
specified and that name is already used for another tendon object, the program
ignores the UserName.
CSys
The name of the coordinate system in which the tendon object end point
coordinates are defined.
Remarks
This function adds a new tendon object whose end points are at the specified
coordinates.
The function returns zero if the tendon object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddTendonObjByCoord()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by coordinates


ret = SapModel.TendonObj.AddByCoord(-288, 0, 288, 288, 0,
288, Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByPoint
SetTendonData
AddByPoint
Syntax
SapObject.SapModel.TendonObj.AddByPoint
VB6 Procedure
Function AddByPoint(ByVal Point1 as String, ByVal Point2 as String, ByRef
Name As String, Optional ByVal PropName As String = "Default", Optional ByVal
UserName As String = "") As Long
Parameters
Point1
The name of a defined point object at the I-End of the added tendon object.
Point2
The name of a defined point object at the J-End of the added tendon object.
Name
This is the name that the program ultimately assigns for the tendon object. If no
UserName is specified, the program assigns a default name to the tendon
object. If a UserName is specified and that name is not used for another frame,
cable or tendon object, the UserName is assigned to the tendon object;
otherwise a default name is assigned to the tendon object.
PropName
This is Default, None or the name of a defined tendon property.
If it is Default, the program assigns a default tendon property to the tendon
object. If it is None, no tendon property is assigned to the tendon object. If it is
the name of a defined tendon property, that property is assigned to the tendon
object.
UserName
This is an optional user specified name for the tendon object. If a UserName is
specified and that name is already used for another tendon object, the program
ignores the UserName.
Remarks
This function adds a new tendon object whose end points are specified by name.
The function returns zero if the tendon object is successfully added, otherwise it
returns a nonzero value.
VBA Example
Sub AddTendonObjByPoint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
SetTendonData
ChangeName
Syntax
SapObject.SapModel.TendonObj.ChangeName
VB6 Procedure
Function ChangeName(ByVal Name As String, ByVal NewName As String) As
Long
Parameters
Name
The existing name of a defined tendon object.
NewName
The new name for the tendon object.
Remarks
The function returns zero if the new name is successfully applied, otherwise it
returns a nonzero value.
VBA Example
Sub ChangeTendonObjName()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'change name
ret = SapModel.TendonObj.ChangeName(Name, "MyTendon")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Count
Syntax
SapObject.SapModel.TendonObj.Count
VB6 Procedure
Function Count() As Long
Parameters
None
Remarks
This function returns a count of the tendon objects in the model.
VBA Example
Sub CountTendonObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'return number of tendon objects


Count = SapModel.TendonObj.Count

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Delete
Syntax
SapObject.SapModel.TendonObj.Delete
VB6 Procedure
Function Delete(ByVal Name As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing tendon object or group depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the tendon object specified by the Name item is deleted.
If this item is Group, all of the tendon objects in the group specified by the Name
item are deleted.
If this item is SelectedObjects, all selected tendon objects are deleted, and the
Name item is ignored.
Remarks
The function deletes tendon objects.
The function returns zero if the tendon objects are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonObj()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon objects by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name1)
ret = SapModel.TendonObj.AddByPoint("2", "8", Name2)

'update view
ret = SapModel.View.RefreshView(0, False)

'delete tendon object


ret = SapModel.TendonObj.Delete(Name1)

'update view
ret = SapModel.View.RefreshView(0, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
DeleteLoadDeformation
Syntax
SapObject.SapModel.TendonObj.DeleteLoadDeformation
VB6 Procedure
Function DeleteLoadDeformation(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the tendon object
specified by the Name item.
If this item is Group, the load assignments are deleted for all tendon objects in
the group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
tendon objects and the Name item is ignored.
Remarks
This function deletes the deformation load assignments to the specified tendon
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon deformation loads


ret = SapModel.TendonObj.SetLoadDeformation("ALL", "DEAD",
2, Group)

'delete tendon deformation load


ret = SapModel.TendonObj.DeleteLoadDeformation(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
SetLoadDeformation
DeleteLoadForceStress
Syntax
SapObject.SapModel.TendonObj.DeleteLoadForceStress
VB6 Procedure
Function DeleteLoadForceStress(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the tendon object
specified by the Name item.
If this item is Group, the load assignments are deleted for all tendon objects in
the group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
tendon objects, and the Name item is ignored.
Remarks
This function deletes the tendon force/stress load assignments to the specified
tendon objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon force load


ret = SapModel.TendonObj.SetLoadForceStress("ALL", "DEAD",
1, 0, 100, 0.15, 8.333E-05, 0.25, 3, 5, 7, 5, , Group)

'delete tendon force load


ret = SapModel.TendonObj.DeleteLoadForceStress(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForceStress
SetLoadForceStress
DeleteLoadGravity
Syntax
SapObject.SapModel.TendonObj.DeleteLoadGravity
VB6 Procedure
Function DeleteLoadGravity(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the tendon object
specified by the Name item.
If this item is Group, the load assignments are deleted for all tendon objects in
the group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
tendon objects, and the Name item is ignored.
Remarks
This function deletes the gravity load assignments to the specified tendon
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon gravity loads


ret = SapModel.TendonObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'delete tendon gravity load


ret = SapModel.TendonObj.DeleteLoadGravity(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
SetLoadGravity
DeleteLoadStrain
Syntax
SapObject.SapModel.TendonObj.DeleteLoadStrain
VB6 Procedure
Function DeleteLoadStrain(ByVal Name As String, ByVal LoadPat As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the tendon object
specified by the Name item.
If this item is Group, the load assignments are deleted for all tendon objects in
the group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
tendon objects, and the Name item is ignored.
Remarks
This function deletes the strain load assignments to the specified tendon objects
for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon strain load


ret = SapModel.TendonObj.SetLoadStrain(Name, "DEAD", 0.001)

'delete tendon strain load


ret = SapModel.TendonObj.DeleteLoadStrain(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
SetLoadStrain
DeleteLoadTemperature
Syntax
SapObject.SapModel.TendonObj.DeleteLoadTemperature
VB6 Procedure
Function DeleteLoadTemperature(ByVal Name As String, ByVal LoadPat As
String, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the load assignments are deleted for the tendon object
specified by the Name item.
If this item is Group, the load assignments are deleted for all tendon objects in
the group specified by the Name item.
If this item is SelectedObjects, the load assignments are deleted for all selected
tendon objects, and the Name item is ignored.
Remarks
This function deletes the temperature load assignments to the specified tendon
objects for the specified load pattern.
The function returns zero if the load assignments are successfully deleted,
otherwise it returns a nonzero value.
VBA Example
Sub DeleteTendonTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon temperature load


ret = SapModel.TendonObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'delete tendon temperature load


ret = SapModel.TendonObj.DeleteLoadTemperature(Name, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
SetLoadTemperature
GetDiscretization
Syntax
SapObject.SapModel.TendonObj.GetDiscretization
VB6 Procedure
Function GetDiscretization(ByVal Name As String, ByRef Value As Double) As
Long
Parameters
Name
The name of an existing tendon object.
Value
The maximum discretization length for the tendon. [L]
Remarks
This function retrieves the maximum discretization length assignment for tendon
objects.
The function returns zero if the assignment is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetTendonMaxDiscretizationLength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'get tendon maximum discretization length


ret = SapModel.TendonObj.GetDiscretization(Name, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetDiscretization
GetElm
Syntax
SapObject.SapModel.TendonObj.GetElm
VB6 Procedure
Function GetElm(ByVal Name As String, ByRef nelm As Long, ByRef Elm() as
String, ByRef RDI() As Double, ByRef RDJ() As Double) As Long
Parameters
Name
The name of an existing tendon object.
nelm
The number of line elements created from the specified tendon object.
Elm
An array that includes the name of a line element created from the specified
tendon object.
RDI
An array that includes the relative distance along the tendon object to the I-End
of the line element.
RDJ
An array that includes the relative distance along the tendon object to the J-End
of the line element.
Remarks
This function retrieves the names of the line elements (analysis model lines)
associated with a specified tendon object in the object-based model. It also
retrieves information about the location of the line elements along the tendon
object.
This function returns zero if the line element information is successfully returned;
otherwise it returns nonzero. An error occurs if the analysis model does not
currently exist.
VBA Example
Sub GetLineElementInfoForTendonObject()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim nelm As Long
Dim Elm() As String
Dim RDI() As Double
Dim RDJ() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon force load


ret = SapModel.TendonObj.SetLoadForceStress("ALL", "DEAD",
1, 0, 100, 0.15, 8.333E-05, 0.25, 3, 5, 7, 5, , Group)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'get line element information


ret = SapModel.TendonObj.GetElm(Name, nelm, Elm, RDI, RDJ)

'Note: The above returns 0 elements because the tendon is


specified to be modelled using loads, not elements
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetGUID
Syntax
SapObject.SapModel.TendonObj.GetGUID
VB6 Procedure
Function GetGUID(ByVal name As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing tendon object.
GUID
The GUID (Global Unique ID) for the specified tendon object.
Remarks
This function retrieves the GUID for the specified tendon object.
This function returns zero if the tendon object GUID is successfully retrieved;
otherwise it returns nonzero.
VBA Example
Sub GetTendonObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'set program created GUID


ret = SapObject.SapModel.TendonObj.SetGUID(Name)

'get GUID
ret = SapObject.SapModel.TendonObj.GetGUID(Name, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
SetGUID
GetLoadDeformation
Syntax
SapObject.SapModel.TendonObj.GetLoadDeformation
VB6 Procedure
Function GetLoadDeformation(ByVal Name As String, ByRef NumberItems As
Long, ByRef TendonName() As String, ByRef LoadPat() As String, ByRef U1()
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
NumberItems
The total number of deformation loads retrieved for the specified tendon objects.
TendonName
This is an array that includes the name of the tendon object associated with
each deformation load.
LoadPat
This is an array that includes the name of the load pattern associated with each
deformation load.
U1
This is an array of axial deformation load values. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the tendon object
specified by the Name item.
If this item is Group, the assignments are retrieved for all tendon objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected tendon
objects, and the Name item is ignored.
Remarks
This function retrieves the deformation load assignments to tendon objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim TendonName() As String
Dim LoadPat() As String
Dim U1() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon deformation loads


ret = SapModel.TendonObj.SetLoadDeformation("ALL", "DEAD",
2, Group)

'get tendon deformation loads


ret = SapModel.TendonObj.GetLoadDeformation(Name,
NumberItems, TendonName, LoadPat, U1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadDeformation
DeleteLoadDeformation
GetLoadedGroup
Syntax
SapObject.SapModel.TendonObj.GetLoadedGroup
VB6 Procedure
Function GetLoadedGroup(ByVal Name As String, ByRef GroupName As
String) As Long
Parameters
Name
The name of an existing tendon object.
GroupName
This is the name of an existing group. All objects in the specified group can be
loaded by the tendon.
Remarks
This function retrieves the loaded group for tendon objects. A tendon object
transfers its load to any object that is in the specified group.
The function returns zero if the assignment is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetTendonLoadedGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim GroupName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'get tendon loaded group


ret = SapModel.TendonObj.GetLoadedGroup(Name, GroupName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLoadedGroup
GetLoadForceStress
Syntax
SapObject.SapModel.TendonObj.GetLoadForceStress
VB6 Procedure
Function GetLoadForceStress(ByVal Name As String, ByRef NumberItems As
Long, ByRef TendonName() As String, ByRef LoadPat() As String, ByRef
JackFrom() As Long, ByRef LoadType() As Long, ByRef Value() As Double,
ByRef CurvatureCoeff() As Double, ByRef WobbleCoeff() As Double, ByRef
LossAnchorage() As Double, ByRef LossShortening() As Double, ByRef
LossCreep() As Double, ByRef LossShrinkage() As Double, ByRef
LossSteelRelax() As Double, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified tendon objects.
TendonName
This is an array that includes the name of the tendon object associated with
each temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
JackFrom
This is an array that includes 1, 2 or 3, indicating how the tendon is jacked.
1 = Tendon jacked from I-End
2 = Tendon jacked from J-End
3 = Tendon jacked from both ends
LoadType
This is an array that includes either 0 or 1, indicating how the type of load.
0 = Force
1 = Stress
Value
This is an array that includes the load value. [F] when LoadType is 0, and [F/L2]
when Loadtype is 1
CurvatureCoeff
This is an array that includes the curvature coefficient used when calculating
friction losses.
WobbleCoeff
This is an array that includes the wobble coefficient used when calculating
friction losses. [1/L]
LossAnchorage
This is an array that includes the anchorage set slip. [L]
LossShortening
This is an array that includes the tendon stress loss due to elastic shortening.
[F/L2]
LossCreep
This is an array that includes the tendon stress loss due to creep. [F/L2]
LossShrinkage
This is an array that includes the tendon stress loss due to shrinkage. [F/L2]
LossSteelRelax
This is an array that includes the tendon stress loss due to tendon steel
relaxation. [F/L2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the tendon object
specified by the Name item.
If this item is Group, the assignments are retrieved for all tendon objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected tendon
objects, and the Name item is ignored.
Remarks
This function retrieves the force/stress load assignments to tendon objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonForceLoad()
'dimensionvariables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim TendonName() As String
Dim LoadPat() As String
Dim JackFrom() As Long
Dim LoadType() As Long
Dim Value() As Double
Dim CurvatureCoeff() As Double
Dim WobbleCoeff() As Double
Dim LossAnchorage() As Double
Dim LossShortening() As Double
Dim LossCreep() As Double
Dim LossShrinkage() As Double
Dim LossSteelRelax() As Double

'createSap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'startSap2000 application
SapObject.ApplicationStart

'createSapModel object
Set SapModel = SapObject.SapModel

'initializemodel
ret = SapModel.InitializeNewModel

'createmodel from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon force load


ret = SapModel.TendonObj.SetLoadForceStress("ALL", "DEAD",
1, 0, 100, 0.15, 8.333E-05, 0.25, 3, 5, 7, 5, , Group)
'get tendon force load
ret = SapModel.TendonObj.GetLoadForceStress(Name,
NumberItems, TendonName, LoadPat, JackFrom, LoadType, Value,
CurvatureCoeff, WobbleCoeff, LossAnchorage, LossShortening,
LossCreep, LossShrinkage, LossSteelRelax)

'closeSap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadForceStress
DeleteLoadForceStress
GetLoadGravity
Syntax
SapObject.SapModel.TendonObj.GetLoadGravity
VB6 Procedure
Function GetLoadGravity(ByVal Name As String, ByRef NumberItems As Long,
ByRef TendonName() As String, ByRef LoadPat() As String, ByRef CSys() As
String, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
NumberItems
The total number of gravity loads retrieved for the specified tendon objects.
TendonName
This is an array that includes the name of the tendon object associated with
each gravity load.
LoadPat
This is an array that includes the name of the coordinate system in which the
gravity load multipliers are specified.
CSys
This is an array that includes the name of the coordinate system associated with
each gravity load.
x, y, z
These are arrays of gravity load multipliers in the x, y and z directions of the
specified coordinate system.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the tendon object
specified by the Name item.
If this item is Group, the assignments are retrieved for all tendon objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected tendon
objects, and the Name item is ignored.
Remarks
This function retrieves the gravity load assignments to tendon objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim TendonName() As String
Dim LoadPat() As String
Dim CSys() As String
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon gravity loads


ret = SapModel.TendonObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'get tendon gravity load


ret = SapModel.TendonObj.GetLoadGravity(Name, NumberItems,
TendonName, LoadPat, CSys, x, y, z)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadGravity
DeleteLoadGravity
GetLoadStrain
Syntax
SapObject.SapModel.TendonObj.GetLoadStrain
VB6 Procedure
Function GetLoadStrain(ByVal Name As String, ByRef NumberItems As Long,
ByRef TendonName() As String, ByRef LoadPat() As String, ByRef Strain() As
Double, ByRef PatternName() As String, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
NumberItems
The total number of strain loads retrieved for the specified tendon objects.
TendonName
This is an array that includes the name of the tendon object associated with
each strain load.
LoadPat
This is an array that includes the name of the load pattern associated with each
strain load.
Strain
This is an array that includes the axial strain value. [L/L]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
strain load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the tendon object
specified by the Name item.
If this item is Group, the assignments are retrieved for all tendon objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected tendon
objects, and the Name item is ignored.
Remarks
This function retrieves the strain load assignments to tendon objects.
The function returns zero if the strain load assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetTendonStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim TendonName() As String
Dim LoadPat() As String
Dim Strain() As Double
Dim PatternName() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon strain load


ret = SapModel.TendonObj.SetLoadStrain(Name, "DEAD", 0.001)

'get tendon strain load


ret = SapModel.TendonObj.GetLoadStrain(Name, NumberItems,
TendonName, LoadPat, Strain, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadStrain
DeleteLoadStrain
GetLoadTemperature
Syntax
SapObject.SapModel.TendonObj.GetLoadTemperature
VB6 Procedure
Function GetLoadTemperature(ByVal Name As String, ByRef NumberItems As
Long, ByRef TendonName() As String, ByRef LoadPat() As String, ByRef
MyType() As Long, ByRef Val() As Double, ByRef PatternName() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
NumberItems
The total number of temperature loads retrieved for the specified tendon objects.
TendonName
This is an array that includes the name of the tendon object associated with
each temperature load.
LoadPat
This is an array that includes the name of the load pattern associated with each
temperature load.
Val
This is an array that includes the temperature load value. [T]
PatternName
This is an array that includes the joint pattern name, if any, used to specify the
temperature load.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignments are retrieved for the tendon object
specified by the Name item.
If this item is Group, the assignments are retrieved for all tendon objects in the
group specified by the Name item.
If this item is SelectedObjects, assignments are retrieved for all selected tendon
objects, and the Name item is ignored.
Remarks
This function retrieves the temperature load assignments to tendon objects.
The function returns zero if the load assignments are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim TendonName() As String
Dim LoadPat() As String
Dim Val() As Double
Dim PatternName() As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon temperature load


ret = SapModel.TendonObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'get tendon temperature load


ret = SapModel.TendonObj.GetLoadTemperature("ALL",
NumberItems, TendonName, LoadPat, Val, PatternName, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetLoadTemperature
DeleteLoadTemperature
GetLocalAxes
Syntax
SapObject.SapModel.TendonObj.GetLocalAxes
VB6 Procedure
Function GetLocalAxes(ByVal Name As String, ByRef Ang As Double) As Long
Parameters
Name
The name of an existing tendon object.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +1 axis is pointing toward you. [deg]
Remarks
This function retrieves the tendon local axis angle assignment for tendon
objects.
The function returns zero if the assignment is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetTendonLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Ang As Double
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon local axis angle


ret = SapModel.TendonObj.SetLocalAxes(Name, 30)

'get tendon local axis angle


ret = SapModel.TendonObj.GetLocalAxes(Name, Ang)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetLocalAxes
GetMatTemp
Syntax
SapObject.SapModel.TendonObj.GetMatTemp
VB6 Procedure
Function GetMatTemp(ByVal Name As String, ByRef Temp As Double, ByRef
PatternName As String) As Long
Parameters
Name
The name of an existing tendon object.
Temp
This is the material temperature value assigned to the tendon object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the tendon object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the tendon object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the tendon object.
Remarks
This function retrieves the material temperature assignments to tendon objects.
The function returns zero if the material temperature assignments are
successfully retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetTendonMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Temp As Double
Dim PatternName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign material temperature


ret = SapModel.TendonObj.SetMatTemp("ALL", 50, , Group)

'get material temperature


ret = SapModel.TendonObj.GetMatTemp(Name, Temp, PatternName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetMatTemp
GetNameList
Syntax
SapObject.SapModel.TendonObj.GetNameList
VB6 Procedure
Function GetNameList(ByRef NumberNames As Long, ByRef MyName() As
String) As Long
Parameters
NumberNames
The number of tendon object names retrieved by the program.
MyName
This is a one-dimensional array of tendon object names. The MyName array is
created as a dynamic, zero-based, array by the APIuser:
Dim MyName() as String

The array is dimensioned to (NumberNames 1) inside the Sap2000 program,


filled with the names, and returned to the APIuser.
Remarks
This function retrieves the names of all defined tendon objects.
The function returns zero if the names are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetTendonObjectNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberNames As Long
Dim MyName() As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name1)
ret = SapModel.TendonObj.AddByPoint("2", "8", Name2)

'set tendon geometry


NumberPoints = 3
ReDim MyType(NumberPoints - 1)
ReDim x(NumberPoints - 1)
ReDim y(NumberPoints - 1)
ReDim z(NumberPoints - 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name1, NumberPoints,
MyType, x, y, z, "Local")
ret = SapModel.TendonObj.SetTendonData(Name2, NumberPoints,
MyType, x, y, z, "Local")

'get tendon object names


ret = SapModel.TendonObj.GetNameList(NumberNames, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetPoints
Syntax
SapObject.SapModel.TendonObj.GetPoints
VB6 Procedure
Function GetPoints(ByVal Name As String, ByRef Point1 As String, ByRef
Point2 As String) As Long
Parameters
Name
The name of a defined tendon object.
Point1
The name of the point object at the I-End of the specified tendon object.
Point2
The name of the point object at the J-End of the specified tendon object.
Remarks
This function retrieves the names of the point objects at each end of a specified
tendon object.
The function returns zero if the point names are successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonObjPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Point1 As String
Dim Point2 As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by coordinates


ret = SapModel.TendonObj.AddByCoord(-288, 0, 288, 288, 0,
288, Name)

'get names of points


ret = SapModel.TendonObj.GetPoints(Name, Point1, Point2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
Syntax
SapObject.SapModel.TendonObj.GetProperty
VB6 Procedure
Function GetProperty(ByVal Name As String, ByRef PropName As String) As
Long
Parameters
Name
The name of a defined tendon object.
PropName
The name of the tendon property assigned to the tendon object.
Remarks
This function retrieves the tendon property assigned to a tendon object.
The function returns zero if the tendon object property is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'get tendon section property


ret = SapModel.TendonObj.GetProperty(Name, PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetProperty
GetSelected
Syntax
Sap2000.TendonObj.GetSelected
VB6 Procedure
Function GetSelected(ByVal Name As String, ByRef Selected As Boolean) As
Long
Parameters
Name
The name of an existing tendon object.
Selected
This item returns True if the specified tendon object is selected, otherwise it
returns False.
Remarks
This function retrieves the selected status for a tendon object.
The function returns zero if the selected status is successfully retrieved,
otherwise it returns a nonzero value.
VBA Example
Sub GetTendonObjectSelectedStatus()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean
Dim Name1 As String
Dim Name2 As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name1)
ret = SapModel.TendonObj.AddByPoint("2", "8", Name2)

'set all tendons selected


ret = SapModel.TendonObj.SetSelected("All", True, Group)

'get tendon object selected status


ret = SapModel.TendonObj.GetSelected(Name1, Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetSelected
GetTCLimits
Syntax
SapObject.SapModel.TendonObj.GetTCLimits
VB6 Procedure
Function GetTCLimits(ByVal Name As String, ByRef LimitCompressionExists
As Boolean, ByRef LimitCompression As Double, ByRef LimitTensionExists As
Boolean, ByRef LimitTension As Double) As Long
Parameters
Name
The name of an existing tendon object.
LimitCompressionExists
This item is True if a compression force limit exists for the tendon object.
LimitCompression
The compression force limit for the tendon object. [F]
LimitTensionExists
This item is True if a tension force limit exists for the tendon object.
LimitTension
The tension force limit for the tendon object. [F]
Remarks
This function retrieves the tension/compression force limit assignments to
tendon objects.
The function returns zero if the assignments are successfully retrieved,
otherwise it returns a nonzero value.
Note that the tension and compression limits are used in nonlinear analyses
only.
VBA Example
Sub GetTendonTCLimits()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim LimitCompressionExists As Boolean
Dim LimitCompression As Double
Dim LimitTensionExists As Boolean
Dim LimitTension As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tension/compression limits


ret = SapModel.TendonObj.SetTCLimits(Name, True, 0, True,
100)

'get tension/compression limits


ret = SapModel.TendonObj.GetTCLimits(Name,
LimitCompressionExists, LimitCompression, LimitTensionExists,
LimitTension)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetTCLimits
GetTendonData
Syntax
SapObject.SapModel.TendonObj.GetTendonData
VB6 Procedure
Function GetTendonData(ByVal Name As String, ByRef NumberPoints As Long,
ByRef MyType() As Long, ByRef x() As Double, ByRef y() As Double, ByRef z()
As Double, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a defined tendon object.
NumberPoints
The number of items used to define the tendon geometry.
MyType
This is an array of values that are 1, 3, 6, 7, 8, or 9, indicating the tendon
geometry definition parameter for the specified point.
1= Start of tendon
2= The segment preceding the point is linear
6= The specified point is the end of a parabola
7= The specified point is an intermediate point on a parabola
8= The specified point is the end of a circle
9= The specified point is an intermediate point on a parabola

The first point always has a MyType value of 1.


MyType of 6 through 9 is based on using three points to calculate a parabolic or
circular arc. MyType 6 and 8 use the specified point and the two previous points
as the three points. MyType 7 and 9 use the specified point and the points just
before and after the specified point as the three points.
x
This is an array of the X (or local 1) coordinate of each point in the coordinate
system specified by CSys. [L]
y
This is an array of the Y (or local 2) coordinate of each point in the coordinate
system specified by CSys. [L]
z
This is an array of the Z (or local 3) coordinate of each point in the coordinate
system specified by CSys. [L]
CSys
This is the coordinate system in which the x, y and z coordinate parameters are
defined. It is Local or the name of a defined coordinate system.
Local means that the point coordinates are in the local system of the specified
tendon object with the origin assumed to be at the I-End of the tendon.
Remarks
This function retrieves the tendon geometric definition parameters for a tendon
object.
The function returns zero if the tendon object parameters are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetTendonGeometryDefinitionData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by coordinates


ret = SapModel.TendonObj.AddByCoord(-288, 0, 288, 288, 0,
288, Name)

'set tendon geometry


NumberPoints = 3
ReDim MyType(NumberPoints - 1)
ReDim x(NumberPoints - 1)
ReDim y(NumberPoints - 1)
ReDim z(NumberPoints - 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name, NumberPoints,
MyType, x, y, z, "Local")

'update view
ret = SapModel.View.RefreshView(0, False)

'get tendon geometry definition data


ReDim MyType(0)
ReDim x(0)
ReDim y(0)
ReDim z(0)
ret = SapModel.TendonObj.GetTendonData(Name, NumberPoints,
MyType, x, y, z, "Global")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetTendonData
GetTendonGeometry
GetTendonGeometry
Syntax
SapObject.SapModel.TendonObj.GetTendonGeometry
VB6 Procedure
Function GetTendonGeometry(ByVal Name As String, ByRef NumberPoints As
Long, ByRef x() As Double, ByRef y() As Double, ByRef z() As Double, Optional
ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a defined tendon object.
NumberPoints
The number of items used to define the discretized tendon geometry.
x
This is an array of the X (or local 1) coordinate of each point in the coordinate
system specified by CSys. [L]
y
This is an array of the Y (or local 2) coordinate of each point in the coordinate
system specified by CSys. [L]
z
This is an array of the Z (or local 3) coordinate of each point in the coordinate
system specified by CSys. [L]
CSys
This is the coordinate system in which the x, y and z coordinate parameters are
defined. It is Local or the name of a defined coordinate system.
Local means that the point coordinates are in the local system of the specified
tendon object with the origin assumed to be at the I-End of the tendon.
Remarks
This function retrieves tendon object discretized geometry, that is, it retrieves the
coordinates of the points along the discretized tendon.
The function returns zero if the tendon object discretized geometry is
successfully retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetTendonDiscretizedGeometry()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by coordinates


ret = SapModel.TendonObj.AddByCoord(-288, 0, 288, 288, 0,
288, Name)

'set tendon geometry


NumberPoints = 3
ReDim MyType(NumberPoints 1)
ReDim x(NumberPoints 1)
ReDim y(NumberPoints 1)
ReDim z(NumberPoints 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name, NumberPoints,
MyType, x, y, z, "Local")

'update view
ret = SapModel.View.RefreshView(0, False)

'get tendon discretized geometry


ReDim x(0)
ReDim y(0)
ReDim z(0)
ret = SapModel.TendonObj.GetTendonGeometry(Name,
NumberPoints, x, y, z, "Global")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTendonData
SetTendonData
GetTransformationMatrix
Syntax
Sap2000.TendonObj.GetTransformationMatrix
VB6 Procedure
Function GetTransformationMatrix(ByVal Name As String, ByRef Value() As
Double,Optional ByVal IsGlobal As Boolean = True) As Long
Parameters
Name
The name of an existing tendon object.
Value
Value is an array of nine direction cosines that define the transformation matrix.
The following matrix equation shows how the transformation matrix is used to
convert items from the tendon object local coordinate system to the global
coordinate system.

In the equation, c0 through c8 are the nine values from the transformation array,
(Local1, Local2, Local3) are an item (such as a load) in the object local
coordinate system, and (GlobalX, GlobalY, GlobalZ) are the same item in the
global coordinate system.
The transformation from the local coordinate system to the present coordinate
system is the same as that shown above for the global system if you substitute
the present system for the global system.
IsGlobal
If this item is True, the transformation matrix is between the Global coordinate
system and the tendon object local coordinate system.
If this item is False, the transformation matrix is between the present coordinate
system and the tendon object local coordinate system.
Remarks
The function returns zero if the tendon object transformation matrix is
successfully retrieved; otherwise it returns a nonzero value.
VBA Example
Sub GetTendonObjectMatrix()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon local axis angle


ret = SapModel.TendonObj.SetLocalAxes(Name, 30)

'get tendon object transformation matrix


ReDim Value(8)
ret = SapModel.TendonObj.GetTransformationMatrix(Name,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetDiscretization
Syntax
SapObject.SapModel.TendonObj.SetDiscretization
VB6 Procedure
Function SetDiscretization(ByVal Name As String, ByVal Ang As Double,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
Value
The maximum discretization length for the tendon. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns a maximum discretization length to tendon objects.
The function returns zero if the discretization length is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignTendonMaxDiscretizationLength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon maximum discretization length


ret = SapModel.TendonObj.SetDiscretization(Name, 12)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetDiscretization
SetGroupAssign
Syntax
SapObject.SapModel.TendonObj.SetGroupAssign
VB6 Procedure
Function SetGroupAssign(ByVal Name As String, ByVal GroupName As String,
Optional By Val Remove As Boolean = False, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
GroupName
The name of an existing group to which the assignment is made.
Remove
If this item is False, the specified tendon objects are added to the group
specified by the GroupName item. If it is True, the tendon objects are removed
from the group.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the tendon object specified by the Name item is added or
removed from the group specified by the GroupName item.
If this item is Group, all tendon objects in the group specified by the Name item
are added or removed from the group specified by the GroupName item.
If this item is SelectedObjects, all selected tendon objects are added or removed
from the group specified by the GroupName item, and the Name item is ignored.
Remarks
This function adds or removes tendon objects from a specified group.
The function returns zero if the group assignment is successful, otherwise it
returns a nonzero value.
VBA Example
Sub AddTendonObjectsToGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name1 As String
Dim Name2 As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name1)
ret = SapModel.TendonObj.AddByPoint("2", "8", Name2)

'set tendon geometry


NumberPoints = 3
ReDim MyType(NumberPoints - 1)
ReDim x(NumberPoints - 1)
ReDim y(NumberPoints - 1)
ReDim z(NumberPoints - 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name1, NumberPoints,
MyType, x, y, z, "Local")
ret = SapModel.TendonObj.SetTendonData(Name2, NumberPoints,
MyType, x, y, z, "Local")

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add tendon objects to group


ret = SapModel.TendonObj.SetGroupAssign(Name1, "Group1")
ret = SapModel.TendonObj.SetGroupAssign(Name2, "Group1")

'select objects in group


ret = SapModel.SelectObj.Group("Group1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetGUID
Syntax
SapObject.SapModel.TendonObj.SetGUID
VB6 Procedure
Function SetGUID(ByVal Name As String, Optional ByVal GUID As String = "")
As Long
Parameters
Name
The name of an existing tendon object.
GUID
The GUID (Global Unique ID) for the specified tendon object.
Remarks
This function sets the GUID for the specified tendon object. If the GUID is
passed in as a blank string, the program automatically creates a GUID for the
object.
This function returns zero if the tendon object GUID is successfully set;
otherwise it returns nonzero.
VBA Example
Sub SetTendonObjGUID()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'set program created GUID


ret = SapObject.SapModel.TendonObj.SetGUID(Name)

'get GUID
ret = SapObject.SapModel.TendonObj.GetGUID(Name, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetGUID
SetLoadDeformation
Syntax
SapObject.SapModel.TendonObj.SetLoadDeformation
VB6 Procedure
Function SetLoadDeformation(ByVal Name As String, ByVal LoadPat As String,
ByRef d As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
d
This is the axial deformation load value. [L]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon objects
and the Name item is ignored.
Remarks
This function assigns deformation loads to tendon objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonDeformationLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon deformation loads


ret = SapModel.TendonObj.SetLoadDeformation("ALL", "DEAD",
2, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadDeformation
DeleteLoadDeformation
SetLoadedGroup
Syntax
SapObject.SapModel.TendonObj.SetLoadedGroup
VB6 Procedure
Function SetLoadedGroup(ByVal Name As String, ByVal GroupName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
GroupName
This is the name of an existing group. All objects in the specified group can be
loaded by the tendon.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function makes the loaded group assignment to tendon objects. A tendon
object transfers its load to any object that is in the specified group.
The function returns zero if the group is successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonLoadedGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon loaded group


ret = SapModel.TendonObj.SetLoadedGroup(Name, "ALL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLoadedGroup
SetLoadForceStress
Syntax
SapObject.SapModel.TendonObj.SetLoadForceStress
VB6 Procedure
Function SetLoadForceStress(ByVal Name As String, ByVal LoadPat As String,
ByVal JackFrom As Long, ByVal LoadType As Long, ByVal Value As Double,
ByVal CurvatureCoeff As Double, ByVal WobbleCoeff As Double, ByVal
LossAnchorage As Double, ByVal LossShortening As Double, ByVal LossCreep
As Double, ByVal LossShrinkage As Double, ByVal LossSteelRelax As Double,
Optional ByVal Replace As Boolean = True, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
JackFrom
This is 1, 2 or 3, indicating how the tendon is jacked.
1 = Tendon jacked from I-End
2 = Tendon jacked from J-End
3 = Tendon jacked from both ends
LoadType
This is either 0 or 1, indicating how the type of load.
0 = Force
1 = Stress
Value
This is the load value. [F] whenLoadType is 0, and [F/L2] when Loadtype is 1
CurvatureCoeff
The curvature coefficient used when calculating friction losses.
WobbleCoeff
The wobble coefficient used when calculating friction losses. [1/L]
LossAnchorage
The anchorage set slip. [L]
LossShortening
The tendon stress loss due to elastic shortening. [F/L2]
LossCreep
The tendon stress loss due to creep. [F/L2]
LossShrinkage
The tendon stress loss due to shrinkage. [F/L2]
LossSteelRelax
The tendon stress loss due to tendon steel relaxation. [F/L2]
Replace
If this item is True, all previous force/stress loads, if any, assigned to the
specified tendon object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns force/stress loads to tendon objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonForceLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'createSap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon force load


ret = SapModel.TendonObj.SetLoadForceStress("ALL", "DEAD",
1, 0, 100, 0.15, 8.333E-05, 0.25, 3, 5, 7, 5, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadForceStress
DeleteLoadForceStress
SetLoadGravity
Syntax
SapObject.SapModel.TendonObj.SetLoadGravity
VB6 Procedure
Function SetLoadGravity(ByVal Name As String, ByVal LoadPat As String, ByVal
x As Double, ByVal y As Double, ByVal z As Double, Optional ByVal Replace As
Boolean = True, Optional ByVal CSys As String = "Global", Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
x, y, z
These are the gravity load multipliers in the x, y and z directions of the specified
coordinate system.
Replace
If this item is True, all previous gravity loads, if any, assigned to the specified
tendon object(s), in the specified load pattern, are deleted before making the
new assignment.
CSys
The coordinate system in which the x, y and z multipliers are specified.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon objects
and the Name item is ignored.
Remarks
This function assigns gravity load multipliers to tendon objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonGravityLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon gravity loads


ret = SapModel.TendonObj.SetLoadGravity("ALL", "DEAD", 0, 0,
-1, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadGravity
DeleteLoadGravity
SetLoadStrain
Syntax
SapObject.SapModel.TendonObj.SetLoadStrain
VB6 Procedure
Function SetLoadStrain(ByVal Name As String, ByVal LoadPat As String, ByVal
Strain As Double, Optional ByVal Replace As Boolean = True, Optional ByVal
PatternName As String = "", Optional ByVal ItemType As eItemType = Object) As
Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Strain
This is the axial strain load value. [L/L]
Replace
If this item is True, all previous strain loads, if any, assigned to the specified
tendon object(s), in the specified load pattern, are deleted before making the
new assignment.
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the strain load
for the tendon object is uniform along the object at the value specified by Strain.
If PatternName is the name of a defined joint pattern, the strain load for the
tendon object is based on the specified strain value multiplied by the pattern
value at the joints at each end of the tendon object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns strain loads to tendon objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonStrainLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret= SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon strain load


ret= SapModel.TendonObj.SetLoadStrain(Name, "DEAD", 0.001)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadStrain
DeleteLoadStrain
SetLoadTemperature
Syntax
SapObject.SapModel.TendonObj.SetLoadTemperature
VB6 Procedure
Function SetLoadTemperature(ByVal Name As String, ByVal LoadPat As String,
ByVal Val As Double, Optional ByVal PatternName As String = "", Optional ByVal
Replace As Boolean = True, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing tendon object or group depending on the value of the
ItemType item.
LoadPat
The name of a defined load pattern.
Val
This is the temperature change value. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the temperature
load for the tendon object is uniform along the object at the value specified by
Val.
If PatternName is the name of a defined joint pattern, the temperature load for
the tendon object is based on the specified temperature value multiplied by the
pattern value at the joints at each end of the tendon object.
Replace
If this item is True, all previous temperature loads, if any, assigned to the
specified tendon object(s), in the specified load case, are deleted before making
the new assignment.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns temperature loads to tendon objects.
The function returns zero if the loads are successfully assigned, otherwise it
returns a nonzero value.
VBA Example
Sub AssignTendonTemperatureLoad()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon temperature load


ret = SapModel.TendonObj.SetLoadTemperature("ALL", "DEAD",
50, , , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetLoadTemperature
DeleteLoadTemperature
SetLocalAxes
Syntax
SapObject.SapModel.TendonObj.SetLocalAxes
VB6 Procedure
Function SetLocalAxes(ByVal Name As String, ByVal Ang As Double, Optional
ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
Ang
This is the angle that the local 2 and 3 axes are rotated about the positive local 1
axis, from the default orientation. The rotation for a positive angle appears
counter clockwise when the local +1 axis is pointing toward you. [deg]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns a local axis angle to tendon objects.
The function returns zero if the local axis angle is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub AssignTendonLocalAxisAngle()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tendon local axis angle


ret = SapModel.TendonObj.SetLocalAxes(Name, 30)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetLocalAxes
SetMatTemp
Syntax
SapObject.SapModel.TendonObj.SetMatTemp
VB6 Procedure
Function SetMatTemp(ByVal Name As String, ByVal Temp As Double, Optional
ByVal PatternName As String = "", Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
Temp
This is the material temperature value assigned to the tendon object. [T]
PatternName
This is blank or the name of a defined joint pattern. If it is blank, the material
temperature for the tendon object is uniform along the object at the value
specified by Temp.
If PatternName is the name of a defined joint pattern, the material temperature
for the tendon object may vary from one end to the other. The material
temperature at each end of the object is equal to the specified temperature
multiplied by the pattern value at the joint at the end of the tendon object.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns material temperatures to tendon objects.
The function returns zero if the material temperatures are successfully
assigned, otherwise it returns a nonzero value.
VBA Example
Sub AssignTendonMatTemp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign material temperature


ret = SapModel.TendonObj.SetMatTemp("ALL", 50, , Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetMatTemp
SetProperty
Syntax
SapObject.SapModel.TendonObj.SetProperty
VB6 Procedure
Function SetProperty(ByVal name As String, ByVal PropName As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
PropName
This is None or the name of a tendon property to be assigned to the specified
tendon object(s). None means that no property is assigned to the tendon.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon
objects, and the Name item is ignored.
Remarks
This function assigns a tendon property to a tendon object.
The function returns zero if the tendon property is successfully assigned,
otherwise it returns a nonzero value.
VBA Example
Sub SetTendonProp()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'set tendon property


ret = SapModel.TendonObj.SetProperty(Name, "TEN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetProperty
SetSelected
Syntax
Sap2000.TendonObj.SetSelected
VB6 Procedure
Function SetSelected(ByVal Name As String, ByVal Selected As Boolean,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
Selected
This item is True if the specified tendon object is selected, otherwise it is False.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the selected status is set for the tendon object specified by
the Name item.
If this item is Group, the selected status is set for all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, the selected status is set for all selected tendon
objects, and the Name item is ignored.
Remarks
This function sets the selected status for a tendon object.
The function returns zero if the selected status is successfully set, otherwise it
returns a nonzero value.
VBA Example
Sub SetTendonObjectSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'set tendon object selected


ret = SapModel.TendonObj.SetSelected(Name, True)

'update view
ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
SetTCLimits
Syntax
SapObject.SapModel.TendonObj.SetTCLimits
VB6 Procedure
Function SetTCLimits(ByVal Name As String, ByVal LimitCompressionExists As
Boolean, ByVal LimitCompression As Double, ByVal LimitTensionExists As
Boolean, ByVal LimitTension As Double, Optional ByVal ItemType As eItemType
= Object) As Long
Parameters
Name
The name of an existing tendon object or group, depending on the value of the
ItemType item.
LimitCompressionExists
This item is True if a compression force limit exists for the tendon object.
LimitCompression
The compression force limit for the tendon object. [F]
LimitTensionExists
This item is True if a tension force limit exists for the tendon object.
LimitTension
The tension force limit for the tendon object. [F]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the tendon object specified by
the Name item.
If this item is Group, the assignment is made to all tendon objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected tendon objects
and the Name item is ignored.
Remarks
This function makes tension/compression force limit assignments to tendon
objects.
The function returns zero if the assignments are successfully applied, otherwise
it returns a nonzero value.
Note that the tension and compression limits are used in nonlinear analyses
only.
VBA Example
Sub AssignTendonTCLimits()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by points


ret = SapModel.TendonObj.AddByPoint("3", "9", Name)

'assign tension/compression limits


ret = SapModel.TendonObj.SetTCLimits(Name, True, 0, True,
100)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetTCLimits
SetTendonData
Syntax
SapObject.SapModel.TendonObj.SetTendonData
VB6 Procedure
Function SetTendonData(ByVal Name As String, ByVal NumberPoints As Long,
ByRef MyType() As Long, ByRef x() As Double, ByRef y() As Double, ByRef z()
As Double, Optional ByVal CSys As String = "Global") As Long
Parameters
Name
The name of a defined tendon object.
NumberPoints
The number of items used to define the tendon geometry.
MyType
This is an array of values that are 1, 3, 6, 7, 8, or 9, indicating the tendon
geometry definition parameter for the specified point.
1= Start of tendon
2= The segment preceding the point is linear
6= The specified point is the end of a parabola
7= The specified point is an intermediate point on a parabola
8= The specified point is the end of a circle
9= The specified point is an intermediate point on a parabola

The first point should always have a MyType value of 1. If it is not equal to 1, the
program uses 1 anyway.
MyType of 6 through 9 is based on using three points to calculate a parabolic or
circular arc. MyType 6 and 8 use the specified point and the two previous points
as the three points. MyType 7 and 9 use the specified point and the points just
before and after the specified point as the three points.
x
This is an array of the X (or local 1) coordinate of each point in the coordinate
system specified by CSys. [L]
y
This is an array of the Y (or local 2) coordinate of each point in the coordinate
system specified by CSys. [L]
z
This is an array of the Z (or local 3) coordinate of each point in the coordinate
system specified by CSys. [L]
CSys
This is the coordinate system in which the x, y and z coordinate parameters are
defined. It is Local or the name of a defined coordinate system.
Local means that the point coordinates are in the local system of the specified
tendon object with the origin assumed to be at the I-End of the tendon.
Remarks
This function assigns the tendon geometric definition parameters to a tendon
object.
The function returns zero if the tendon object is successfully defined, otherwise
it returns a nonzero value. If the tendon object is not successfully defined, it may
be deleted.
VBA Example
Sub SetTendonGeometryData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberPoints As Long
Dim MyType() As Long
Dim x() As Double
Dim y() As Double
Dim z() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add tendon object by coordinates


ret = SapModel.TendonObj.AddByCoord(-288, 0, 288, 288, 0,
288, Name)

'set tendon geometry


NumberPoints = 3
ReDim MyType(NumberPoints - 1)
ReDim x(NumberPoints - 1)
ReDim y(NumberPoints - 1)
ReDim z(NumberPoints - 1)
MyType(0) = 1
MyType(1) = 7
MyType(2) = 6
x(0) = 0: y(0) = 0
x(1) = 288: y(1) = -12
x(2) = 576: y(2) = 0
ret = SapModel.TendonObj.SetTendonData(Name, NumberPoints,
MyType, x, y, z, "Local")

'update view
ret = SapModel.View.RefreshView(0, False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
AddByCoord
AddByPoint
GetTendonData
GetTendonGeometry
CreateAnalysisModel
Syntax
SapObject.SapModel.Analyze.CreateAnalysisModel
VB6 Procedure
Function CreateAnalysisModel() As Long
Parameters
None
Remarks
This function creates the analysis model. If the analysis model is already
created and current, nothing is done.
The function returns zero if the analysis model is successfully created or it
already exists and is current, otherwise it returns a nonzero value.
It is not necessary to call this function before running an analysis. The analysis
model is automatically created, if necessary, when the model is run.
VBA Example
Sub CreateSapAnalysisModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'create the analysis model


ret = SapModel.Analyze.CreateAnalysisModel

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
RunAnalysis
DeleteResults
Syntax
SapObject.SapModel.Analyze.DeleteResults
VB6 Procedure
Function DeleteResults(ByVal Name As String, Optional ByVal All As Boolean =
False) As Long
Parameters
Name
The name of an existing load case that is to have its results deleted.
This item is ignored when the All item is True.
All
If this item is True, the results are deleted for all load cases, and the Name item
is ignored.
Remarks
This function deletes results for load cases.
The function returns zero if the results are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteLoadCaseResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'delete load case results


ret = SapModel.Analyze.DeleteResults("MODAL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetActiveDOF
Syntax
SapObject.SapModel.Analyze.GetActiveDOF
VB6 Procedure
Function GetActiveDOF(ByRef DOF() As Boolean) As Long
Parameters
DOF
This is an array of 6 boolean values, indicating if the specified model global
degree of freedom is active.
DOF(0) = UX
DOF(1) = UY
DOF(2) = UZ
DOF(3) = RX
DOF(4) = RY
DOF(5) = RZ
Remarks
This function retrieves the model global degrees of freedom.
The function returns zero if the degrees of freedom are successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetModelActiveDOF()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get model degrees of freedom


ret = SapModel.Analyze.GetActiveDOF(DOF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetActiveDOF
GetCaseStatus
Syntax
SapObject.SapModel.Analyze.GetCaseStatus
VB6 Procedure
Function GetCaseStatus(ByRef NumberItems As Long, ByRef CaseName() As
String, ByRef Status() As Long) As Long
Parameters
NumberItems
The number of load cases for which the status is reported.
CaseName
This is an array that includes the name of each analysis case for which the
status is reported.
Status
This is an array of that includes 1, 2, 3 or 4, indicating the load case status.
1= Not run
2= Could not start
3= Not finished
4= Finished
Remarks
This function retrieves the status for all load cases.
The function returns zero if the status is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStatusExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CaseName() As String
Dim Status() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set load case run flag


ret = SapModel.Analyze.SetRunCaseFlag("MODAL", False)

'run model (this will create the analysis model)


ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'get load case status


ret = SapModel.Analyze.GetCaseStatus(NumberItems, CaseName,
Status)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetRunCaseFlag
Syntax
SapObject.SapModel.Analyze.GetRunCaseFlag
VB6 Procedure
Function GetRunCaseFlag(ByRef NumberItems As Long, ByRef CaseName()
As String, ByRef Run() As Boolean) As Long
Parameters
NumberItems
The number of load cases for which the run flag is reported.
CaseName
This is an array that includes the name of each analysis case for which the run
flag is reported.
Run
This is an array of boolean values indicating if the specified load case is to be
run.
Remarks
This function retrieves the run flags for all analysis cases.
The function returns zero if the flags are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetRunCaseFlagExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim CaseName() As String
Dim Run() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set load case run flag


ret = SapModel.Analyze.SetRunCaseFlag("MODAL", False)

'get load case run flags


ret = SapModel.Analyze.GetRunCaseFlag(NumberItems, CaseName,
Run)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetRunCaseFlag
GetSolverOption_1
Syntax
SapObject.SapModel.Analyze.GetSolverOption
VB6 Procedure
Function GetSolverOption(ByRef SolverType As Long, ByRef
SolverProcessType As Long , ByRef Force32BitSolver As Boolean, ByRef
StiffCase As String) As Long
Parameters
SolverType
This is 0, 1 or 2, indicating the solver type.
0 = Standard solver
1 = Advanced solver
2 = Multi-threaded solver
SolverProcessType
This is 0, 1 or 2, indicating the process the analysis is run.
0 = Auto (program determined)
1 = GUI process
2 = Separate process
Force32BitSolver
This is True if the analysis is always run using 32-bit, even on 64-bit computers.
StiffCase
The name of the load case used when outputting the mass and stiffness
matrices to text files. If this item is blank, no matrices are output.
Remarks
This function retrieves the model solver options.
The function returns zero if the options are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetModelSolverOption() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim SolverType As Long
Dim SolverProcessType As Long
Dim Force32BitSolver As Boolean
Dim StiffCase As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set model solver options


ret = SapModel.Analyze.GetSolverOption_1(SolverType,
SolverProcessType , Force32BitSolver, StiffCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.2.
This function supersedes GetSolverOption.
See Also
SetSolverOption_1
ModifyUnDeformedGeometry
Syntax
SapObject.SapModel.Analyze.ModifyUnDeformedGeometry
VB6 Procedure
Function ModifyUnDeformedGeometry(ByVal CaseName As String, ByVal SF
As Double, Optional ByVal Stage As Long = -1, Optional ByVal Original As
Boolean = False) As Long
Parameters
CaseName
The name of the static load case from which displacements are obtained.
SF
The scale factor applied to the displacements.
Stage
This item applies only when the specified load case is a staged construction load
case. It is the stage number from which the displacements are obtained.
Specifying a -1 for this item means to use the last run stage.
Original
If this item is True, all other input items in this function are ignored and the
original undeformed geometry data is reinstated.
Remarks
This function modifies the undeformed geometry based on displacements
obtained from a specified load case.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub ModifyUnDeformedGeometryExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewBeam(2, 288, False)

'assign point object restraints


Redim Value(5)
For i = 0 to 5
Value(i) = True
Next i
ret = SapModel.PointObj.SetRestraint("1", Value)

'run model
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'modify undeformed geometry


ret = SapModel.Analyze.ModifyUnDeformedGeometry("DEAD", 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
ModifyUndeformedGeometryModeShape
Syntax
SapObject.SapModel.Analyze.ModifyUnDeformedGeometryModeShape
VB6 Procedure
Function ModifyUndeformedGeometryModeShape(ByVal CaseName As String,
ByVal Mode As Integer, ByVal MaxDisp As Double, ByVal Direction As Integer,
Optional ByVal Original As Boolean = False) As Long
Parameters
CaseName
The name of a modal or buckling load case.
Mode
The mode shape to consider.
MaxDisp
The maximum displacement to which the mode shape will be scaled.
Direction
The direction in which to apply the geometry modification.
Original
If this item is True, all other input items in this function are ignored and the
original undeformed geometry data is reinstated.
Remarks
This function modifies the undeformed geometry based on the shape of a
specified mode from a specified modal or buckling load case.
The function returns zero if it is successful; otherwise it returns a nonzero value.
VBA Example
Sub ModifyUndeformedGeometryModeShapeExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewBeam(2, 288, False)

'assign point object restraints


Redim Value(5)
For i = 0 to 5
Value(i) = True
Next i
ret = SapModel.PointObj.SetRestraint("1", Value)

'run model
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'modify undeformed geometry


ret =
SapModel.Analyze.ModifyUndeformedGeometryModeShape("MODAL", 1,
1.0, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.2.
See Also
RunAnalysis
Syntax
SapObject.SapModel.Analyze.RunAnalysis
VB6 Procedure
Function RunAnalysis() As Long
Parameters
None
Remarks
This function runs the analysis. The analysis model is automatically created as
part of this function.
The function returns zero if the analysis model is successfully run, otherwise it
returns a nonzero value.
IMPORTANT NOTE: Your model must have a file path defined before
running the analysis. If the model is opened from an existing file, a file path
is defined. If the model is created from scratch, the File.Save function must
be called with a file name before running the analysis. Saving the file
creates the file path.
VBA Example
Sub RunSapAnalysisModel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'save model
ret = SapModel.File.Save("C:\SapAPI\x.sdb")

'run model (this will create the analysis model)


ret = SapModel.Analyze.RunAnalysis

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
File.Save
BridgeObj.SetBridgeUpdateForAnalysisFlag
SetActiveDOF
Syntax
SapObject.SapModel.Analyze.SetActiveDOF
VB6 Procedure
Function SetActiveDOF(ByRef DOF() As Boolean) As Long
Parameters
DOF
This is an array of 6 boolean values, indicating if the specified model global
degree of freedom is active.
DOF(0) = UX
DOF(1) = UY
DOF(2) = UZ
DOF(3) = RX
DOF(4) = RY
DOF(5) = RZ
Remarks
This function sets the model global degrees of freedom.
The function returns zero if the degrees of freedom are successfully set;
otherwise it returns a nonzero value.
VBA Example
Sub SetModelActiveDOF()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim DOF() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set model degrees of freedom


ReDim DOF(5)
DOF(0) = True
DOF(1) = True
DOF(2) = True
ret = SapModel.Analyze.SetActiveDOF(DOF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetActiveDOF
SetRunCaseFlag
Syntax
SapObject.SapModel.Analyze.SetRunCaseFlag
VB6 Procedure
Function SetRunCaseFlag(ByVal Name As String, ByVal Run As Boolean,
Optional ByVal All As Boolean = False) As Long
Parameters
Name
The name of an existing load case that is to have its run flag set.
This item is ignored when the All item is True.
Run
If this item is True, the specified load case is to be run.
All
If this item is True, the run flag is set as specified by the Run item for all load
cases, and the Name item is ignored.
Remarks
This function sets the run flag for load cases.
The function returns zero if the flag is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetRunCaseFlagExample()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set load case run flag


ret = SapModel.Analyze.SetRunCaseFlag("MODAL", False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetRunCaseFlag
SetSolverOption_1
Syntax
SapObject.SapModel.Analyze.SetSolverOption_1
VB6 Procedure
Function SetSolverOption(ByVal SolverType As Long, ByVal SolverProcessType
As Long, ByVal Force32BitSolver As Boolean, Optional ByVal StiffCase As
String = "") As Long
Parameters
SolverType
This is 0, 1 or 2, indicating the solver type.
0 = Standard solver
1 = Advanced solver
2 = Multi-threaded solver
SolverProcessType
This is 0, 1 or 2, indicating the process the analysis is run.
0 = Auto (program determined)
1 = GUI process
2 = Separate process
Force32BitSolver
This is True if the analysis is always run using 32-bit, even on 64-bit computers.
StiffCase
The name of the load case used when outputting the mass and stiffness
matrices to text files If this item is blank, no matrices are output.
Remarks
This function sets the model solver options.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetModelSolverOption() 'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New SAP2000.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set model solver options


ret = SapModel.Analyze.SetSolverOption_1(1, 1, True, "DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.2
This function supersedes SetSolverOption.
See Also
GetSolverOption_1
DeselectAllCasesAndCombosForOutput
Syntax
SapObject.SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
VB6 Procedure
Function DeselectAllCasesAndCombosForOutput() As Long
Parameters
None
Remarks
The function deselects all load cases and response combinations for output.
The function returns zero if the cases and combos are successfully deselected,
otherwise it returns a nonzero value.
VBA Example
Sub DeselectCasesAndCombos()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'deselect all cases and combos


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetCaseSelectedForOutput
GetComboSelectedForOutput
SetCaseSelectedForOutput
SetComboSelectedForOutput
GetCaseSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.GetCaseSelectedForOutput
VB6 Procedure
Function GetCaseSelectedForOutput(ByVal Name As String, ByRef Selected As
Boolean) As Long
Parameters
Name
The name of an existing load case.
Selected
This item is True if the specified load case is selected for output.
Remarks
This function checks if an load case is selected for output.
The function returns 0 if the selected flag is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetLoadCaseSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'check if case is selected


ret =
SapModel.Results.Setup.GetCaseSelectedForOutput("DEAD", Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
DeselectAllCasesAndCombosForOutput
GetComboSelectedForOutput
SetCaseSelectedForOutput
SetComboSelectedForOutput
GetComboSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.GetComboSelectedForOutput
VB6 Procedure
Function GetComboSelectedForOutput(ByVal Name As String, ByRef Selected
As Boolean) As Long
Parameters
Name
The name of an existing load combination.
Selected
This item is True if the specified load combination is selected for output.
Remarks
This function checks if a load combination is selected for output.
The function returns 0 if the selected flag is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetComboSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 7-002.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'check if combo is selected


ret =
SapModel.Results.Setup.GetComboSelectedForOutput("COMB1",
Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
DeselectAllCasesAndCombosForOutput
GetCaseSelectedForOutput
SetCaseSelectedForOutput
SetComboSelectedForOutput
GetOptionBaseReactLoc
Syntax
SapObject.SapModel.Results.Setup.GetOptionBaseReactLoc
VB6 Procedure
Function GetOptionBaseReactLoc(ByRef gx As Double, ByRef gy As Double,
ByRef gz As Double) As Long
Parameters
gx, gy, gz
The global coordinates of the location at which the base reactions are reported.
Remarks
This function retrieves the global coordinates of the location at which the base
reactions are reported.
The function returns 0 if the coordinates are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetBaseReactLoc()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim gx As Double, gy As Double, gz As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create a SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get base reaction location


ret = SapModel.Results.Setup.GetOptionBaseReactLoc(gx, gy,
gz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionBaseReactLoc
GetOptionBucklingMode
Syntax
SapObject.SapModel.Results.Setup.GetOptionBucklingMode
VB6 Procedure
Function GetOptionBucklingMode(ByRef BuckModeStart As Long, ByRef
BuckModeEnd As Long, ByRef BuckModeAll As Boolean) As Long
Parameters
BuckModeStart
The first buckling mode for which the buckling factor is reported when the
BuckModeAll item is False.
BuckModeEnd
The last buckling mode for which the buckling factor is reported when the
BuckModeAll item is False.
BuckModeAll
If this item is True, buckling factors are reported for all calculated buckling
modes. If it is False, buckling factors are reported for the buckling modes
indicated by the BuckModeStart and BuckModeEnd items.
Remarks
This function retrieves the buckling modes for which buckling factors are
reported.
The function returns 0 if the modes are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetBucklingModeData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim BuckModeStart As Long
Dim BuckModeEnd As Long
Dim BuckModeAll As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get buckling mode data


ret =
SapModel.Results.Setup.GetOptionBucklingMode(BuckModeStart,
BuckModeEnd, BuckModeAll)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionBucklingMode
GetOptionDirectHist
Syntax
SapObject.SapModel.Results.Setup.GetOptionDirectHist
VB6 Procedure
Function GetOptionDirectHist(ByRef Value As Long) As Long
Parameters
Value
This item is either 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function retrieves the output option for direct history results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetDirectHistOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionDirectHist(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionDirectHist
GetOptionModalHist
Syntax
SapObject.SapModel.Results.Setup.GetOptionModalHist
VB6 Procedure
Function GetOptionModalHist(ByRef Value As Long) As Long
Parameters
Value
This item is either 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function retrieves the output option for modal history results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetModalHistOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionModalHist(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionModalHist
GetOptionModeShape
Syntax
SapObject.SapModel.Results.Setup.GetOptionModeShape
VB6 Procedure
Function GetOptionModeShape(ByRef ModeShapeStart As Long, ByRef
ModeShapeEnd As Long, ByRef ModeShapesAll As Boolean) As Long
Parameters
ModeShapeStart
The first mode for which results are reported when the ModeShapesAll item is
False.
ModeShapeEnd
The last mode for which results are reported when the ModeShapesAll item is
False.
ModeShapesAll
If this item is True, results are reported for all calculated modes. If it is False,
results are reported for the modes indicated by the ModeShapeStart and
ModeShapeEnd items.
Remarks
This function retrieves the modes for which mode shape results are reported.
The function returns 0 if the modes are successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetModeShapeData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ModeShapeStart As Long
Dim ModeShapeEnd As Long
Dim ModeShapesAll As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get buckling mode data


ret =
SapModel.Results.Setup.GetOptionModeShape(ModeShapeStart,
ModeShapeEnd, ModeShapesAll)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionModeShape
GetOptionMultiStepStatic
Syntax
SapObject.SapModel.Results.Setup.GetOptionMultiStepStatic
VB6 Procedure
Function GetOptionMultiStepStatic(ByRef Value As Long) As Long
Parameters
Value
This item is either 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function retrieves the output option for multistep static linear results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetMultiStepStaticOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionMultiStepStatic(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionMultiStepStatic
GetOptionMultiValuedCombo
Syntax
SapObject.SapModel.Results.Setup.GetOptionMultiValuedCombo
VB6 Procedure
Function GetOptionMultiValuedCombo(ByRef Value As Long) As Long
Parameters
Value
This item is either 1, 2, or 3
1 = Envelopes
2 = Multiple values, if possible
3 = Correspondence
Remarks
This function retrieves the output option for multi-valued load combination
results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetMultiValuedComboOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret =
SapModel.Results.Setup.GetOptionMultiValuedCombo(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added option for correspondence in version 16.02.
See Also
SetOptionMultiValuedCombo
GetOptionNLStatic
Syntax
SapObject.SapModel.Results.Setup.GetOptionNLStatic
VB6 Procedure
Function GetOptionNLStatic(ByRef Value As Long) As Long
Parameters
Value
This item is either 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function retrieves the output option for nonlinear static results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetNonlinearStaticOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionNLStatic(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionNLStatic
GetOptionPSD
Syntax
SapObject.SapModel.Results.Setup.GetOptionPSD
VB6 Procedure
Function GetOptionPSD(ByRef Value As Long) As Long
Parameters
Value
This item is either 1 or 2
1 = RMS
2 = sqrt(PSD)
Remarks
This function retrieves the output option for power spectral density results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetPSDOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionPSD(Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionPSD
GetOptionSteadyState
Syntax
SapObject.SapModel.Results.Setup.GetOptionSteadyState
VB6 Procedure
Function GetOptionSteadyState(ByRef Value As Long, ByRef
SteadyStateOption As Long) As Long
Parameters
Value
This item is either 1 or 2
1 = Envelopes
2 = At Frequencies
SteadyStateOption
This item is 1, 2 or 3
1 = In and Out of Phase
2 = Magnitude
3 = All
Remarks
This function retrieves the output option for steady state results.
The function returns 0 if the output option is successfully retrieved, otherwise it
returns nonzero.
VBA Example
Sub GetSteadyStateOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Long
Dim SteadyStateOption As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'get output option


ret = SapModel.Results.Setup.GetOptionSteadyState(Value,
SteadyStateOption)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetOptionSteadyState
GetSectionCutSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.GetSectionCutSelectedForOutput
VB6 Procedure
Function GetSectionCutSelectedForOutput (ByVal Name As String, ByRef
Selected As Boolean) AsLong
Parameters
Name
The name of a defined section cut.
Selected
This item is True if the section cut is to be selected for output, or False if the
section cut is not selected for output.
Remarks
This function retrieves whether a defined section cut is selected for output.
The function returns 0 if the selected flag is successfully retrieved, otherwise it
returns nonzero.
Please note that all section cuts are, by default, selected for output when they
are created.
VBA Example
Sub SelectAllSectionCuts()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'Check if the section cut is selected for output


ret =
SapModel.Results.Setup.GetSectionCutSelectedForOutput("SCut
Selected)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.2.
See Also
SelectAllSectionCutsForOutput
SetSectionCutSelectedForOutput
SelectAllSectionCutsForOutput
Syntax
SapObject.SapModel.Results.Setup.SelectAllSectionCutsForOutput
VB6 Procedure
Function SelectAllSectionCutsForOutput (Selected as Boolean) AsLong
Parameters
Selected
This item is True if all section cuts are to be selected for output, or False if no
section cuts are to be selected for output.
Remarks
This function selects or deselects all section cuts for output.
The function returns 0 if the selected flag is successfully set, otherwise it returns
nonzero.
Please note that all section cuts are, by default, selected for output when they
are created.
VBA Example
Sub SelectAllSectionCuts()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'Deselect all section cuts for output


ret =
SapModel.Results.Setup.SelectAllSectionCutsForOutput(False)

'Select all section cuts for output


ret =
SapModel.Results.Setup.SelectAllSectionCutsForOutp

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.2.
See Also
GetSectionCutSelectedForOutput
SetSectionCutSelectedForOutput
SetCaseSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.SetCaseSelectedForOutput
VB6 Procedure
Function SetCaseSelectedForOutput(ByVal Name As String, Optional ByVal
Selected As Boolean = True) As Long
Parameters
Name
The name of an existing load case.
Selected
This item is True if the specified load case is to be selected for output, otherwise
it is False.
Remarks
This function sets an load case selected for output flag.
The function returns 0 if the selected flag is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetLoadCaseSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'deselect all cases and combos


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case selected for output


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
DeselectAllCasesAndCombosForOutput
GetCaseSelectedForOutput
GetComboSelectedForOutput
SetComboSelectedForOutput
SetComboSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.SetComboSelectedForOutput
VB6 Procedure
Function SetComboSelectedForOutput(ByVal Name As String, Optional ByVal
Selected As Boolean = True) As Long
Parameters
Name
The name of an existing load combination.
Selected
This item is True if the specified load combination is to be selected for output,
otherwise it is False.
Remarks
This function sets a load combination selected for output flag.
The function returns 0 if the selected flag is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetComboSelected()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 7-002.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'deselect all cases and combos


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set combo selected for output


ret =
SapModel.Results.Setup.SetComboSelectedForOutput("COMB1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
DeselectAllCasesAndCombosForOutput
GetCaseSelectedForOutput
GetComboSelectedForOutput
SetCaseSelectedForOutput
SetOptionBaseReactLoc
Syntax
SapObject.SapModel.Results.Setup.SetOptionBaseReactLoc
VB6 Procedure
Function SetOptionBaseReactLoc(ByVal gx As Double, ByVal gy As Double,
ByVal gz As Double) As Long
Parameters
gx, gy, gz
The global coordinates of the location at which the base reactions are reported.
Remarks
This function sets the global coordinates of the location at which the base
reactions are reported.
The function returns 0 if the coordinates are successfully set, otherwise it
returns nonzero.
VBA Example
Sub SetBaseReactLoc()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim gx As Double, gy As Double, gz As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set base reaction location


ret = SapModel.Results.Setup.SetOptionBaseReactLoc(0, 0, 0)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionBaseReactLoc
SetOptionBucklingMode
Syntax
SapObject.SapModel.Results.Setup.SetOptionBucklingMode
VB6 Procedure
Function SetOptionBucklingMode(ByVal BuckModeStart As Long, ByVal
BuckModeEnd As Long, Optional ByVal BuckModeAll As Boolean = False) As
Long
Parameters
BuckModeStart
The first buckling mode for which the buckling factor is reported when the
BuckModeAll item is False.
BuckModeEnd
The last buckling mode for which the buckling factor is reported when the
BuckModeAll item is False.
BuckModeAll
If this item is True, buckling factors are reported for all calculated buckling
modes. If it is False, buckling factors are reported for the buckling modes
indicated by the BuckModeStart and BuckModeEnd items.
Remarks
This function sets the buckling modes for which buckling factors are reported.
The function returns 0 if the modes are successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetBucklingModeData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim BuckModeStart As Long
Dim BuckModeEnd As Long
Dim BuckModeAll As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set buckling mode data


ret = SapModel.Results.Setup.SetOptionBucklingMode(1, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionBucklingMode
SetOptionDirectHist
Syntax
SapObject.SapModel.Results.Setup.SetOptionDirectHist
VB6 Procedure
Function SetOptionDirectHist(ByVal Value As Long) As Long
Parameters
Value
This item is 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function sets the output option for direct history results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetDirectHistOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionDirectHist(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionDirectHist
SetOptionModalHist
Syntax
SapObject.SapModel.Results.Setup.SetOptionModalHist
VB6 Procedure
Function SetOptionModalHist(ByVal Value As Long) As Long
Parameters
Value
This item is 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function sets the output option for modal history results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetModalHistOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionModalHist(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionModalHist
SetOptionModeShape
Syntax
SapObject.SapModel.Results.Setup.SetOptionModeShape
VB6 Procedure
Function SetOptionModeShape(ByVal ModeShapeStart As Long, ByVal
ModeShapeEnd As Long, Optional ByVal ModeShapesAll As Boolean = False)
As Long
Parameters
ModeShapeStart
The first mode for which results are reported when the ModeShapesAll item is
False.
ModeShapeEnd
The last mode for which results are reported when the ModeShapesAll item is
False.
ModeShapesAll
If this item is True, results are reported for all calculated modes. If it is False,
results are reported for the modes indicated by the ModeShapeStart and
ModeShapeEnd items.
Remarks
This function sets the modes for which mode shape results are reported.
The function returns 0 if the modes are successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetModeShapeData()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set mode shape data


ret = SapModel.Results.Setup.SetOptionModeShape(1, 3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionModeShape
SetOptionMultiStepStatic
Syntax
SapObject.SapModel.Results.Setup.SetOptionMultiStepStatic
VB6 Procedure
Function SetOptionMultiStepStatic(ByVal Value As Long) As Long
Parameters
Value
This item is 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function sets the output option for multistep static linear results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetMultiStepStaticOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionMultiStepStatic(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionMultiStepStatic
SetOptionMultiValuedCombo
Syntax
SapObject.SapModel.Results.Setup.SetOptionMultiValuedCombo
VB6 Procedure
Function SetOptionMultiValuedCombo(ByVal Value As Long) As Long
Parameters
Value
This item is either 1, 2, or 3.
1 = Envelopes
2 = Multiple values, if possible
3 = Correspondence
Remarks
This function sets the output option for multi-valued load combination results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetMultiValuedComboOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionMultiValuedCombo(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added option for correspondence in version 16.02.
See Also
GetOptionMultiValuedCombo
SetOptionNLStatic
Syntax
SapObject.SapModel.Results.Setup.SetOptionNLStatic
VB6 Procedure
Function SetOptionNLStatic(ByVal Value As Long) As Long
Parameters
Value
This item is 1, 2 or 3
1 = Envelopes
2 = Step-by-Step
3 = Last Step
Remarks
This function sets the output option for nonlinear static results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetNonlinearStaticOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionNLStatic(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionNLStatic
SetOptionPSD
Syntax
SapObject.SapModel.Results.Setup.SetOptionPSD
VB6 Procedure
Function SetOptionPSD(ByVal Value As Long) As Long
Parameters
Value
This item is either 1 or 2
1 = RMS
2 = sqrt(PSD)
Remarks
This function sets the output option for power spectral density results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetPSDOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionPSD(1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionPSD
SetOptionSteadyState
Syntax
SapObject.SapModel.Results.Setup.SetOptionSteadyState
VB6 Procedure
Function SetOptionSteadyState(ByVal Value As Long, ByVal SteadyStateOption
As Long) As Long
Parameters
Value
This item is either 1 or 2
1 = Envelopes
2 = At Frequencies
SteadyStateOption
This item is 1, 2 or 3
1 = In and Out of Phase
2 = Magnitude
3 = All
Remarks
This function sets the output option for steady state results.
The function returns 0 if the output option is successfully set, otherwise it returns
nonzero.
VBA Example
Sub SetSteadyStateOutputOption()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set output option


ret = SapModel.Results.Setup.SetOptionSteadyState(1, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetOptionSteadyState
SetSectionCutSelectedForOutput
Syntax
SapObject.SapModel.Results.Setup.SetSectionCutSelectedForOutput
VB6 Procedure
Function SetSectionCutSelectedForOutput (ByVal Name As String, ByVal
Selected As Boolean) AsLong
Parameters
Name
The name of a defined section cut.
Selected
This item is True if the section cut is to be selected for output, or False if no
section cut should not be selected for output.
Remarks
This function selects or deselects a defined section cut for output.
The function returns 0 if the selected flag is successfully set, otherwise it returns
nonzero.
Please note that all section cuts are, by default, selected for output when they
are created.
VBA Example
Sub SelectAllSectionCuts()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 288)

'define new group


ret = SapModel.GroupDef.SetGroup("Group1")

'add objects to group


ret = SapModel.PointObj.SetGroupAssign("1", "Group1")
ret = SapModel.FrameObj.SetGroupAssign("1", "Group1")

'define section cut


ret = SapModel.SectCut.SetByGroup("SCut1", "Group1", 1)

'Deselect section cut for output


ret =
SapModel.Results.Setup.SetSectionCutSelectedForOutput("SCut
False)

'Select section cut for output


ret =
SapModel.Results.Setup.SetSectionCutSelectedForOut
True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing

End Sub
Release Notes
Initial release in version 16.0.2.
See Also
GetSectionCutSelectedForOutput
SelectAllSectionCutsForOutput
AreaForceShell
Syntax
SapObject.Sap2000.Results.AreaForceShell
VB6 Procedure
Function AreaForceShell(ByVal name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F11() As
Double, ByRef F22() As Double, ByRef F12() As Double, ByRef FMax() As
Double, ByRef FMin() As Double, ByRef FAngle() As Double, ByRef FVM() As
Double, ByRef M11() As Double, ByRef M22() As Double, ByRef M12() As
Double, ByRef MMax() As Double, ByRef MMin() As Double, ByRef MAngle()
As Double, ByRef V13() As Double, ByRef V23() As Double, ByRef VMax() As
Double, ByRef VAngle() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the area elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the area element specified by the
Name item.
If this item is GroupElm, the result request is for the area elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for area elements
corresponding to all selected area objects, and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the area element name associated with each
result.
PointElm
This is an array that includes the name of the point element where the results
are reported.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F11
The area element internal F22 membrane direct force per length reported in the
area element local coordinate system. [F/L]
F22
The area element internal F22 membrane direct force per length reported in the
area element local coordinate system. [F/L]
F12
The area element internal F12 membrane shear force per length reported in the
area element local coordinate system. [F/L]
FMax
The maximum principal membrane force per length. [F/L]
FMin
The minimum principal membrane force per length. [F/L]
FAngle
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of the maximum principal
membrane force. [deg]
FVM
The area element internal Von Mises membrane force per length. [F/L]
M11
The area element internal M11 plate bending moment per length reported in the
area element local coordinate system. This item is only reported for area
elements with properties that allow plate bending behavior.
M22
The area element internal M22 plate bending moment per length reported in the
area element local coordinate system. This item is only reported for area
elements with properties that allow plate bending behavior. [FL/L]
M12
The area element internal M12 plate twisting moment per length reported in the
area element local coordinate system. This item is only reported for area
elements with properties that allow plate bending behavior. [FL/L]
MMax
The maximum principal plate moment per length. This item is only reported for
area elements with properties that allow plate bending behavior. [FL/L]
MMin
The minimum principal plate moment per length. This item is only reported for
area elements with properties that allow plate bending behavior. [FL/L]
MAngle
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of the maximum principal plate
moment. This item is only reported for area elements with properties that allow
plate bending behavior. [deg]
V13
The area element internal V13 plate transverse shear force per length reported
in the area element local coordinate system. This item is only reported for area
elements with properties that allow plate bending behavior. [F/L]
V23
The area element internal V23 plate transverse shear force per length reported
in the area element local coordinate system. This item is only reported for area
elements with properties that allow plate bending behavior. [F/L]
VMax
The maximum plate transverse shear force. It is equal to the square root of the
sum of the squares of V13 and V23. This item is only reported for area elements
with properties that allow plate bending behavior. [F/L]
VAngle
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of Vmax. This item is only
reported for area elements with properties that allow plate bending behavior.
[deg]
Remarks
This function reports the area forces for the specified area elements that are
assigned shell section properties (not plane or asolid properties). Note that the
forces reported are per unit of in-plane length.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetAreaForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F11() As Double
Dim F22() As Double
Dim F12() As Double
Dim FMax() As Double
Dim FMin() As Double
Dim FAngle() As Double
Dim FVM() As Double
Dim M11() As Double
Dim M22() As Double
Dim M12() As Double
Dim MMax() As Double
Dim MMin() As Double
Dim MAngle() As Double
Dim V13() As Double
Dim V23() As Double
Dim VMax() As Double
Dim VAngle() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.NewWall(6, 48, 6, 48)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get area forces for area object "1"


ret = SapModel.Results.AreaForceShell("1", Object,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F11, F22, F12, FMax, FMin, FAngle, FVM, M11, M22, M12, MMax, MMin,
MAngle, V13, V23, VMax, VAngle)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaStressShell
AreaStressShellLayered
AreaJointForcePlane
AreaJointForcePlane
Syntax
SapObject.Sap2000.Results.AreaJointForcePlane
VB6 Procedure
Function AreaJointForcePlane(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F1() As
Double, ByRef F2() As Double, ByRef F3() As Double, ByRef M1) As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the plane elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the plane element specified by the
Name item.
If this item is GroupElm, the result request is for the plane elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for plane elements
corresponding to all selected area objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the plane element name associated with each
result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the joint force components in the
point element local axes directions. [F]
M1, M2, M3
These are one dimensional arrays that include the joint moment components
about the point element local axes. [FL]
Remarks
This function reports the area joint forces for the point elements at each corner
of the specified plane elements that have plane-type or asolid-type properties
(not shell).
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetPlaneJointForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MEMBRANE")

'get plane joint forces for area object "1"


ret = SapModel.Results.AreaJointForcePlane("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F1, F2, F3, M1, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaStressPlane
AreaJointForceShell
Syntax
SapObject.Sap2000.Results.AreaJointForceShell
VB6 Procedure
Function AreaJointForceShell(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F1() As
Double, ByRef F2() As Double, ByRef F3() As Double, ByRef M1() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the area elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the area element specified by the
Name item.
If this item is GroupElm, the result request is for the area elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for area elements
corresponding to all selected area objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the area element name associated with each
result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the joint force components in the
point element local axes directions. [F]
M1, M2, M3
These are one dimensional arrays that include the joint moment components
about the point element local axes. [FL]
Remarks
This function reports the area joint forces for the point elements at each corner
of the specified area elements that have shell-type properties (not plane or
asolid).
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetAreaJointForceShells()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(6, 48, 6, 48)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get area joint forces for area object "1"


ret = SapModel.Results.AreaJointForceShell("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F1, F2, F3, M1, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaForceShell
AreaStressShell
AreaStressShellLayered
AreaStressPlane
Syntax
SapObject.Sap2000.Results.AreaStressPlane
VB6 Procedure
Function AreaStressPlane(ByVal name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef S11() As
Double, ByRef S22() As Double, ByRef S33() As Double, ByRef S12() As
Double, ByRef SMax() As Double, ByRef SMin() As Double, ByRef SAngle() As
Double, ByRef SVM() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the plane elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the plane element specified by the
Name item.
If this item is GroupElm, the result request is for the plane elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for plane elements
corresponding to all selected area objects, and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the plane element name associated with each
result.
PointElm
This is an array that includes the name of the point element where the results
are reported.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
S11, S22, S33, S12
The plane element internal S11, S22, S33 and S12 stresses, at the specified
point element location, reported in the area element local coordinate system.
[F/L2]
SMax, SMin
The plane element maximum and minimum principal stresses at the specified
point element location. [F/L2]
SAngle
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the plane element local 1 axis to the direction of the maximum principal
stress. [deg]
SVM
The plane element internal Von Mises stress at the specified point element.
[F/L2]
Remarks
This function reports the stresses for the specified plane elements that are
assigned plane or asolid section properties (not shell properties).
The function returns zero if the stresses are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetPlaneStresses()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim S11() As Double
Dim S22() As Double
Dim S33() As Double
Dim S12() As Double
Dim SMax() As Double
Dim SMin() As Double
Dim SAngle() As Double
Dim SVM() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 3-001-
incomp.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MEMBRANE")

'get plane stresses for area object "1"


ret = SapModel.Results.AreaStressPlane("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
S11, S22, S33, S12, SMax, SMin, SAngle, SVM)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaJointForcePlane
AreaStressShell
Syntax
SapObject.SapModel.Results.AreaStressShell
VB6 Procedure
Function AreaStressShell(ByVal name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef S11Top() As
Double, ByRef S22Top() As Double, ByRef S12Top() As Double, ByRef
SMaxTop() As Double, ByRef SMinTop() As Double, ByRef SAngleTop() As
Double, ByRef SVMTop() As Double, ByRef S11Bot() As Double, ByRef
S22Bot() As Double, ByRef S12Bot() As Double, ByRef SMaxBot() As Double,
ByRef SMinBot() As Double, ByRef SAngleBot() As Double, ByRef SVMBot()
As Double, ByRef S13Avg() As Double, ByRef S23Avg() As Double, ByRef
SMaxAvg() As Double, ByRef SAngleAvg() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the area elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the area element specified by the
Name item.
If this item is GroupElm, the result request is for the area elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for area elements
corresponding to all selected area objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the area element name associated with each
result.
PointElm
This is an array that includes the name of the point element where the results
are reported.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
S11Top, S22Top, S12Top, S11Bot, S22Bot, S12Bot
The area element internal S11, S22 and S12 stresses, at the top or bottom of
the specified area element, at the specified point element location, reported in
the area element local coordinate system. [F/L2]
SMaxTop, SMinTop, SMaxBot, SMinBot
The area element maximum and minimum principal stresses, at the top or
bottom of the specified area element, at the specified point element location.
[F/L2]
SAngleTop, SAngleBot
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of the maximum principal stress,
at the top or bottom of the specified area element. [deg]
SVMTop, SVMBot
The area element internal top or bottom Von Mises stress at the specified point
element. [F/L2]
S13Avg, S23Avg
The area element average S13 or S23 out-of-plane shear stress at the
specified point element. These items are only reported for area elements with
properties that allow plate bending behavior. [F/L2]
SMaxAvg
The area element maximum average out-of-plane shear stress. It is equal to the
square root of the sum of the squares of S13Avg and S23Avg. This item is only
reported for area elements with properties that allow plate bending behavior.
[F/L2]
SAngleAvg
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of SMaxAvg. This item is only
reported for area elements with properties that allow plate bending behavior.
[deg]
Remarks
This function reports the area stresses for the specified area elements that are
assigned shell section properties (not plane or asolid properties). Stresses are
reported at each point element associated with the area element.
The function returns zero if the stresses are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetAreaStressesShell()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim S11Top() As Double
Dim S22Top() As Double
Dim S12Top() As Double
Dim SMaxTop() As Double
Dim SMinTop() As Double
Dim SAngleTop() As Double
Dim SVMTop() As Double
Dim S11Bot() As Double
Dim S22Bot() As Double
Dim S12Bot() As Double
Dim SMaxBot() As Double
Dim SMinBot() As Double
Dim SAngleBot() As Double
Dim SVMBot() As Double
Dim S13Avg() As Double
Dim S23Avg() As Double
Dim SMaxAvg() As Double
Dim SAngleAvg() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.NewWall(6, 48, 6, 48)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get area stresses for area object "1"


ret = SapModel.Results.AreaStressShell("1", Object,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
S11Top, S22Top, S12Top, SMaxTop, SMinTop, SAngleTop, SVMTop,
S11Bot, S22Bot, S12Bot, SMaxBot, SMinBot, SAngleBot, SVMBot,
S13Avg, S23Avg, SMaxAvg, SAngleAvg)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaJointForceShell
AreaStressShellLayered
AreaJointForceShell
AreaStressShellLayered
Syntax
SapObject.Sap2000.Results.AreaStressShellLayered
VB6 Procedure
Function AreaStressShellLayered(ByVal name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef Layer() As String, ByRef IntPtNum() As Long, ByRef
IntPtLoc() As Double, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef S11() As
Double, ByRef S22() As Double, ByRef S12() As Double, ByRef SMax() As
Double, ByRef SMin() As Double, ByRef SAngle() As Double, ByRef SVM() As
Double, ByRef S13Avg() As Double, ByRef S23Avg() As Double, ByRef
SMaxAvg() As Double, ByRef SAngleAvg() As Double) As Long
Parameters
Name
The name of an existing area object, area element or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the area elements
corresponding to the area object specified by the Name item.
If this item is Element, the result request is for the area element specified by the
Name item.
If this item is GroupElm, the result request is for the area elements
corresponding to all area objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for area elements
corresponding to all selected area objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the area object name associated with each result,
if any.
Elm
This is an array that includes the area element name associated with each
result.
Layer
This is an array that includes the layer name associated with each result.
IntPtNum
This is an array that includes the integration point number within the specified
layer of the area element.
IntPtLoc
This is an array that includes the integration point relative location within the
specified layer of the area element. The location is between -1 (bottom of layer)
and +1 (top of layer), inclusive. The midheight of the layer is at a value of 0.
PointElm
This is an array that includes the name of the point element where the results
are reported.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
S11, S22, S12
The area element internal S11, S22 and S12 stresses, at the specified point
element location, for the specified layer and layer integration point, reported in
the area element local coordinate system. [F/L2]
SMax, SMin
The area element maximum and minimum principal stresses, at the specified
point element location, for the specified layer and layer integration point. [F/L2]
SAngle
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of the maximum principal stress.
[deg]
SVM
The area element internal Von Mises stress at the specified point element
location, for the specified layer and layer integration point. [F/L2]
S13Avg, S23Avg
The area element average S13 or S23 out-of-plane shear stress at the
specified point element location, for the specified layer and layer integration
point. [F/L2]
SMaxAvg
The area element maximum average out-of-plane shear stress for the specified
layer and layer integration point. It is equal to the square root of the sum of the
squares of S13Avg and S23Avg. [F/L2]
SAngleAvg
The angle measured counter clockwise (when the local 3 axis is pointing toward
you) from the area local 1 axis to the direction of SMaxAvg. [deg]
Remarks
This function reports the area stresses for the specified area elements that are
assigned layered shell section properties.
The function returns zero if the stresses are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Similar to AreaStressShell

'get area stresses for area object "1"


ret = SapModel.Results.AreaStressShellLayered("1", Object,
NumberResults, Obj, Elm, Layer, IntPtNum, IntPtLoc, PointElm,
LoadCase, StepType, StepNum, S11, S22, S12, SMax, SMin, SAngle,
SVM, S13Avg, S23Avg, SMaxAvg, SAngleAvg)
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
AreaForceShell
AreaStressShell
AreaJointForceShell
AssembledJointMass_1
Syntax
SapObject.SapModel.Results.AssembledJointMass_1
VB6 Procedure
Function AssembledJointMass_1(ByVal MassSourceName As String, ByVal
Name As String, ByVal ItemTypeElm As eItemTypeElm, ByRef PointElm() As
String, ByRef MassSource() As String, ByRef U1() As Double, ByRef U2() As
Double, ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double,
ByRef R3() As Double) As Long
Parameters
MassSource Name
The name of an existing mass source definition. If this value is left empty or
unrecognized, data for all mass sources will be returned.
Name
The name of an existing point element or group of objects, depending on the
value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Type for Elements for more information.
NumberResults
The total number of results returned by the program.
PointElm
This is an array that includes the point element name associated with each
result.
Mass Source
This is an array that includes the mass source name associated with each
result.
U1, U2, U3
These are one dimensional arrays that include the translational mass in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [M]
R1, R2, R3
These are one dimensional arrays that include the rotational mass moment of
inertia about the point element local 1, 2 and 3 axes, respectively, for each
result. [ML2]
Remarks
This function reports the assembled joint masses for the specified point
elements.
The function returns zero if the masses are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetAssembledJointMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim PointElm() As String
Dim MassSource() As String
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double
Dim LoadPat(0) As String
Dim SF(0) As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)
'add new mass source andmake it the default mass source
LoadPat(0)="DEAD"
SF(0)=1.25
ret=SapModel.SourceMass.SetMassSource("MyMassSource", True,
True, True, True, 1, LoadPat, SF)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'get assembled joint mass for all point elements


ret = SapModel.Results.AssembledJointMass_1("","ALL",
GroupElm, NumberResults, PointElm, MassSource, U1, U2, U3, R1, R2,
R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in v19.1.0.
This function supersedes AssembledJointMass
See Also
BaseReact
Syntax
SapObject.SapModel.Results.BaseReact
VB6 Procedure
Function BaseReact(ByRef NumberResults As Long, ByRef LoadCase() As
String, ByRef StepType() As String, ByRef StepNum() As Double, ByRef Fx() As
Double, ByRef Fy() As Double, ByRef Fz() As Double, ByRef Mx() As Double,
ByRef My() As Double, ByRef Mz() As Double, ByRef gx as Double, ByRef gy
as Double, ByRef gz as Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
Fx, Fy, Fz
These are one dimensional arrays that include the base reaction forces in the
global X, Y and Z directions, respectively, for each result. [F]
Mx, My, Mz
These are one dimensional arrays that include the base reaction moments
about the global X, Y and Z axes, respectively, for each result. [FL]
gx, gy, gz
These are the global X, Y and Z coordinates of the point at which the base
reactions are reported. [L]
Remarks
This function reports the structure total base reactions.
The function returns zero if the reactions are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for additional information.
VBA Example
Sub GetBaseReactions()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Fx() As Double
Dim Fy() As Double
Dim Fz() As Double
Dim Mx() As Double
Dim My() As Double
Dim Mz() As Double
Dim gx As Double
Dim gy As Double
Dim gz As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get base reactions


ret = SapModel.Results.BaseReact(NumberResults, LoadCase,
StepType, StepNum, Fx, Fy, Fz, Mx, My, Mz, gx, gy, gz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
BaseReactWithCentroid
GetJointReact
BaseReactWithCentroid
Syntax
SapObject.SapModel.Results.BaseReactWithCentroid
VB6 Procedure
Function BaseReactWithCentroid(ByRef NumberResults As Long, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef Fx() As Double, ByRef Fy() As Double, ByRef Fz() As Double,
ByRef Mx() As Double, ByRef My() As Double, ByRef Mz() As Double, ByRef gx
as Double, ByRef gy as Double, ByRef gz as Double, ByRef XCentroidForFX()
as Double, ByRef YCentroidForFX() as Double, ByRef ZCentroidForFX() as
Double, ByRef XCentroidForFY() as Double, ByRef YCentroidForFY() as
Double, ByRef ZCentroidForFY() as Double, ByRef XCentroidForFZ() as
Double, ByRef YCentroidForFZ() as Double, ByRef ZCentroidForFZ() as
Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
Fx, Fy, Fz
These are one dimensional arrays that include the base reaction forces in the
global X, Y and Z directions, respectively, for each result. [F]
Mx, My, Mz
These are one dimensional arrays that include the base reaction moments
about the global X, Y and Z axes, respectively, for each result. [FL]
gx, gy, gz
These are the global X, Y and Z coordinates of the point at which the base
reactions are reported. [L]
XCentroidForFx, YCentroidForFx, ZCentroidForFx
These are arrays of the global X, Y and Z coordinates, respectively, of the
centroid of all global X-direction translational reaction forces for each result. See
Base Reaction Centroids for more information. [L]
XCentroidForFy, YCentroidForFy, ZCentroidForFy
These are arrays of the global X, Y and Z coordinates, respectively, of the
centroid of all global Y-direction translational reaction forces for each result. See
Base Reaction Centroids for more information. [L]
XCentroidForFz, YCentroidForFz, ZCentroidForFz
These are arrays of the global X, Y and Z coordinates, respectively, of the
centroid of all global Z-direction translational reaction forces for each result. See
Base Reaction Centroids for more information. [L]
Remarks
This function reports the structure total base reactions and includes information
on the centroid of the translational reaction forces.
The function returns zero if the reactions are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
Note that the reported base reaction centroids are not the same as the centroid
of the applied loads. See Base Reaction Centroids for additional information.
VBA Example
Sub GetBaseReactionsWithCentroids()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Fx() As Double
Dim Fy() As Double
Dim Fz() As Double
Dim Mx() As Double
Dim My() As Double
Dim Mz() As Double
Dim gx As Double
Dim gy As Double
Dim gz As Double
Dim XCentroidForFx() As Double
Dim YCentroidForFx() As Double
Dim ZCentroidForFx() As Double
Dim XCentroidForFy() As Double
Dim YCentroidForFy() As Double
Dim ZCentroidForFy() As Double
Dim XCentroidForFz() As Double
Dim YCentroidForFz() As Double
Dim ZCentroidForFz() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get base reactions with centroids


ret = SapModel.Results.BaseReactWithCentroid(NumberResults,
LoadCase, StepType, StepNum, Fx, Fy, Fz, Mx, My, Mz, gx, gy, gz,
XCentroidForFx, YCentroidForFx, ZCentroidForFx, XCentroidForFy,
YCentroidForFy, ZCentroidForFy, XCentroidForFz, YCentroidForFz,
ZCentroidForFz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
BaseReact
JointReact
BridgeSuperCutLongitStress
Syntax
SapObject.SapModel.Results.BridgeSuperCutLongitStress
VB6 Procedure
Function BridgeSuperCutLongitStress(ByVal Name As String, ByVal CutIndex As
Long, ByVal PointIndex As Long, ByRef NumberResults As Long, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef Stress() As Double) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function
SapModel.BridgeObj.CountSuperCut.
PointIndex
The index number of the stress point in this section cut in this bridge object. This
must be from 0 to Count-1, where Count is the value returned by function
SapModel.BridgeObj.CountSuperCutStressPoint.
NumberResults
The total number of results returned.
LoadCase
This is an array that includes the name of the load case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
Stress
This is an array that includes the longitudinal stress value for each result. [F/L2]
Remarks
This function returns the longitudinal stresses for multiple cases/combos at a
single stress point in a superstructure section cut in a bridge object. Use the
functions in SapModel.Results.Setup to control the loads and steps for which
results are to be obtained.
The function returns zero if the information is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it. It also assumes a load case named DEAD exists in
the model.
Sub GetBridgeSuperCutLongitStress()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim StepType() As String
Dim StepNum() As Double
Dim Stress() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get bridge section cut results


ret = SapModel.Results.BridgeSuperCutLongitStress("BOBJ1",
1, 1, NumberResults, LoadCase, StepType, StepNum, Stress)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
BucklingFactor
Syntax
SapObject.SapModel.Results.BucklingFactor
VB6 Procedure
Function BucklingFactor(ByRef NumberResults As Long, ByRef LoadCase() As
String, ByRef StepType() As String, ByRef stepnum() As Double, ByRef Factor()
As Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type for each result. For buckling factors,
the step type is always Mode.
StepNum
This is an array that includes the step number for each result. For buckling
factors, the step number is always the buckling mode number.
Factor
This is an array that includes the buckling factors.
Remarks
This function reports buckling factors obtained from buckling load cases.
The function returns zero if the factors are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetBucklingFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Factor() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open model
ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-019a.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("BUCK1")

'get buckling factors


ret = SapModel.Results.BucklingFactor(NumberResults,
LoadCase, StepType, StepNum, Factor)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
FrameForce
Syntax
SapObject.SapModel.Results.FrameForce
VB6 Procedure
Function FrameForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
ObjSta() As Double, ByRef Elm() As String, ByRef ElmSta() As Double, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef P() As Double, ByRef V2() As Double, ByRef V3() As Double,
ByRef T() As Double, ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing line object, line element or group of objects depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the line elements corresponding
to the line object specified by the Name item.
If this item is Element, the result request is for the line element specified by the
Name item.
If this item is GroupElm, the result request is for the line elements corresponding
to all line objects included in the group specified by the Name item.
If this item is SelectionElm, the result request is for line elements corresponding
to all selected line objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the line object name associated with each result, if
any.
ObjSta
This is an array that includes the distance measured from the I-end of the line
object to the result location.
Elm
This is an array that includes the line element name associated with each result.
ElmSta
This is an array that includes the distance measured from the I-end of the line
element to the result location.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
P, V2, V3
These are one dimensional arrays that include the axial force, shear force in the
local 2 direction, and shear force in the local 3 direction, respectively, for each
result. [F]
T, M2, M3
These are one dimensional arrays that include the torsion, moment about the
local 2axis, and moment about the local 3-axis, respectively, for each result. [FL]
Remarks
This function reports the frame forces for the specified line elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for additional information.
VBA Example
Sub GetFrameForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim ObjSta() As Double
Dim Elm() As String
Dim ElmSta() As Double
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get frame forces for line object "1"


ret = SapModel.Results.FrameForce("1", Object,
NumberResults, Obj, ObjSta, Elm, ElmSta, LoadCase, StepType,
StepNum, P, V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
FrameJointForce
FrameJointForce
Syntax
SapObject.SapModel.Results.FrameJointForce
VB6 Procedure
Function FrameForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F1() As
Double, ByRef F2() As Double, ByRef F3() As Double, ByRef M1() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing line object, line element or group of objects depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the line elements corresponding
to the line object specified by the Name item.
If this item is Element, the result request is for the line element specified by the
Name item.
If this item is GroupElm, the result request is for the line elements corresponding
to all line objects included in the group specified by the Name item.
If this item is SelectionElm, the result request is for line elements corresponding
to all selected line objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the line object name associated with each result, if
any.
Elm
This is an array that includes the line element name associated with each result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the joint force components in the
point element local axes directions. [F]
M1, M2, M3
These are one dimensional arrays that include the joint moment components
about the point element local axes. [FL]
Remarks
This function reports the frame joint forces for the point elements at each end of
the specified line elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for additional information.
VBA Example
Sub GetFrameJointForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get frame joint forces for line object "1"


ret = SapModel.Results.FrameJointForce("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F1, F2, F3, M1, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
FrameForce
GeneralizedDispl
Syntax
SapObject.SapModel.Results.GeneralizedDispl
VB6 Procedure
Function GeneralizedDispl(ByVal Name As String, ByRef NumberResults As
Long, ByRef GD() As String, ByRef LoadCase() As String, ByRef StepType()
As String, ByRef StepNum() As Double, ByRef DType() As String, ByRef Value()
As Double) As Long
Parameters
Name
The name of an existing generalized displacement for which results are
returned. If the program does not recognize this name as a defined generalized
displacement, it returns results for all selected generalized displacements, if any.
For example, entering a blank string (i.e., "") for the name will prompt the
program to return results for all selected generalized displacements.
NumberResults
The total number of results returned by the program.
GD
This is an array that includes the generalized displacement name associated
with each result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
DType
This is an array that includes the generalized displacement type for each result.
It is either Translation or Rotation.
Value
This is an array of the generalized displacement values for each result.[L] when
DType is Translation , [rad] when DType is Rotation.
Remarks
This function reports the displacement values for the specified generalized
displacements.
The function returns zero if the displacements are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetGeneralizedDisplacements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim GD() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim DType() As String
Dim Value() As Double
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'add generalized displacement


ret = SapModel.GDispl.Add("GD1", 1)

'add point to generalized displacement


ReDim SF(5)
SF(0) = 0.5
ret = SapModel.GDispl.SetPoint("GD1", "3", SF)

'get generalized displacement results


ret = SapModel.Results.GeneralizedDispl("GD1",NumberResults,
GD, LoadCase, StepType, StepNum, DType, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointDisplAbs
JointAcc
Syntax
SapObject.SapModel.Results.JointAcc
VB6 Procedure
Function JointAcc(ByVal Name As String, ByVal ItemTypeElm As eItemTypeElm,
ByRef NumberResults As Long, ByRef Obj() As String, ByRef Elm() As String,
ByRef LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef U1() As Double, ByRef U2() As Double, ByRef U3() As Double,
ByRef R1() As Double, ByRef R2() As Double, ByRef R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the translational acceleration in
the point element local 1, 2 and 3 axes directions, respectively, for each result.
[L/s2]
R1, R2, R3
These are one dimensional arrays that include the rotational acceleration about
the point element local 1, 2 and 3 axes, respectively, for each result. [rad/s2]
Remarks
This function reports the joint accelerations for the specified point elements. The
accelerations reported by this function are relative accelerations.
The function returns zero if the accelerations are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for additional information.
VBA Example
Sub GetJointAcceleration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-022.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get joint acceleration for point object "22"


ret = SapModel.Results.JointAcc("22", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointDisplAbs
JointVel
JointVelAbs
JointAccAbs
GeneralizedDispl
JointAccAbs
Syntax
SapObject.SapModel.Results.JointAccAbs
VB6 Procedure
Function JointAccAbs(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the translational acceleration in
the point element local 1, 2 and 3 axes directions, respectively, for each result.
[L/s2]
R1, R2, R3
These are one dimensional arrays that include the rotational acceleration about
the point element local 1, 2 and 3 axes, respectively, for each result. [rad/s2]
Remarks
This function reports the joint absolute accelerations for the specified point
elements. Absolute and relative accelerations are the same, except when
reported for time history load cases subjected to acceleration loading.
The function returns zero if the accelerations are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointAbsoluteAcceleration()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-022.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get joint absolute acceleration for point object "22"


ret = SapModel.Results.JointAccAbs("22", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointDisplAbs
JointVel
JointVelAbs
JointAcc
GeneralizedDispl
JointDispl
Syntax
SapObject.SapModel.Results.JointDispl
VB6 Procedure
Function JointDispl(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For these
cases this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the displacement in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [L]
R1, R2, R3
These are one dimensional arrays that include the rotation about the point
element local 1, 2 and 3 axes, respectively, for each result. [rad]
Remarks
This function reports the joint displacements for the specified point elements.
The displacements reported by this function are relative displacements.
The function returns zero if the displacements are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointDisplacements()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get point displacements


ret = SapModel.Results.JointDispl("ALL", GroupElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDisplAbs
JointVel
JointVelAbs
JointAcc
JointAccAbs
GeneralizedDispl
JointDisplAbs
Syntax
SapObject.SapModel.Results.JointDisplAbs
VB6 Procedure
Function JointDisplAbs(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the displacement in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [L]
R1, R2, R3
These are one dimensional arrays that include the rotation about the point
element local 1, 2 and 3 axes, respectively, for each result. [rad]
Remarks
This function reports the absolute joint displacements for the specified point
elements. Absolute and relative displacements are the same except when
reported for time history load cases subjected to acceleration loading.
The function returns zero if the displacements are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointAbsoluteDisplacement()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-022.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get joint absolute displacement for point object "22"


ret = SapModel.Results.JointDisplAbs("22", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointVel
JointVelAbs
JointAcc
JointAccAbs
GeneralizedDispl
JointReact
Syntax
SapObject.SapModel.Results.JointReact
VB6 Procedure
Function JointReact(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef F1() As Double, ByRef F2() As Double,
ByRef F3() As Double, ByRef M1() As Double, ByRef M2() As Double, ByRef
M3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElmc = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the reaction forces in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [F]
M1, M2, M3
These are one dimensional arrays that include the reaction moments about the
point element local 1, 2 and 3 axes, respectively, for each result. [FL]
Remarks
This function reports the joint reactions for the specified point elements. The
reactions reported are from restraints, springs and grounded (one-joint) links.
The function returns zero if the reactions are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointReactions()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get joint reactions


ret = SapModel.Results.JointReact("1", Element,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, F1, F2, F3,
M1, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
BaseReact
JointRespSpec
Syntax
SapObject.SapModel.Results.JointRespSpec
VB6 Procedure
Function JointRespSpec(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByVal edSet As String, ByRef NumberResults As Long, ByRef
Obj() As String, ByRef Elm() As String, ByRef LoadCase() As String, ByRef
CoordSys() As String, ByRef Dir() As Long, ByRef Damping() As Double, ByRef
SpecWidening() As Double, ByRef AbscissaValue() As Double, ByRef
OrdinateValue() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElem
This is one of the following items in the ItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3
Default = 4
If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
If this item is Default, the result request is for the point object specified in the
named set.
See Item Type for Elements for more information.
NamedSet
The name of an existing joint response spectrum named set. See
SapModel.NamedSet.SetJointRespSpec.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the load case associated with each
result.
CoordSys
This is an array that includes the coordinate system in which the results are
reported.
Dir
This is an array that includes the direction for which the results are reported.
Valid values for the direction are:
1 = Local 1, Global X, or user-defined coordinate system X
2 = Local 2, Global Y, or user-defined coordinate system Y
3 = Local 3, Global Z, or user-defined coordinate system Z
Damping
This is an array that includes the critical damping ratio, for each result.
SpecWidening
This is an array that includes the percent spectrum widening, for each result.
AbscissaValue
This is an array that includes the period or frequency, as defined in each named
set, for each result. [s or 1/s]
OrdinateValue
This is an array of the response quantity, as defined in each named set, for
each result. The possible response quantities are spectral displacement [L],
spectral velocity [L/s], pseudo spectral velocity [L/s], spectral acceleration [L/s2],
or pseudo spectral acceleration [L/s2].
Remarks
This function reports the joint response spectra values, due to a time history
analysis, for the specified point elements.
The function returns zero if the response spectra data is successfully
recovered, otherwise it returns a nonzero value.
See Analysis Results Remarks for more information
VBA Example
Sub GetJointResponseSpectra()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadType() As String
Dim MyLoadName() As String
Dim MyFunc() As String
Dim MySF() As Double
Dim MyTF() As Double
Dim MyAT() As Double
Dim MyCSys() As String
Dim MyAng() As Double
Dim Joints() As String
Dim UserFreq() As Double
Dim DampValues() As Double
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim CoordSys() As String
Dim Dir() As Long
Dim Damping() As Double
Dim SpecWidening() As Double
Dim AbscissaValue() As Double
Dim OrdinateValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add sine TH function


ret = SapModel.Func.FuncTH.SetSine("TH-1, 1, 16, 4, 1.25)

'add linear modal history load case


ReDim MyLoadType(0)
ReDim MyLoadName(0)
ReDim MyFunc(0)
ReDim MySF(0)
ReDim MyTF(0)
ReDim MyAT(0)
ReDim MyCSys(0)
ReDim MyAng(0)
MyLoadType(0) = "Accel"
MyLoadName(0) = "U1"
MyFunc(0) = "TH-1"
MySF(0) = 2
MyTF(0) = 1.5
MyAT(0) = 10
MyCSys(0) = "Global"
MyAng(0) = 10

ret = SapModel.LoadCases.ModHistLinear.SetCase("LCASE1")
ret = SapModel.LoadCases.ModHistLinear.SetLoads("LCASE1", 1,
MyLoadType, MyLoadName, MyFunc, MySF, MyTF, MyAT, MyCSys, MyAng)

'define named set


ReDim Joints(1)
Joints(0) = "3"
Joints(1) = "6"
ReDim DampValues(1)
DampValues(0) = 0
DampValues(1) = 0.05

ret = SapModel.NamedSets.SetJointRespSpec("Sample",
"LCASE1", 2, Joints, "Global", 1, 1, 4, True, True, 0, UserFreq,
2, DampValues)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections and select time
history case
ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("LCASE1")
'get point response spectra
ret = SapModel.Results.JointRespSpec("3", 4, "Sample",
NumberResults, Obj, Elm, LoadCase, CoordSys, Dir, Damping,
SpecWidening, AbscissaValue, OrdinateValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetJointRespSpec
JointDisplAbs
JointVel
JointVelAbs
JointAcc
JointAccAbs
GeneralizedDispl
JointVel
Syntax
SapObject.SapModel.Results.JointVel
VB6 Procedure
Function GJointVel(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The number total of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the translational velocity in the
point element local 1, 2 and 3 axes directions, respectively, for each result. [L/s]
R1, R2, R3
These are one dimensional arrays that include the rotational velocity about the
point element local 1, 2 and 3 axes, respectively, for each result. [rad/s]
Remarks
This function reports the joint velocities for the specified point elements. The
velocities reported by this function are relative velocities.
The function returns zero if the velocities are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointVelocity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-022.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get joint velocity for point object "22"


ret = SapModel.Results.JointVel("22", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointDisplAbs
JointVelAbs
JointAcc
JointAccAbs
GeneralizedDispl
JointVelAbs
Syntax
SapObject.SapModel.Results.JointVelAbs
VB6 Procedure
Function JointVelAbs(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For those
cases, this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the translational velocity in the
point element local 1, 2 and 3 axes directions, respectively, for each result. [L/s]
R1, R2, R3
These are one dimensional arrays that include the rotational velocity about the
point element local 1, 2 and 3 axes, respectively, for each result. [rad/s]
Remarks
This function reports the joint absolute velocities for the specified point
elements. Absolute and relative velocities are the same, except when reported
for time history load cases subjected to acceleration loading.
The function returns zero if the velocities are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetJointAbsoluteVelocity()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-022.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get joint absolute velocity for point object "22"


ret = SapModel.Results.JointVelAbs("22", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
JointDispl
JointDisplAbs
JointVel
JointAcc
JointAccAbs
GeneralizedDispl
LinkDeformation
Syntax
SapObject.SapModel.Results.LinkDeformation
VB6 Procedure
Function LinkDeformation(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing link object, link element, or group of objects, depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm= = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the link element corresponding
to the link object specified by the Name item.
If this item is Element, the result request is for the link element specified by the
Name item.
If this item is GroupElm, the result request is for all link elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for link elements directly or
indirectly selected, and the Name item is ignored.
For GroupElm and SelectionElm a link element may be indirectly specified
through point objects that have panel zone assignments and through line, area,
and solid objects that have spring assignments.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the link object name associated with each result, if
any.
Elm
This is an array that includes the link element name associated with each result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the internal translational
deformation of the link in the link element local axes directions. [L]
R1, R2, R3
These are one dimensional arrays that include the internal rotational
deformation of the link about the link element local axes. [rad]
Remarks
This function reports the link internal deformations.
The function returns zero if the deformations are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetLinkDeformations()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-003a.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("NLMHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get link deformations for link object "1"


ret = SapModel.Results.LinkDeformation("1", ObjectElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
LinkForce
LinkJointForce
LinkForce
Syntax
SapObject.SapModel.Results.LinkForce
VB6 Procedure
Function LinkForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef P() As
Double, ByRef V2() As Double, ByRef V3() As Double, ByRef T() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing link object, link element, or group of objects ,depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the link element corresponding
to the link object specified by the Name item.
If this item is Element, the result request is for the link element specified by the
Name item.
If this item is GroupElm, the result request is for all link elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for link elements directly or
indirectly selected and the Name item is ignored.
For GroupElm and SelectionElm a link element may be indirectly specified
through point objects that have panel zone assignments and through line, area
and solid objects that have spring assignments.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the link object name associated with each result, if
any.
Elm
This is an array that includes the link element name associated with each result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
P
This is an array that includes the link axial force (in the link local 1-axis direction)
at the specified point element. [F]
V2, V3
These are one dimensional arrays that include the link shear force components
in the link element local axes directions. [F]
T
This is an array that includes the link torsion (about the link local 1-axis) at the
specified point element. [FL]
M2, M3
These are one dimensional arrays that include the link moment components
about the link element local axes. [FL]
Remarks
This function reports the link forces at the point elements at the ends of the
specified link elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetLinkForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-003a.sdb")

'run analysis
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("NLMHIST1")

'set modal history output option to step-by-step


ret = SapModel.Results.Setup.SetOptionModalHist(2)

'get link forces for link object "1"


ret = SapModel.Results.LinkForce("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum, P,
V2, V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
LinkDeformation
LinkJointForce
LinkJointForce
Syntax
SapObject.SapModel.Results.LinkJointForce
VB6 Procedure
Function LinkJointForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F1() As
Double, ByRef F2() As Double, ByRef F3() As Double, ByRef M1() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing link object, link element or group of objects depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the link element corresponding
to the link object specified by the Name item.
If this item is Element, the result request is for the link element specified by the
Name item.
If this item is GroupElm, the result request is for all link elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for link elements directly or
indirectly selected and the Name item is ignored.
For GroupElm and SelectionElm a link element may be indirectly specified
through point objects that have panel zone assignments and through line, area
and solid objects that have spring assignments.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the link object name associated with each result, if
any.
Elm
This is an array that includes the link element name associated with each result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the joint force components in the
point element local axes directions. [F]
M1, M2, M3
These are one dimensional arrays that include the joint moment components
about the point element local axes. [FL]
Remarks
This function reports the joint forces for the point elements at the ends of the
specified link elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Similar to AreaJointForceShell

'get link joint forces for link object "1"


ret = SapModel.Results.LinkJointForce("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F1, F2, F3, M1, M2, M3)
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
LinkForce
LinkDeformation
ModalLoadParticipationRatios
Syntax
SapObject.SapModel.Results.ModalLoadParticipationRatios
VB6 Procedure
Function ModalLoadParticipationRatios(ByRef NumberResults As Long, ByRef
LoadCase() As String, ByRef ItemType() As String, ByRef Item() As String,
ByRef Stat() As Double, ByRef Dyn() As Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the modal load case associated with
each result.
ItemType
This is an array that includes Load Pattern, Acceleration, Link or Panel Zone. It
specifies the type of item for which the modal load participation is reported.
Item
This is an array whose values depend on the ItemType. If the ItemType is Load
Pattern, this is the name of the load pattern.
If the ItemType is Acceleration, this is UX, UY, UZ, RX, RY, or RZ, indicating the
acceleration direction.
If the ItemType is Link, this is the name of the link followed by U1, U2, U3, R1,
R2, or R3 (in parenthesis), indicating the link degree of freedom for which the
output is reported.
If the ItemType is Panel Zone, this is the name of the joint to which the panel
zone is assigned, followed by U1, U2, U3, R1, R2, or R3 (in parenthesis),
indicating the degree of freedom for which the output is reported.
Stat
This is an array that includes the percent static load participation ratio.
Dyn
This is an array that includes the percent dynamic load participation ratio.
Remarks
This function reports the modal load participation ratios for each selected modal
analysis case.
The function returns zero if the data is successfully recovered; otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetModalLoadParticipationRatios()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim LoadCase() As String
Dim ItemType() As String
Dim Item() As String
Dim Stat() As Double
Dim Dyn() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MODAL")

'get modal load participation ratios


ret =
SapModel.Results.ModalLoadParticipationRatios(NumberResults,
LoadCase, ItemType, Item, Stat, Dyn)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
ModeShape
ModalPeriod
ModalParticipatingMassRatios
ModalParticipationFactors
ModalParticipatingMassRatios
Syntax
SapObject.SapModel.Results.ModalParticipatingMassRatios
VB6 Procedure
Function ModalParticipatingMassRatios(ByRef NumberResults As Long, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef Period() As Double, ByRef Ux() As Double, ByRef Uy() As
Double, ByRef Uz() As Double, ByRef SumUx() As Double, ByRef SumUy() As
Double, ByRef SumUz() As Double, ByRef Rx() As Double, ByRef Ry() As
Double, ByRef Rz() As Double, ByRef SumRx() As Double, ByRef SumRy() As
Double, ByRef SumRz() As Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the modal load case associated with
each result.
StepType
This is an array that includes the step type, if any, for each result. For modal
results, this will always be Mode.
StepNum
This is an array that includes the step number for each result. For modal results,
this is always the mode number.
Period
This is an array that includes the period for each result. [s]
Ux
This is an array that includes the modal participating mass ratio for the structure
Ux degree of freedom. The ratio applies to the specified mode.
Uy
This is an array that includes the modal participating mass ratio for the structure
Uy degree of freedom. The ratio applies to the specified mode.
Uz
This is an array that includes the modal participating mass ratio for the structure
Uz degree of freedom. The ratio applies to the specified mode.
SumUx
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Ux degree of freedom.
SumUy
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Uy degree of freedom.
SumUz
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Uz degree of freedom.
Rx
This is an array that includes the modal participating mass ratio for the structure
Rx degree of freedom. The ratio applies to the specified mode.
Ry
This is an array that includes the modal participating mass ratio for the structure
Ry degree of freedom. The ratio applies to the specified mode.
Rz
This is an array that includes the modal participating mass ratio for the structure
Rz degree of freedom. The ratio applies to the specified mode.
SumRx
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Rx degree of freedom.
SumRy
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Ry degree of freedom.
SumRz
This is an array that includes the cumulative sum of the modal participating mass
ratios for the structure Rz degree of freedom.
Remarks
This function reports the modal participating mass ratios for each mode of each
selected modal analysis case.
The function returns zero if the data is successfully recovered; otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetModalParticipatingMassRatios()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Period() As Double
Dim Ux() As Double
Dim Uy() As Double
Dim Uz() As Double
Dim SumUx() As Double
Dim SumUy() As Double
Dim SumUz() As Double
Dim Rx() As Double
Dim Ry() As Double
Dim Rz() As Double
Dim SumRx() As Double
Dim SumRy() As Double
Dim SumRz() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis
'clear all case and combo output selections
ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MODAL")

'get modal participating mass ratios


ret =
SapModel.Results.ModalParticipatingMassRatios(NumberResults,
LoadCase, StepType, StepNum, Period, Ux, Uy, Uz, SumUx, SumUy,
SumUz, Rx, Ry, Rz, SumRx, SumRy, SumRz)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
ModeShape
ModalPeriod
ModalParticipationFactors
ModalLoadParticipationRatios
ModalParticipationFactors
Syntax
SapObject.SapModel.Results.ModalParticipationFactors
VB6 Procedure
Function ModalParticipationFactors(ByRef NumberResults As Long, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef Period() As Double, ByRef Ux() As Double, ByRef Uy() As
Double, ByRef Uz() As Double, ByRef Rx() As Double, ByRef Ry() As Double,
ByRef Rz() As Double, ByRef ModalMass() As Double, ByRef ModalStiff() As
Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
LoadCase
This is an array that includes the name of the modal load case associated with
each result.
StepType
This is an array that includes the step type, if any, for each result. For modal
results, this will always be Mode.
StepNum
This is an array that includes the step number for each result. For modal results,
this will always be the mode number.
Period
This is an array that includes the period for each result. [s]
Ux
This is an array that includes the modal participation factor for the structure Ux
degree of freedom. The factor applies to the specified mode. [Fs2]
Uy
This is an array that includes the modal participation factor for the structure Uy
degree of freedom. The factor applies to the specified mode. [Fs2]
Uz
This is an array that includes the modal participation factor for the structure Uz
degree of freedom. The factor applies to the specified mode. [Fs2]
Rx
This is an array that includes the modal participation factor for the structure Rx
degree of freedom. The factor applies to the specified mode. [FLs2]
Ry
This is an array that includes the modal participation factor for the structure Ry
degree of freedom. The factor applies to the specified mode. [FLs2]
Rz
This is an array that includes the modal participation factor for the structure Rz
degree of freedom. The factor applies to the specified mode. [FLs2]
ModalMass
This is an array that includes the modal mass for the specified mode. This is a
measure of the kinetic energy in the structure as it is deforming in the specified
mode. [FLs2]
ModalStiff
This is an array that includes the modal stiffness for the specified mode. This is
a measure of the strain energy in the structure as it is deforming in the specified
mode. [FL]
Remarks
This function reports the modal participation factors for each mode of each
selected modal analysis case.
The function returns zero if the data is successfully recovered; otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetModalParticipationFactors()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Period() As Double
Dim Ux() As Double
Dim Uy() As Double
Dim Uz() As Double
Dim Rx() As Double
Dim Ry() As Double
Dim Rz() As Double
Dim ModalMass() As Double
Dim ModalStiff() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MODAL")

'get modal participation factors


ret =
SapModel.Results.ModalParticipationFactors(NumberResults,
LoadCase, StepType, StepNum, Period, Ux, Uy, Uz, Rx, Ry, Rz,
ModalMass, ModalStiff)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
ModeShape
ModalPeriod
ModalParticipatingMassRatios
ModalLoadParticipationRatios
ModalPeriod
Syntax
SapObject.SapModel.Results.ModalPeriod
VB6 Procedure
Function ModalPeriod(ByRef NumberResults As Long, ByRef LoadCase() As
String, ByRef StepType() As String, ByRef StepNum() As Double, ByRef
Period() As Double, ByRef Frequency() As Double, ByRef CircFreq() As
Double, ByRef EigenValue() As Double) As Long
Parameters
NumberResults
The number total of results returned by the program.
LoadCase
This is an array that includes the name of the modal analysis case associated
with each result.
StepType
This is an array that includes the step type, if any, for each result. For modal
results this is always be Mode.
StepNum
This is an array that includes the step number for each result. For modal results
this is always the mode number.
Period
This is an array that includes the period for each result. [s]
Frequency
This is an array that includes the cyclic frequency for each result. [1/s]
CircFreq
This is an array that includes the circular frequency for each result. [rad/s]
EigenValue
This is an array that includes the eigenvalue for the specified mode for each
result. [rad2/s2]
Remarks
This function reports the modal period, cyclic frequency, circular frequency and
eigenvalue for each selected modal load case.
The function returns zero if the data is successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetPeriod()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim Period() As Double
Dim Frequency() As Double
Dim CircFreq() As Double
Dim EigenValue() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MODAL")

'get modal period


ret = SapModel.Results.ModalPeriod(NumberResults, LoadCase,
StepType, StepNum, Period, Frequency, CircFreq, EigenValue)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
ModeShape
ModeShape
Syntax
SapObject.SapModel.Results.ModeShape
VB6 Procedure
Function ModeShape(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef U1() As Double, ByRef U2() As Double,
ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As Double, ByRef
R3() As Double) As Long
Parameters
Name
The name of an existing point element or group of objects, depending on the
value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the point object name associated with each result,
if any. Some results will have no point object associated with them. For these
cases this item will be blank.
Elm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the modal analysis case associated
with each result.
StepType
This is an array that includes the step type, if any, for each result. For mode
shape results, this is always be Mode.
StepNum
This is an array that includes the step number for each result. For mode shape
results, this is always the mode number.
U1, U2, U3
These are one dimensional arrays that include the displacement in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [L]
R1, R2, R3
These are one dimensional arrays that include the rotation about the point
element local 1, 2 and 3 axes, respectively, for each result. [rad]
Remarks
This function reports the modal displacements (mode shapes) for the specified
point elements.
The function returns zero if the displacements are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetModeShapes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("MODAL")

'get mode shape


ret = SapModel.Results.ModeShape("ALL", GroupElm,
NumberResults, Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
ModalPeriod
PanelZoneDeformation
Syntax
SapObject.SapModel.Results.PanelZoneDeformation
VB6 Procedure
Function PanelZoneDeformation(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Elm() As String, ByRef
LoadCase() As String, ByRef StepType() As String, ByRef StepNum() As
Double, ByRef U1() As Double, ByRef U2() As Double, ByRef U3() As Double,
ByRef R1() As Double, ByRef R2() As Double, ByRef R3() As Double) As Long
Parameters
Name
The name of an existing link object, link element, or group of objects, depending
on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the panel zone (link) element
corresponding to the panel zone assignment to the point object specified by the
Name item.
If this item is Element, the result request is for the panel zone (link) element
specified by the Name item.
If this item is GroupElm, the result request is for all panel zone (link) elements
directly or indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for panel zone (link) elements
directly or indirectly selected and the Name item is ignored.
For GroupElm and SelectionElm a panel zone (link) element may be indirectly
specified through point objects that have panel zone assignments.
NumberResults
The total number of results returned by the program.
Elm
This is an array that includes the panel zone (link) element name associated with
each result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
U1, U2, U3
These are one dimensional arrays that include the internal translational
deformation of the panel zone (link) in the link element local axes directions. [L]
R1, R2, R3
These are one dimensional arrays that include the internal rotational
deformation of the panel zone (link) about the link element local axes. [rad]
Remarks
This function reports the panel zone (link) internal deformations.
The function returns zero if the deformations are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetPanelZoneDeformation()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign panel zone to point object "3"


ret = SapModel.PointObj.SetPanelZone("3", 1, 2, 0, 0, "", 0,
0, 0)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get panel zone deformation for point object "3"


ret = SapModel.Results.PanelZoneDeformation("3", ObjectElm,
NumberResults, Elm, LoadCase, StepType, StepNum, U1, U2, U3, R1,
R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
PanelZoneForce
PanelZoneForce
Syntax
SapObject.SapModel.Results.PanelZoneForce
VB6 Procedure
Function PanelZoneForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Elm() As String, ByRef
PointElm() As String, ByRef LoadCase() As String, ByRef StepType() As String,
ByRef StepNum() As Double, ByRef P() As Double, ByRef V2() As Double,
ByRef V3() As Double, ByRef T() As Double, ByRef M2() As Double, ByRef
M3() As Double) As Long
Parameters
Name
The name of an existing point object, point element, or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the panel zone (link) element
corresponding to the panel zone assignment to the point object specified by the
Name item.
If this item is Element, the result request is for the panel zone (link) element
specified by the Name item.
If this item is GroupElm, the result request is for all panel zone (link) elements
directly or indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for panel zone (link) elements
directly or indirectly selected and the Name item is ignored.
For GroupElm and SelectionElm a panel zone (link) element may be indirectly
specified through point objects that have panel zone assignments.
NumberResults
The total number of results returned by the program.
Elm
This is an array that includes the panel zone (link) element name associated with
each result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
P
This is an array that includes the panel zone (link) axial force (in the link local 1-
axis direction) at the specified point element. [F]
V2, V3
These are one dimensional arrays that include the panel zone (link) shear force
components in the link element local axes directions. [F]
T
This is an array that includes the panel zone (link) torsion (about the link local 1-
axis) at the specified point element. [FL]
M2, M3
These are one dimensional arrays that include the panel zone (link) moment
components about the link element local axes. [FL]
Remarks
This function reports the panel zone (link) forces at the point elements at the
ends of the specified panel zone (link) elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Result Remarks for more information.
VBA Example
Sub GetPanelZoneForce()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim P() As Double
Dim V2() As Double
Dim V3() As Double
Dim T() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'assign panel zone to point object "3"


ret = SapModel.PointObj.SetPanelZone("3", 1, 2, 0, 0, "", 0,
0, 0)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get panel zone force for point object "3"


ret = SapModel.Results.PanelZoneForce("3", ObjectElm,
NumberResults, Elm, PointElm, LoadCase, StepType, StepNum, P, V2,
V3, T, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
PanelZoneDeformation
SectionCutAnalysis
Syntax
SapObject.SapModel.Results.SectionCutAnalysis
VB6 Procedure
Function SectionCutAnalysis(ByRef NumberResults As Long, ByRef SCut() As
String, ByRef LoadCase() As String, ByRef StepType() As String, ByRef
StepNum() As Double, ByRef F1() As Double, ByRef F2() As Double, ByRef
F3() As Double, ByRef M1() As Double, ByRef M2() As Double, ByRef M3() As
Double) As Long
Parameters
NumberResults
The number total of results returned by the program.
SCut
This is an array that includes the name of the section cut associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the forces in the section cut local
axes directions for each result. [F]
M1, M2, M3
These are one dimensional arrays that include the moments about the section
cut local axes for each result. [FL]
Remarks
This function reports the section cut force for sections cuts that are specified to
have an Analysis (F1, F2, F3, M1, M2, M3) result type.
The function returns zero if the section cut forces are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Similar to FrameJointForce

'get section cut forces with analysis output convention


ret = SapModel.Results.SectionCutAnalysis(NumberResults,
SCut, LoadCase, StepType, StepNum, F1, F2, F3, M1, M2, M3)
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SectionCutDesign
SectionCutDesign
Syntax
SapObject.SapModel.Results.SectionCutDesign
VB6 Procedure
Function SectionCutDesign(ByRef NumberResults As Long, ByRef SCut() As
String, ByRef LoadCase() As String, ByRef StepType() As String, ByRef
StepNum() As Double, ByRef P() As Double, ByRef V2() As Double, ByRef V3()
As Double, ByRef T() As Double, ByRef M2() As Double, ByRef M3() As
Double) As Long
Parameters
NumberResults
The total number of results returned by the program.
SCut
This is an array that includes the name of the section cut associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
P, V2, V3
These are one dimensional arrays that include the axial force, shear force in the
section cut local 2 direction and shear force in the section cut local 3 direction,
respectively, for each result. [F]
T, M2, M3
These are one dimensional arrays that include the torsion, moment about the
section cut local 2 axis and moment about the section cut local 3-axis,
respectively, for each result. [FL]
Remarks
This function reports the section cut force for sections cuts that are specified to
have a Design (P, V2, V3, T, M2, M3) result type.
The function returns zero if the section cut forces are successfully recovered,
otherwise it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Similar to FrameForce

'get section cut forces with design output convention


ret = SapModel.Results.SectionCutDesign(NumberResults, SCut,
LoadCase, StepType, StepNum, P, V2, V3, T, M2, M3)
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SectionCutAnalysis
SolidJointForce
Syntax
SapObject.SapModel.Results.SolidJointForce
VB6 Procedure
Function SolidJointForce(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef F1() As
Double, ByRef F2() As Double, ByRef F3() As Double, ByRef M1() As Double,
ByRef M2() As Double, ByRef M3() As Double) As Long
Parameters
Name
The name of an existing solid object, solid element, or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the solid elements
corresponding to the solid object specified by the Name item.
If this item is Element, the result request is for the solid element specified by the
Name item.
If this item is GroupElm, the result request is for the solid elements
corresponding to all solid objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for solid elements corresponding
to all selected solid objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the solid object name associated with each result,
if any.
Elm
This is an array that includes the solid element name associated with each
result.
PointElm
This is an array that includes the point element name associated with each
result.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
F1, F2, F3
These are one dimensional arrays that include the joint force components in the
point element local axes directions. [F]
M1, M2, M3
These are one dimensional arrays that include the joint moment components
about the point element local axes. [FL]
Remarks
This function reports the joint forces for the point elements at each corner of the
specified solid elements.
The function returns zero if the forces are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetSolidJointForces()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim F1() As Double
Dim F2() As Double
Dim F3() As Double
Dim M1() As Double
Dim M2() As Double
Dim M3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create a solid model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set case and combo output selections
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get solid joint forces for solid object "1"


ret = SapModel.Results.SolidJointForce("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
F1, F2, F3, M1, M2, M3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SolidStress
SolidStress
Syntax
SapObject.SapModel.Results.SolidStress
VB6 Procedure
Function SolidStress(ByVal name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef NumberResults As Long, ByRef Obj() As String, ByRef
Elm() As String, ByRef PointElm() As String, ByRef LoadCase() As String,
ByRef StepType() As String, ByRef StepNum() As Double, ByRef S11() As
Double, ByRef S22() As Double, ByRef S33() As Double, ByRef S12() As
Double, ByRef S13() As Double, ByRef S23() As Double, ByRef SMax() As
Double, ByRef SMid() As Double, ByRef SMin() As Double, ByRef SVM() As
Double, ByRef DirCosMax1() As Double, ByRef DirCosMax2() As Double,
ByRef DirCosMax3() As Double, ByRef DirCosMid1() As Double, ByRef
DirCosMid2() As Double, ByRef DirCosMid3() As Double, ByRef DirCosMin1()
As Double, ByRef DirCosMin2() As Double, ByRef DirCosMin3() As Double) As
Long
Parameters
Name
The name of an existing solid object, solid element, or group of objects,
depending on the value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the solid elements
corresponding to the solid object specified by the Name item.
If this item is Element, the result request is for the solid element specified by the
Name item.
If this item is GroupElm, the result request is for the solid elements
corresponding to all solid objects included in the group specified by the Name
item.
If this item is SelectionElm, the result request is for solid elements corresponding
to all selected solid objects and the Name item is ignored.
NumberResults
The total number of results returned by the program.
Obj
This is an array that includes the solid object name associated with each result,
if any.
Elm
This is an array that includes the solid element name associated with each
result.
PointElm
This is an array that includes the name of the point element where the results
are reported.
LoadCase
This is an array that includes the name of the analysis case or load combination
associated with each result.
StepType
This is an array that includes the step type, if any, for each result.
StepNum
This is an array that includes the step number, if any, for each result.
S11, S22, S33, S12, S13, S23
The solid element internal S11, S22, S33, S12, S13 and S23 stresses at the
specified point element location, reported in the solid element local coordinate
system. [F/L2]
SMax, SMid, SMin
The solid element maximum, middle and minimum principal stresses at the
specified point element location. [F/L2]
SVM
The solid element internal Von Mises stress at the specified point element
location. [F/L2]
DirCosMax1, DirCosMax2, DirCosMax3
These are three direction cosines defining the orientation of the maximum
principal stress with respect to the solid element local axes.
DirCosMid1, DirCosMid2, DirCosMid3
These are three direction cosines defining the orientation of the middle principal
stress with respect to the solid element local axes.
DirCosMin1, DirCosMin2, DirCosMin3
These are three direction cosines defining the orientation of the minimum
principal stress with respect to the solid element local axes.
Remarks
This function reports the stresses for the specified solid elements. Stresses are
reported at each point element associated with the solid element.
The function returns zero if the stresses are successfully recovered, otherwise
it returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetSolidStresses()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim PointElm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim S11() As Double
Dim S22() As Double
Dim S33() As Double
Dim S12() As Double
Dim S13() As Double
Dim S23() As Double
Dim SMax() As Double
Dim SMid() As Double
Dim SMin() As Double
Dim SVM() As Double
Dim DirCosMax1() As Double
Dim DirCosMax2() As Double
Dim DirCosMax3() As Double
Dim DirCosMid1() As Double
Dim DirCosMid2() As Double
Dim DirCosMid3() As Double
Dim DirCosMin1() As Double
Dim DirCosMin2() As Double
Dim DirCosMin3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create a solid model from template


ret = SapModel.File.NewSolidBlock(20, 50, 20)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'clear all case and combo output selections


ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput

'set case and combo output selections


ret =
SapModel.Results.Setup.SetCaseSelectedForOutput("DEAD")

'get solid stresses for solid object "1"


ret = SapModel.Results.SolidStress("1", ObjectElm,
NumberResults, Obj, Elm, PointElm, LoadCase, StepType, StepNum,
S11, S22, S33, S12, S13, S23, SMax, SMid, SMin, SVM, DirCosMax1,
DirCosMax2, DirCosMax3, DirCosMid1, DirCosMid2, DirCosMid3,
DirCosMin1, DirCosMin2, DirCosMin3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SolidJointForce
StepLabel
Syntax
SapObject.SapModel.Results.StepLabel
VB6 Procedure
Function StepLabel(ByVal LoadCase As String, ByVal StepNum As Double,
ByRef Label As String) As Long
Parameters
LoadCase
The name of an existing staged-construction load case.
StepNum
This is an overall step number from the specified staged-construction load case.
The range of values of StepNum for a given load case can be obtained from
most analysis results calls, such as SapObject.SapModel.Results.JointDispl
Label
The is the step label, including the name or number of the stage, the step number
within the stage, and the age of the structure for time-dependent load cases
Remarks
This function generates the step label for analyzed staged-construction load
cases. For load case types other then the staged construction, the label will be
blank.
The function returns zero if the step label is successfully generated; otherwise it
returns a nonzero value.
VBA Example
Sub GetStepLabel()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As Sap2000v16.cSapModel
Dim ret As Long
Dim MyDuration() As Long
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim MyOperation() As Long
Dim MyObjectType() As String
Dim MyObjectName() As String
Dim MyAge() As Long
Dim MyMyType() As String
Dim MyMyName() As String
Dim MySF() As Double
Dim Label() as String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(Sap2000v16.PortalFrame, 2,
144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
Redim Label(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_1("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'set stage data


ReDim MyOperation(1)
ReDim MyObjectType(1)
ReDim MyObjectName(1)
ReDim MyAge(1)
ReDim MyMyType(1)
ReDim MyMyName(1)
ReDim MySF(1)
MyOperation(0) = 1
MyObjectType(0) = "Group"
MyObjectName(0) = "ALL"
MyAge(0) = 3
MyOperation(1) = 4
MyObjectType(1) = "Frame"
MyObjectName(1) = "8"
MyMyType(1) = "Load"
MyMyName(1) = "DEAD"
MySF(1) = 0.85
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageData_1("ACASE1",
1, 2, MyOperation, MyObjectType, MyObjectName, MyAge, MyMyType,
MyMyName, MySF)

'set results saved parameters


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetResultsSaved("ACASE1",
3, 4, 10)

'save model
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
'run model (this will create the analysis model)
ret = SapModel.Analyze.RunAnalysis

'Get step label


ret = SapModel.Results.StepLabel("ACASE1", 3, Label(0))
ret = SapModel.Results.StepLabel("ACASE1", 8, Label(1))

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.00.
DeleteResults
Syntax
SapObject.SapModel.DesignSteel.DeleteResults
VB6 Procedure
Function DeleteResults() As Long
Parameters
None
Remarks
This function deletes all steel frame design results.
The function returns zero if the results are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteSteelDesignResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'delete steel design results


ret = SapModel.DesignSteel.DeleteResults

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
Syntax
SapObject.SapModel.DesignSteel.GetCode
VB6 Procedure
Function GetCode(ByRef CodeName As String) As Long
Parameters
CodeName
This is one of the following steel design code names.
AASHTO LRFD 2007
AISC-ASD89
AISC 360-10
AISC360-05/IBC2006
AISC-LRFD93
API RP2A-LRFD 97
API RP2A-WSD2000
API RP2A-WSD2014
AS 4100-1998
ASCE 10-97
BS5950 2000
Chinese 2010
CSA S16-14
CSA-S16-09
EUROCODE 3-2005
Indian IS 800-2007
Italian NTC 2008
Italian UNI 10011
KBC 2009
Norsok N-004 2013
NZS 3404-1997
SP 16.13330.2011
Remarks
This function retrieves the steel design code.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CodeName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get steel design code


ret = SapModel.DesignSteel.GetCode(CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified list of codes contained in the CodeName Parameter in version 15.0.1.
Added Norsok N-004 2013 in version 16.1.0.
Updated list of code names in version 17.3.0.
Removed older codes which have been removed from the program in v18.0.0.
Updated list of available codes in v19.1.0.
See Also
SetCode
GetComboAutoGenerate
Syntax
SapObject.SapModel.DesignSteel.GetComboAutoGenerate
VB6 Procedure
Function GetComboAutoGenerate(ByRef AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for steel frame design is turned on. If it is False, the option is
turned off.
Remarks
This function retrieves the value of the automatically generated code-based
design load combinations option for steel frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub GetSteelDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoGenerate As Boolean
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set option to not auto generate code-based design load


combinations
ret =
SapModel.DesignSteel.GetComboAutoGenerate(AutoGenerate)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetComboAutoGenerate
GetComboDeflection
Syntax
SapObject.SapModel.DesignSteel.GetComboDeflection
VB6 Procedure
Function GetComboDeflection(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for steel
deflection design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for steel deflection design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for steel deflection design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default steel design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for steel deflection design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignSteel.SetComboDeflection(MyName2(i),
Selected)
Next i

'get combos selected for steel deflection design


ret = SapModel.DesignSteel.GetComboDeflection(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboDeflection
GetComboStrength
Syntax
SapObject.SapModel.DesignSteel.GetComboStrength
VB6 Procedure
Function GetComboStrength(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for steel
strength design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for steel strength design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for steel strength design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default steel design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for steel strength design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignSteel.SetComboStrength(MyName2(i),
Selected)
Next i

'get combos selected for steel strength design


ret = SapModel.DesignSteel.GetComboStrength(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboStrength
GetDetailResultsText
Syntax
SapObject.SapModel.DesignSteel.GetDetailResultsText
VB6 Procedure
Public Function GetDetailResultsText(ByVal Name As String, ByVal ItemType As
eItemType, ByVal Table As Long, ByVal Field As String, ByRef NumberItems As
Long, FrameName() As String, Text() As String) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the design results are retrieved for the frame object specified
by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected frame
objects, and the Name item is ignored.

Table
The table ID of the steel design output database Tables. The table names are input
as the representative table numbers and are code-based. Please see the following
appendix.

Field
The field name with TEXT output data type in the specified steel design result
database Tables. The Field Names need to be the exactly same as the names in the
specified steel design output database tables except the case is insensitive.

NumberItems
The number of frame objects for which results are obtained.

FrameName
The frame object names for which results are obtained.

Text
The design results with TEXT output data type of the request field in the request
table for the specified frame objects.
Remarks
This function retrieves the design results from steel design output database tables.
Note that the summary table of all design codes is not included in this function.

The function returns zero if the results are successfully retrieved; otherwise it returns
a nonzero value.
VBA Example
Sub GetSteelDesignDetailResultsText ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModelDim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim Text() As String

'create Sap2000 object


Set SapObject =
CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")
ret = SapModel.DesignSteel.StartDesign

'get summary result data


ret = SapModel.DesignSteel. GetDetailResultsText("8", 0,
2, "DesignSect", NumberItems, FrameName(), Text())

'close Sap2000SapObject.ApplicationExit False


Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetDetailResultsValue
Appendix The available table index for selected design codes
"AISC360-05/IBC2006"

2: "Steel Design 2 - PMM Details - AISC360-05-IBC2006"

3: "Steel Design 3 - Shear Details - AISC360-05-IBC2006"

4: "Steel Design 4 - Continuity Plates - AISC360-05-IBC2006"

5: "Steel Design 5 - Doubler Plates - AISC360-05-IBC2006"

6: "Steel Design 6 - Beam/Column Ratios - AISC360-05-IBC2006"

7: "Steel Design 7 - Beam Shear Forces - AISC360-05-IBC2006"

8: "Steel Design 8 - Brace Max Axial Load - AISC360-05-IBC2006"

9: "Steel Design 9 - Decision Parameters - AISC360-05-IBC2006"

"AISC-ASD89"

2: "Steel Design 2 - PMM Details - AISC-ASD89"

3: "Steel Design 3 - Shear Details - AISC-ASD89"

4: "Steel Design 4 - Continuity Plates - AISC-ASD89"

5: "Steel Design 5 - Doubler Plates - AISC-ASD89"

6: "Steel Design 6 - Beam/Column Ratios - AISC-ASD89"

7: "Steel Design 7 - Beam Shear Forces - AISC-ASD89"

8: "Steel Design 8 - Brace Max Axial Load - AISC-ASD89"

"AISC-ASD01"

2: "Steel Design 2 - PMM Details - AISC-ASD01"

3: "Steel Design 3 - Shear Details - AISC-ASD01"

4: "Steel Design 4 - Continuity Plates - AISC-ASD01"


5: "Steel Design 5 - Doubler Plates - AISC-ASD01"

6: "Steel Design 6 - Beam/Column Ratios - AISC-ASD01"

7: "Steel Design 7 - Beam Shear Forces - AISC-ASD01"

8: "Steel Design 8 - Brace Max Axial Load - AISC-ASD01"

"AISC-LRFD99"

2: "Steel Design 2 - PMM Details - AISC-LRFD99"

3: "Steel Design 3 - Shear Details - AISC-LRFD99"

4: "Steel Design 4 - Continuity Plates - AISC-LRFD99"

5: "Steel Design 5 - Doubler Plates - AISC-LRFD99"

6: "Steel Design 6 - Beam/Column Ratios - AISC-LRFD99"

7: "Steel Design 7 - Beam Shear Forces - AISC-LRFD99"

8: "Steel Design 8 - Brace Max Axial Load - AISC-LRFD99"

"AISC-LRFD93"

2: "Steel Design 2 - PMM Details - AISC-LRFD93"

3: "Steel Design 3 - Shear Details - AISC-LRFD93"

4: "Steel Design 4 - Continuity Plates - AISC-LRFD93"

5: "Steel Design 5 - Doubler Plates - AISC-LRFD93"

6: "Steel Design 6 - Beam/Column Ratios - AISC-LRFD93"

7: "Steel Design 7 - Beam Shear Forces - AISC-LRFD93"

8: "Steel Design 8 - Brace Max Axial Load - AISC-LRFD93"


"AASHTO LRFD 2007"

2: "Steel Design 2 - PMM Details - AASHTO-LRFD-2007"

3: "Steel Design 3 - Shear Details - AASHTO-LRFD-2007"

4: "Steel Design 4 - Continuity Plates - AASHTO-LRFD-2007"

5: "Steel Design 5 - Doubler Plates - AASHTO-LRFD-2007"

6: "Steel Design 6 - Beam/Column Ratios - AASHTO-LRFD-2007"

7: "Steel Design 7 - Beam Shear Forces - AASHTO-LRFD-2007"

8: "Steel Design 8 - Brace Max Axial Load - AASHTO-LRFD-2007"

"API RP2A-LRFD 97"

2: "Steel Design 2 - PMM Details - API RP2A-LRFD 97"

3: "Steel Design 2 - PMM Details for Pipes - API RP2A-LRFD 97"

4: "Steel Design 3 - Shear Details - API RP2A-LRFD 97"

5: "Steel Design 4 - Continuity Plates - API RP2A-LRFD 97"

6: "Steel Design 5 - Doubler Plates - API RP2A-LRFD 97"

7: "Steel Design 6 - Beam/Column Ratios - API RP2A-LRFD 97"

8: "Steel Design 7 - Beam Shear Forces - API RP2A-LRFD 97"

9: "Steel Design 8 - Brace Max Axial Load - API RP2A-LRFD 97"

"API RP2A-WSD2000"

2: "Steel Design 2 - PMM Details - API RP2A-WSD2000"

3: "Steel Design 2 - PMM Details for Pipes - API RP2A-WSD2000"

4: "Steel Design 3 - Shear Details - API RP2A-WSD2000"


5: "Steel Design 4 - Continuity Plates - API RP2A-WSD2000"

6: "Steel Design 5 - Doubler Plates - API RP2A-WSD2000"

7: "Steel Design 6 - Beam/Column Ratios - API RP2A-WSD2000"

8: "Steel Design 7 - Beam Shear Forces - API RP2A-WSD2000"

9: "Steel Design 8 - Brace Max Axial Load - API RP2A-WSD2000"

"AS 4100-1998"

2: "Steel Design 2 - PMM Details - AS 4100-1998"

3: "Steel Design 3 - Shear Details - AS 4100-1998"

4: "Steel Design 4 - Continuity Plates - AS 4100-1998"

5: "Steel Design 5 - Doubler Plates - AS 4100-1998"

6: "Steel Design 6 - Beam/Column Ratios - AS 4100-1998"

7: "Steel Design 7 - Beam Shear Forces - AS 4100-1998"

8: "Steel Design 8 - Brace Max Axial Load - AS 4100-1998"

"ASCE 10-97"

2: "Steel Design 2 - PMM Details - ASCE 10-97"

3: "Steel Design 2 - PMM Details for Angles - ASCE 10-97"

4: "Steel Design 3 - Shear Details - ASCE 10-97"

5: "Steel Design 3 - Shear Details for Angles - ASCE 10-97"

6: "Steel Design 4 - Continuity Plates - ASCE 10-97"

7: "Steel Design 5 - Doubler Plates - ASCE 10-97"

8: "Steel Design 6 - Beam/Column Ratios - ASCE 10-97"

9: "Steel Design 7 - Beam Shear Forces - ASCE 10-97"


10: "Steel Design 8 - Brace Max Axial Load - ASCE 10-97"

"EUROCODE 3-1993"

2: "Steel Design 2 - PMM Details - EUROCODE 3-1993"

3: "Steel Design 3 - Shear Details - EUROCODE 3-1993"

4: "Steel Design 4 - Continuity Plates - EUROCODE 3-1993"

5: "Steel Design 5 - Doubler Plates - EUROCODE 3-1993"

6: "Steel Design 6 - Beam/Column Ratios - EUROCODE 3-1993"

7: "Steel Design 7 - Beam Shear Forces - EUROCODE 3-1993"

8: "Steel Design 8 - Brace Max Axial Load - EUROCODE 3-1993"

"Eurocode 3-2005"

2: "Steel Design 2 - PMM Details - Eurocode 3-2005"

3: "Steel Design 3 - Shear Details - Eurocode 3-2005"

4: "Steel Design 4 - Continuity Plates - Eurocode 3-2005"

5: "Steel Design 5 - Doubler Plates - Eurocode 3-2005"

6: "Steel Design 6 - Beam/Column Ratios - Eurocode 3-2005"

7: "Steel Design 7 - Beam Shear Forces - Eurocode 3-2005"

8: "Steel Design 8 - Brace Max Axial Load - Eurocode 3-2005"

"Indian IS 800:2007"

2: "Steel Design 2 - PMM Details - Indian IS 800:2007"

3: "Steel Design 3 - Shear Details - Indian IS 800:2007"

4: "Steel Design 4 - Continuity Plates - Indian IS 800:2007"


5: "Steel Design 5 - Doubler Plates - Indian IS 800:2007"

6: "Steel Design 6 - Beam/Column Ratios - Indian IS 800:2007"

7: "Steel Design 7 - Beam Shear Forces - Indian IS 800:2007"

8: "Steel Design 8 - Brace Max Axial Load - Indian IS 800:2007"

"Italian UNI 10011"

2: "Steel Design 2 - PMM Details - Italian UNI 10011"

3: "Steel Design 3 - Shear Details - Italian UNI 10011"

4: "Steel Design 4 - Continuity Plates - Italian UNI 10011"

5: "Steel Design 5 - Doubler Plates - Italian UNI 10011"

6: "Steel Design 6 - Beam/Column Ratios - Italian UNI 10011"

7: "Steel Design 7 - Beam Shear Forces - Italian UNI 10011"

8: "Steel Design 8 - Brace Max Axial Load - Italian UNI 10011"

"NZS 3404-1997"

2: "Steel Design 2 - PMM Details - NZS 3404-1997"

3: "Steel Design 3 - Shear Details - NZS 3404-1997"

4: "Steel Design 4 - Continuity Plates - NZS 3404-1997"

5: "Steel Design 5 - Doubler Plates - NZS 3404-1997"

6: "Steel Design 6 - Beam/Column Ratios - NZS 3404-1997"

7: "Steel Design 7 - Beam Shear Forces - NZS 3404-1997"

8: "Steel Design 8 - Brace Max Axial Load - NZS 3404-1997"

"Norsok N-004"
2: "Steel Design 2 - PMM Details - Norsok N-004"

3: "Steel Design 2 - PMM Details for Pipes - Norsok N-004"

4: "Steel Design 3 - Shear Details - Norsok N-004"

5: "Steel Design 4 - Continuity Plates - Norsok N-004"

6: "Steel Design 5 - Doubler Plates - Norsok N-004"

7: "Steel Design 6 - Beam/Column Ratios - Norsok N-004"

8: "Steel Design 7 - Beam Shear Forces - Norsok N-004"

9: "Steel Design 8 - Brace Max Axial Load - Norsok N-004"

"UBC97-ASD"

2: "Steel Design 2 - PMM Details - UBC97-ASD"

3: "Steel Design 3 - Shear Details - UBC97-ASD"

4: "Steel Design 4 - Continuity Plates - UBC97-ASD"

5: "Steel Design 5 - Doubler Plates - UBC97-ASD"

6: "Steel Design 6 - Beam/Column Ratios - UBC97-ASD"

7: "Steel Design 7 - Beam Shear Forces - UBC97-ASD"

8: "Steel Design 8 - Brace Max Axial Load - UBC97-ASD"

"UBC97-LRFD"

2: "Steel Design 2 - PMM Details - UBC97-LRFD"

3: "Steel Design 3 - Shear Details - UBC97-LRFD"

4: "Steel Design 4 - Continuity Plates - UBC97-LRFD"

5: "Steel Design 5 - Doubler Plates - UBC97-LRFD"

6: "Steel Design 6 - Beam/Column Ratios - UBC97-LRFD"


7: "Steel Design 7 - Beam Shear Forces - UBC97-LRFD"

8: "Steel Design 8 - Brace Max Axial Load - UBC97-LRFD"


GetDetailResultsValue
Syntax
SapObject.SapModel.DesignSteel.GetDetailResultsValue
VB6 Procedure
Public Function GetDetailResultsValue(ByVal Name As String, ByVal ItemType As
eItemType, ByVal Table As Long, ByVal Field As String, ByRef NumberItems As
Long, FrameName() As String, Text() As String) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.

ItemType
This is one of the following items in the eItemType enumeration:

Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the design results are retrieved for the frame object specified
by the Name item.

If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.

If this item is SelectedObjects, the design results are retrieved for all selected frame
objects, and the Name item is ignored.

Table
The table ID of the steel design output database Tables. The table names are input
as the representative table numbers and are code-based. Please see the following
appendix.

Field
The field name with Numerical output data type in the specified steel design result
database Tables. The Field Names need to be the exactly same as the names in the
specified steel design output database tables except the case is insensitive.

NumberItems
The number of frame objects for which results are obtained.

FrameName
The frame object names for which results are obtained.

Value
The design results with Numerical output data type of the request field in the request
table for the specified frame objects.
Remarks
This function retrieves the design results from steel design output database tables.
Note that the summary table of all design codes is not included in this function.

The function returns zero if the results are successfully retrieved; otherwise it returns
a nonzero value.
VBA Example
Sub GetSteelDesignDetailResultsValue ()
'dimension variables
Dim SapObject As Sap2000v16.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim Text() As String

'create Sap2000 object


Set SapObject = New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2,
288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")
ret = SapModel.DesignSteel.StartDesign

'get summary result data


ret = SapModel.DesignSteel. GetDetailResultsValue("8",
0, 2, "Pr", NumberItems, FrameName(), Value())

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetDetailResultsText
Appendix The available table index for selected design codes
"AISC360-05/IBC2006"

2: "Steel Design 2 - PMM Details - AISC360-05-IBC2006"

3: "Steel Design 3 - Shear Details - AISC360-05-IBC2006"

4: "Steel Design 4 - Continuity Plates - AISC360-05-IBC2006"

5: "Steel Design 5 - Doubler Plates - AISC360-05-IBC2006"

6: "Steel Design 6 - Beam/Column Ratios - AISC360-05-IBC2006"

7: "Steel Design 7 - Beam Shear Forces - AISC360-05-IBC2006"

8: "Steel Design 8 - Brace Max Axial Load - AISC360-05-IBC2006"

9: "Steel Design 9 - Decision Parameters - AISC360-05-IBC2006"

"AISC-ASD89"

2: "Steel Design 2 - PMM Details - AISC-ASD89"

3: "Steel Design 3 - Shear Details - AISC-ASD89"

4: "Steel Design 4 - Continuity Plates - AISC-ASD89"

5: "Steel Design 5 - Doubler Plates - AISC-ASD89"

6: "Steel Design 6 - Beam/Column Ratios - AISC-ASD89"

7: "Steel Design 7 - Beam Shear Forces - AISC-ASD89"

8: "Steel Design 8 - Brace Max Axial Load - AISC-ASD89"

"AISC-ASD01"

2: "Steel Design 2 - PMM Details - AISC-ASD01"

3: "Steel Design 3 - Shear Details - AISC-ASD01"

4: "Steel Design 4 - Continuity Plates - AISC-ASD01"


5: "Steel Design 5 - Doubler Plates - AISC-ASD01"

6: "Steel Design 6 - Beam/Column Ratios - AISC-ASD01"

7: "Steel Design 7 - Beam Shear Forces - AISC-ASD01"

8: "Steel Design 8 - Brace Max Axial Load - AISC-ASD01"

"AISC-LRFD99"

2: "Steel Design 2 - PMM Details - AISC-LRFD99"

3: "Steel Design 3 - Shear Details - AISC-LRFD99"

4: "Steel Design 4 - Continuity Plates - AISC-LRFD99"

5: "Steel Design 5 - Doubler Plates - AISC-LRFD99"

6: "Steel Design 6 - Beam/Column Ratios - AISC-LRFD99"

7: "Steel Design 7 - Beam Shear Forces - AISC-LRFD99"

8: "Steel Design 8 - Brace Max Axial Load - AISC-LRFD99"

"AISC-LRFD93"

2: "Steel Design 2 - PMM Details - AISC-LRFD93"

3: "Steel Design 3 - Shear Details - AISC-LRFD93"

4: "Steel Design 4 - Continuity Plates - AISC-LRFD93"

5: "Steel Design 5 - Doubler Plates - AISC-LRFD93"

6: "Steel Design 6 - Beam/Column Ratios - AISC-LRFD93"

7: "Steel Design 7 - Beam Shear Forces - AISC-LRFD93"

8: "Steel Design 8 - Brace Max Axial Load - AISC-LRFD93"


"AASHTO LRFD 2007"

2: "Steel Design 2 - PMM Details - AASHTO-LRFD-2007"

3: "Steel Design 3 - Shear Details - AASHTO-LRFD-2007"

4: "Steel Design 4 - Continuity Plates - AASHTO-LRFD-2007"

5: "Steel Design 5 - Doubler Plates - AASHTO-LRFD-2007"

6: "Steel Design 6 - Beam/Column Ratios - AASHTO-LRFD-2007"

7: "Steel Design 7 - Beam Shear Forces - AASHTO-LRFD-2007"

8: "Steel Design 8 - Brace Max Axial Load - AASHTO-LRFD-2007"

"API RP2A-LRFD 97"

2: "Steel Design 2 - PMM Details - API RP2A-LRFD 97"

3: "Steel Design 2 - PMM Details for Pipes - API RP2A-LRFD 97"

4: "Steel Design 3 - Shear Details - API RP2A-LRFD 97"

5: "Steel Design 4 - Continuity Plates - API RP2A-LRFD 97"

6: "Steel Design 5 - Doubler Plates - API RP2A-LRFD 97"

7: "Steel Design 6 - Beam/Column Ratios - API RP2A-LRFD 97"

8: "Steel Design 7 - Beam Shear Forces - API RP2A-LRFD 97"

9: "Steel Design 8 - Brace Max Axial Load - API RP2A-LRFD 97"

"API RP2A-WSD2000"

2: "Steel Design 2 - PMM Details - API RP2A-WSD2000"

3: "Steel Design 2 - PMM Details for Pipes - API RP2A-WSD2000"

4: "Steel Design 3 - Shear Details - API RP2A-WSD2000"


5: "Steel Design 4 - Continuity Plates - API RP2A-WSD2000"

6: "Steel Design 5 - Doubler Plates - API RP2A-WSD2000"

7: "Steel Design 6 - Beam/Column Ratios - API RP2A-WSD2000"

8: "Steel Design 7 - Beam Shear Forces - API RP2A-WSD2000"

9: "Steel Design 8 - Brace Max Axial Load - API RP2A-WSD2000"

"AS 4100-1998"

2: "Steel Design 2 - PMM Details - AS 4100-1998"

3: "Steel Design 3 - Shear Details - AS 4100-1998"

4: "Steel Design 4 - Continuity Plates - AS 4100-1998"

5: "Steel Design 5 - Doubler Plates - AS 4100-1998"

6: "Steel Design 6 - Beam/Column Ratios - AS 4100-1998"

7: "Steel Design 7 - Beam Shear Forces - AS 4100-1998"

8: "Steel Design 8 - Brace Max Axial Load - AS 4100-1998"

"ASCE 10-97"

2: "Steel Design 2 - PMM Details - ASCE 10-97"

3: "Steel Design 2 - PMM Details for Angles - ASCE 10-97"

4: "Steel Design 3 - Shear Details - ASCE 10-97"

5: "Steel Design 3 - Shear Details for Angles - ASCE 10-97"

6: "Steel Design 4 - Continuity Plates - ASCE 10-97"

7: "Steel Design 5 - Doubler Plates - ASCE 10-97"

8: "Steel Design 6 - Beam/Column Ratios - ASCE 10-97"

9: "Steel Design 7 - Beam Shear Forces - ASCE 10-97"


10: "Steel Design 8 - Brace Max Axial Load - ASCE 10-97"

"EUROCODE 3-1993"

2: "Steel Design 2 - PMM Details - EUROCODE 3-1993"

3: "Steel Design 3 - Shear Details - EUROCODE 3-1993"

4: "Steel Design 4 - Continuity Plates - EUROCODE 3-1993"

5: "Steel Design 5 - Doubler Plates - EUROCODE 3-1993"

6: "Steel Design 6 - Beam/Column Ratios - EUROCODE 3-1993"

7: "Steel Design 7 - Beam Shear Forces - EUROCODE 3-1993"

8: "Steel Design 8 - Brace Max Axial Load - EUROCODE 3-1993"

"Eurocode 3-2005"

2: "Steel Design 2 - PMM Details - Eurocode 3-2005"

3: "Steel Design 3 - Shear Details - Eurocode 3-2005"

4: "Steel Design 4 - Continuity Plates - Eurocode 3-2005"

5: "Steel Design 5 - Doubler Plates - Eurocode 3-2005"

6: "Steel Design 6 - Beam/Column Ratios - Eurocode 3-2005"

7: "Steel Design 7 - Beam Shear Forces - Eurocode 3-2005"

8: "Steel Design 8 - Brace Max Axial Load - Eurocode 3-2005"

"Indian IS 800:2007"

2: "Steel Design 2 - PMM Details - Indian IS 800:2007"

3: "Steel Design 3 - Shear Details - Indian IS 800:2007"

4: "Steel Design 4 - Continuity Plates - Indian IS 800:2007"


5: "Steel Design 5 - Doubler Plates - Indian IS 800:2007"

6: "Steel Design 6 - Beam/Column Ratios - Indian IS 800:2007"

7: "Steel Design 7 - Beam Shear Forces - Indian IS 800:2007"

8: "Steel Design 8 - Brace Max Axial Load - Indian IS 800:2007"

"Italian UNI 10011"

2: "Steel Design 2 - PMM Details - Italian UNI 10011"

3: "Steel Design 3 - Shear Details - Italian UNI 10011"

4: "Steel Design 4 - Continuity Plates - Italian UNI 10011"

5: "Steel Design 5 - Doubler Plates - Italian UNI 10011"

6: "Steel Design 6 - Beam/Column Ratios - Italian UNI 10011"

7: "Steel Design 7 - Beam Shear Forces - Italian UNI 10011"

8: "Steel Design 8 - Brace Max Axial Load - Italian UNI 10011"

"NZS 3404-1997"

2: "Steel Design 2 - PMM Details - NZS 3404-1997"

3: "Steel Design 3 - Shear Details - NZS 3404-1997"

4: "Steel Design 4 - Continuity Plates - NZS 3404-1997"

5: "Steel Design 5 - Doubler Plates - NZS 3404-1997"

6: "Steel Design 6 - Beam/Column Ratios - NZS 3404-1997"

7: "Steel Design 7 - Beam Shear Forces - NZS 3404-1997"

8: "Steel Design 8 - Brace Max Axial Load - NZS 3404-1997"

"Norsok N-004"
2: "Steel Design 2 - PMM Details - Norsok N-004"

3: "Steel Design 2 - PMM Details for Pipes - Norsok N-004"

4: "Steel Design 3 - Shear Details - Norsok N-004"

5: "Steel Design 4 - Continuity Plates - Norsok N-004"

6: "Steel Design 5 - Doubler Plates - Norsok N-004"

7: "Steel Design 6 - Beam/Column Ratios - Norsok N-004"

8: "Steel Design 7 - Beam Shear Forces - Norsok N-004"

9: "Steel Design 8 - Brace Max Axial Load - Norsok N-004"

"UBC97-ASD"

2: "Steel Design 2 - PMM Details - UBC97-ASD"

3: "Steel Design 3 - Shear Details - UBC97-ASD"

4: "Steel Design 4 - Continuity Plates - UBC97-ASD"

5: "Steel Design 5 - Doubler Plates - UBC97-ASD"

6: "Steel Design 6 - Beam/Column Ratios - UBC97-ASD"

7: "Steel Design 7 - Beam Shear Forces - UBC97-ASD"

8: "Steel Design 8 - Brace Max Axial Load - UBC97-ASD"

"UBC97-LRFD"

2: "Steel Design 2 - PMM Details - UBC97-LRFD"

3: "Steel Design 3 - Shear Details - UBC97-LRFD"

4: "Steel Design 4 - Continuity Plates - UBC97-LRFD"

5: "Steel Design 5 - Doubler Plates - UBC97-LRFD"

6: "Steel Design 6 - Beam/Column Ratios - UBC97-LRFD"


7: "Steel Design 7 - Beam Shear Forces - UBC97-LRFD"

8: "Steel Design 8 - Brace Max Axial Load - UBC97-LRFD"


GetDesignSection
Syntax
SapObject.SapModel.DesignSteel.GetDesignSection
VB6 Procedure
Function GetDesignSection(ByVal Name As String, ByRef PropName As String)
As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
PropName
The name of the design section for the specified frame object.
Remarks
This function retrieves the design section for a specified steel frame object.
The function returns zero if the section is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section properties


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")
ret = SapModel.PropFrame.ImportProp("W18X40", "A992Fy50",
"Sections8.pro", "W18X40")
ret = SapModel.PropFrame.ImportProp("W18X46", "A992Fy50",
"Sections8.pro", "W18X46")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "W18X35"
MyName(1) = "W18X40"
MyName(2) = "W18X46"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")
'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get design section


ret = SapModel.DesignSteel.GetDesignSection("8", PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDesignSection
GetGroup
Syntax
SapObject.SapModel.DesignSteel.GetGroup
VB6 Procedure
Function GetGroup(ByRef NumberItems As Long, ByRef MyName() As String)
As Long
Parameters
NumberItems
The number of groups selected for steel design.
MyName
This is an array that includes the name of each group selected for steel design.
Remarks
This function retrieves the names of all groups selected for steel design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'select group for steel design


ret = SapModel.DesignSteel.SetGroup("ALL", True)

'get groups selected for steel design


ret = SapModel.DesignSteel.GetGroup(NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetGroup
GetResultsAvailable {Steel}
Syntax
SapObject.SapModel.DesignSteel.GetResultsAvailable
VB6 Procedure
Function GetResultsAvailable() As Boolean
Parameters
None
Remarks
The function returns True if the steel frame design results are available,
otherwise False.
VBA Example
Sub GetResultsAvailable()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ResultsAvailable As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'check if design results are available


ResultsAvailable = SapModel.DesignSteel.GetResultsAvailable

'close Sap2000
SapObject.ApplicationExit.False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
GetSummaryResults
Syntax
SapObject.SapModel.DesignSteel.GetSummaryResults
VB6 Procedure
Function GetSummaryResults(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef Ratio() As Double, ByRef
RatioType() As Long, ByRef Location() As Double, ByRef ComboName() As
String, ByRef ErrorSummary() As String, ByRef WarningSummary() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
Ratio
This is an array that includes the controlling stress or capacity ratio for each
frame object.
RatioType
This is an array that includes 1, 2, 3, 4, 5 or 6, indicating the controlling stress or
capacity ratio type for each frame object.
1= PMM
2= Major shear
3= Minor shear
4= Major beam-column capacity ratio
5= Minor beam-column capacity ratio
6= Other
Location
This is an array that includes the distance from the I-end of the frame object to
the location where the controlling stress or capacity ratio occurs. [L]
ComboName
This is an array that includes the name of the design combination for which the
controlling stress or capacity ratio occurs.
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for steel design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim FrameName() As String
Dim Ratio() As Double
Dim RatioType() As Long
Dim Location() As Double
Dim ComboName() As String
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get summary result data


ret = SapModel.DesignSteel.GetSummaryResults("8",
NumberItems, FrameName, Ratio, RatioType, Location, ComboName,
ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetTargetDispl
Syntax
SapObject.SapModel.DesignSteel.GetTargetDispl
VB6 Procedure
Function GetTargetDispl(ByRef NumberItems As Long, ByRef LoadCase() As
String, ByRef Point() As String, ByRef Displ() As Double, ByRef Active As
Boolean) As Long
Parameters
NumberItems
The number of lateral displacement targets specified.
LoadCase
This is an array that includes the name of the static linear load case associated
with each lateral displacement target.
Point
This is an array that includes the name of the point object associated to which
the lateral displacement target applies.
Displ
This is an array that includes the lateral displacement target. [L]
Active
If this item is True, all specified lateral displacement targets are active. If it is
False, they are inactive.
Remarks
This function retrieves lateral displacement targets for steel design.
The function returns zero if the targets are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignTargetDispl()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLCase() As String
Dim MyPoint() As String
Dim MyDispl() As Double
Dim NumberItems As Long
Dim LoadCase() As String
Dim Point() As String
Dim Displ() As Double
Dim Active As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 3, 0.4, 0, 0, 1, 3, 5, 0, 0,
1.15, 6)

'set target displacement data


ReDim MyLCase(0)
ReDim MyPoint(0)
ReDim MyDispl(0)
MyLCase(0) = "EQX"
MyPoint(0) = "3"
MyDispl(0) = 0.4
ret = SapModel.DesignSteel.SetTargetDispl(1, MyLCase,
MyPoint, MyDispl)

'get target displacement data


ret = SapModel.DesignSteel.GetTargetDispl(NumberItems,
LoadCase, Point, Displ, Active)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTargetDispl
GetTargetPeriod
Syntax
SapObject.SapModel.DesignSteel.GetTargetPeriod
VB6 Procedure
Function GetTargetPeriod(ByRef NumberItems As Long, ByRef ModalCase As
String, ByRef Mode() As Long, ByRef Period() As Double, ByRef Active As
Boolean) As Long
Parameters
NumberItems
The number of lateral displacement targets specified.
ModalCase
The name of the modal load case for which the target periods apply.
Mode
This is an array that includes the mode number associated with each target
period.
Period
This is an array that includes the target periods. [s]
Active
If this item is True, all specified target periods are active. If it is False, they are
inactive.
Remarks
This function retrieves time period targets for steel design.
The function returns zero if the targets are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignTargetPeriod()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyPeriod() As Double
Dim NumberItems As Long
Dim ModalCase As String
Dim Mode() As Long
Dim Period() As Double
Dim Active As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set target period data


ReDim MyLCase(0)
ReDim MyMode(1)
ReDim MyPeriod(1)
MyMode(0) = 1
MyPeriod(0) = 0.6
MyMode(1) = 2
MyPeriod(1) = 0.5
ret = SapModel.DesignSteel.SetTargetPeriod(2, "MODAL",
MyMode, MyPeriod)

'get target period data


ret = SapModel.DesignSteel.GetTargetPeriod(NumberItems,
ModalCase, Mode, Period, Active)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetTargetPeriod
ResetOverwrites
Syntax
SapObject.SapModel.DesignSteel.ResetOverwrites
VB6 Procedure
Function ResetOverwrites() As Long
Parameters
None
Remarks
This function resets all steel frame design overwrites to default values.
The function returns zero if the overwrites are successfully reset; otherwise it
returns a nonzero value.
The function will fail if no steel frame objects are present.
VBA Example
Sub ResetSteelDesignOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'reset steel design overwrites


ret = SapModel.DesignSteel.ResetOverwrites

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetAutoSelectNull
Syntax
SapObject.SapModel.DesignSteel.SetAutoSelectNull
VB6 Procedure
Function SetAutoSelectNull(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function removes the auto select section assignments from all specified
frame objects that have a steel frame design procedure.
The function returns zero if the auto select section assignments are
successfully removed; otherwise it returns a nonzero value.
VBA Example
Sub SetSteelAutoSelectSectionsNull()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section properties


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")
ret = SapModel.PropFrame.ImportProp("W18X40", "A992Fy50",
"Sections8.pro", "W18X40")
ret = SapModel.PropFrame.ImportProp("W18X46", "A992Fy50",
"Sections8.pro", "W18X46")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "W18X35"
MyName(1) = "W18X40"
MyName(2) = "W18X46"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")
'set frame object selected
ret = SapModel.FrameObj.SetSelected("8", True)

'set auto select section null


ret =
SapModel.DesignSteel.SetAutoSelectNull("",SelectedObjects)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
Syntax
SapObject.SapModel.DesignSteel.SetCode
VB6 Procedure
Function SetCode(ByVal CodeName As String) As Long
Parameters
CodeName
This is one of the following steel design code names.
AASHTO LRFD 2007
AISC-ASD89
AISC 360-10
AISC360-05/IBC2006
AISC-LRFD93
API RP2A-LRFD 97
API RP2A-WSD2000
API RP2A-WSD2014
AS 4100-1998
ASCE 10-97
BS5950 2000
Chinese 2010
CSA S16-14
CSA-S16-09
EUROCODE 3-2005
Indian IS 800-2007
Italian NTC 2008
Italian UNI 10011
KBC 2009
Norsok N-004 2013
NZS 3404-1997
SP 16.13330.2011
Remarks
This function sets the steel design code.
The function returns zero if the code is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC 360-10")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
In version 14.1.0, added Norway as a Country parameter.
Added Norsok N-004 2013 in version 16.1.0.
Updated list of code names in version 17.3.0.
Removed older codes which have been removed from the program in v18.0.0.
Updated list of available codes in v19.1.0.
See Also
GetCode
SetComboAutoGenerate
Syntax
SapObject.SapModel.DesignSteel.SetComboAutoGenerate
VB6 Procedure
Function SetComboAutoGenerate(ByVal AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for steel frame design is turned on. If it is False, the option is
turned off.
Remarks
This function turns on or off the option to automatically generate code-based
design load combinations for steel frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetSteelDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set option to not auto generate code-based design load


combinations
ret = SapModel.DesignSteel.SetComboAutoGenerate(False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetComboAutoGenerate
SetComboDeflection
Syntax
SapObject.SapModel.DesignSteel.SetComboDeflection
VB6 Procedure
Function SetComboDeflection(ByVal Name As String, ByVal Selected As
Boolean) As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for steel deflection design. If it is False, the combination is not
selected for steel deflection design.
Remarks
This function selects or deselects a load combination for steel deflection design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetSteelDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default steel design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for steel deflection design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignSteel.SetComboDeflection(MyName(i),
Selected)
Next i
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboDeflection
SetComboStrength
Syntax
SapObject.SapModel.DesignSteel.SetComboStrength
VB6 Procedure
Function SetComboStrength(ByVal Name As String, ByVal Selected As Boolean)
As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for steel strength design. If it is False, the combination is not
selected for steel strength design.
Remarks
This function selects or deselects a load combination for steel strength design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetSteelDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default steel design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for steel strength design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignSteel.SetComboStrength(MyName(i),
Selected)
Next i
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboStrength
SetDesignSection
Syntax
SapObject.SapModel.DesignSteel.SetDesignSection
VB6 Procedure
Function SetDesignSection(ByVal Name As String, ByVal PropName As String,
ByVal LastAnalysis As Boolean, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
The name of an existing frame section property to be used as the design section
for the specified frame objects. This item applies only when LastAnalysis =
False.
LastAnalysis
If this item is True, the design section for the specified frame objects is reset to
the last analysis section for the frame object. If it is False, the design section is
set to that specified by PropName.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects, and the Name item is ignored.
Remarks
This function modifies the design section for all specified frame objects that
have a steel frame design procedure.
The function returns zero if the design section is successfully modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetSteelDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section properties


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")
ret = SapModel.PropFrame.ImportProp("W18X40", "A992Fy50",
"Sections8.pro", "W18X40")
ret = SapModel.PropFrame.ImportProp("W18X46", "A992Fy50",
"Sections8.pro", "W18X46")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "W18X35"
MyName(1) = "W18X40"
MyName(2) = "W18X46"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")
'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'set design section


ret = SapModel.DesignSteel.SetDesignSection("8", "W18X46",
False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDesignSection
SetGroup
Syntax
SapObject.SapModel.DesignSteel.SetGroup
VB6 Procedure
Function SetGroup(ByVal Name As String, ByVal Selected As Boolean) As Long
Parameters
Name
The name of an existing group.
Selected
If this item is True, the specified group is selected as a design group for steel
design. If it is False, the group is not selected for steel design.
Remarks
This function selects or deselects a group for steel design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetSteelDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'select group for steel design


ret = SapModel.DesignSteel.SetGroup("ALL", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetGroup
SetTargetDispl
Syntax
SapObject.SapModel.DesignSteel.SetTargetDispl
VB6 Procedure
Function SetTargetDispl(ByVal NumberItems As Long, ByRef LoadCase() As
String, ByRef Point() As String, ByRef Displ() As Double, Optional ByVal Active
As Boolean = True) As Long
Parameters
NumberItems
The number of lateral displacement targets specified.
LoadCase
This is an array that includes the name of the static linear load case associated
with each lateral displacement target.
Point
This is an array that includes the name of the point object associated to which
the lateral displacement target applies.
Displ
This is an array that includes the lateral displacement target. [L]
Active
If this item is True, all specified lateral displacement targets are active. If it is
False, they are inactive.
Remarks
This function sets lateral displacement targets for steel design.
The function returns zero if the targets are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetSteelDesignTargetDispl()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLCase() As String
Dim MyPoint() As String
Dim MyDispl() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign UBC97 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetUBC97("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 3, 0.4, 0, 0, 1, 3, 5, 0, 0,
1.15, 6)

'set target displacement data


ReDim MyLCase(0)
ReDim MyPoint(0)
ReDim MyDispl(0)
MyLCase(0) = "EQX"
MyPoint(0) = "3"
MyDispl(0) = 0.4
ret = SapModel.DesignSteel.SetTargetDispl(1, MyLCase,
MyPoint, MyDispl)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTargetDispl
SetTargetPeriod
Syntax
SapObject.SapModel.DesignSteel.SetTargetPeriod
VB6 Procedure
Function SetTargetPeriod(ByVal NumberItems As Long, ByVal ModalCase As
String, ByRef Mode() As Long, ByRef Period() As Double, Optional ByVal Active
As Boolean = True) As Long
Parameters
NumberItems
The number of lateral displacement targets specified.
ModalCase
The name of the modal load case for which the target periods apply.
Mode
This is an array that includes the mode number associated with each target
period.
Period
This is an array that includes the target periods. [s]
Active
If this item is True, all specified target periods are active. If it is False, they are
inactive.
Remarks
This function sets time period targets for steel design.
The function returns zero if the targets are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetSteelDesignTargetPeriod()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyMode() As Long
Dim MyPeriod() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set target period data


ReDim MyLCase(0)
ReDim MyMode(1)
ReDim MyPeriod(1)
MyMode(0) = 1
MyPeriod(0) = 0.6
MyMode(1) = 2
MyPeriod(1) = 0.5
ret = SapModel.DesignSteel.SetTargetPeriod(2, "MODAL",
MyMode, MyPeriod)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetTargetPeriod
StartDesign
Syntax
SapObject.SapModel.DesignSteel.StartDesign
VB6 Procedure
Function StartDesign() As Long
Parameters
None
Remarks
This function starts the steel frame design.
The function returns zero if the steel frame design is successfully started;
otherwise it returns a nonzero value.
The function will fail if no steel frame objects are present. It will also fail if
analysis results are not available.
VBA Example
Sub StartSteelDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifyPassed
Syntax
SapObject.SapModel.DesignSteel.VerifyPassed
VB6 Procedure
Function VerifyPassed(ByRef NumberItems As Long, ByRef n1 As Long, ByRef
n2 As Long, ByRef MyName() As String) As Long
Parameters
NumberItems
The number of steel frame objects that did not pass the design check or have
not yet been checked.
n1
The number of steel frame objects that did not pass the design check.
n2
The number of steel frame objects that have not yet been checked.
MyName
This is an array that includes the name of each frame object that did not pass
the design check or has not yet been checked.
Remarks
This function retrieves the names of the frame objects that did not pass the
design check or have not yet been checked, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifySteelDesignPassed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName2() As String
Dim NumberItems As Long
Dim n1 As Long
Dim n2 As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section properties


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")
ret = SapModel.PropFrame.ImportProp("W18X40", "A992Fy50",
"Sections8.pro", "W18X40")
ret = SapModel.PropFrame.ImportProp("W18X46", "A992Fy50",
"Sections8.pro", "W18X46")

'define new auto select list frame section property


ReDim MyName2(2)
MyName2(0) = "W18X35"
MyName2(1) = "W18X40"
MyName2(2) = "W18X46"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName2)
'set frame section properties
ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'verify frame objects successfully designed


ret = SapModel.DesignSteel.VerifyPassed(NumberItems, n1, n2,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifySections
Syntax
SapObject.SapModel.DesignSteel.VerifySections
VB6 Procedure
Function VerifySections(ByRef NumberItems As Long, ByRef MyName() As
String) As Long
Parameters
NumberItems
The number of frame objects that have different analysis and design sections.
MyName
This is an array that includes the name of each frame object that has different
analysis and design sections.
Remarks
This function retrieves the names of the frame objects that have different
analysis and design sections, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifySteelDesignSections()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName2() As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section properties


ret = SapModel.PropFrame.ImportProp("W18X35", "A992Fy50",
"Sections8.pro", "W18X35")
ret = SapModel.PropFrame.ImportProp("W18X40", "A992Fy50",
"Sections8.pro", "W18X40")
ret = SapModel.PropFrame.ImportProp("W18X46", "A992Fy50",
"Sections8.pro", "W18X46")

'define new auto select list frame section property


ReDim MyName2(2)
MyName2(0) = "W18X35"
MyName2(1) = "W18X40"
MyName2(2) = "W18X46"
ret = SapModel.PropFrame.SetAutoSelectSteel("AUTO1", 3,
MyName2)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'verify analysis versus design section


ret = SapModel.DesignSteel.VerifySections(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC360_05_IBC2006.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 43, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, K1 Major
22 = Effective length factor, K1 Minor
23 = Effective length factor, K2 Major
24 = Effective length factor, K2 Minor
25 = Effective length factor, K Lateral Torsional Buckling
26 = Moment coefficient, Cm Major
27 = Moment coefficient, Cm Minor
28 = Bending coefficient, Cb
29 = Nonsway moment factor, B1 Major
30 = Nonsway moment factor, B1 Minor
31 = Sway moment factor, B2 Major
32 = Sway moment factor, B2 Minor
33 = Reduce HSS thickness
34 = HSS welding type
35 = Yield stress, Fy
36 = Expected to specified Fy ratio, Ry
37 = Compressive capacity, Pnc
38 = Tensile capacity, Pnt
39 = Major bending capacity, Mn3
40 = Minor bending capacity, Mn2
41 = Major shear capacity, Vn2
42 = Minor shear capacity, Vn3
43 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program default
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
8 = Total load deflection limit, L/Value
Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K1 Major


Value >= 0; 0 means use program determined value.
22 = Effective length factor, K1 Minor
Value >= 0; 0 means use program determined value.

23 = Effective length factor, K2 Major


Value >= 0; 0 means use program determined value.

24 = Effective length factor, K2 Minor


Value >= 0; 0 means use program determined value.

25 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

26 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

27 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

28 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

29 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

30 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

31 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

32 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

33 = Reduce HSS thickness


0 = Program default
1 = No
2 = Yes

34 = HSS welding type


0 = Program default
1 = ERW
2 = SAW
35 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

36 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

37 = Compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mn3


Value >= 0; 0 means use program determined value. [FL]

40 = Minor bending capacity, Mn2


Value >= 0; 0 means use program determined value. [FL]

41 = Major shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

42 = Minor shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]

43 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC360_05_IBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.AISC360_05_IBC2006.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC360_05_IBC2006.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 26, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design category
3 = Design provision
4 = Analysis method (Obsolete, replaced by 27, 28, and 29)
5 = Notional load coefficient
6 = Phi bending
7 = Phi compression
8 = Phi tension yielding
9 = Phi tension fracture
10 = Phi shear
11 = Phi shear sort webbed rolled I
12 = Phi torsion
13 = Ignore seismic code
14 = Ignore special seismic load
15 = Doubler plate is plug welded
16 = HSS welding type
17 = Reduce HSS thickness
18 = Consider deflection
19 = DL deflection limit, L/Value
20 = SDL + LL deflection limit, L/Value
21 = LL deflection limit, L/Value
22 = Total load deflection limit, L/Value
23 = Total camber limit, L/Value
24 = Pattern live load factor
25 = Demand/capacity ratio limit
26 = Multi-response case design
27 = Analysis Method
28 = Second Order Method
29 = Stiffness Reduction Method
30 = Importance Factor
31 = Design Systems Rho
32 = Design Systems Sds
33 = Design Systems R
34 = Design Systems Omega0
35 = Design Systems Cd

Value
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

3 = Design provision
1 = LRFD
2 = ASD

4 = Analysis method (Obsolete, replaced by 27, 28, and 29)


1 = Gen 2nd Order Elastic
2 = 2nd Order By Amp 1st Order
3 = Limited 1st Order Elastic
4 = DAM Gen 2nd Order Taub Variable
5 = DAM Gen 2nd Order Taub Fixed
6 = DAM Amp 1st Order Taub Variable
7 = DAM Amp 1st Order Taub Fixed

5 = Notional load coefficient


Value > 0

6 = Phi bending
Value > 0

7 = Phi compression
Value > 0

8 = Phi tension yielding


Value > 0

9 = Phi tension fracture


Value > 0

10 = Phi shear
Value > 0

11 = Phi shear sort webbed rolled I


Value > 0

12 = Phi torsion
Value > 0

13 = Ignore seismic code


0 = No
Any other value = Yes

14 = Ignore special seismic load


0 = No
Any other value = Yes

15 = Doubler plate is plug welded


0 = No
Any other value = Yes

16 = HSS welding type


1 = ERW
2 = SAW

17 = Reduce HSS thickness


0 = No
Any other value = Yes

18 = Consider deflection
0 = No
Any other value = Yes

19 = DL deflection limit, L/Value


Value > 0

20 = SDL + LL deflection limit, L/Value


Value > 0

21 = LL deflection limit, L/Value


Value > 0
22 = Total load deflection limit, L/Value
Value > 0

23 = Total camber limit, L/Value


Value > 0

24 = Pattern live load factor


Value >= 0

25 = Demand/capacity ratio limit


Value > 0

26 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

27 = Analysis Method
1 = Direct Analysis
2 = Effective Length
3 = Limited 1st Order

28 = Second Order Method


1 = General 2nd Order
2 = Amplified 1st Order

29 = Stiffness Reduction Method


1 = Tau-b variable
2 = Tau-b Fixed
3 = No Modification

30 = Importance Factor
Value > 0

31 = Design System Rho


Value > 0

32 = Design System Sds


Value >= 0
33 = Design System R
Value > 0

34 = Design System Omega0


Value > 0

35 = Design System Cd
Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC360_05_IBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")

'get preference item


ret =
SapModel.DesignSteel.AISC360_05_IBC2006.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added items 27, 28, and 29, and noted Item 4 is obsolete in Version 12.00.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
Added items 30 through 35 in v17.3.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC360_05_IBC2006.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 43, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, K1 Major
22 = Effective length factor, K1 Minor
23 = Effective length factor, K2 Major
24 = Effective length factor, K2 Minor
25 = Effective length factor, K Lateral Torsional Buckling
26 = Moment coefficient, Cm Major
27 = Moment coefficient, Cm Minor
28 = Bending coefficient, Cb
29 = Nonsway moment factor, B1 Major
30 = Nonsway moment factor, B1 Minor
31 = Sway moment factor, B2 Major
32 = Sway moment factor, B2 Minor
33 = Reduce HSS thickness
34 = HSS welding type
35 = Yield stress, Fy
36 = Expected to specified Fy ratio, Ry
37 = Compressive capacity, Pnc
38 = Tensile capacity, Pnt
39 = Major bending capacity, Mn3
40 = Minor bending capacity, Mn2
41 = Major shear capacity, Vn2
42 = Minor shear capacity, Vn3
43 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program default
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K1 Major


Value >= 0; 0 means use program determined value.
22 = Effective length factor, K1 Minor
Value >= 0; 0 means use program determined value.

23 = Effective length factor, K2 Major


Value >= 0; 0 means use program determined value.

24 = Effective length factor, K2 Minor


Value >= 0; 0 means use program determined value.

25 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

26 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

27 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

28 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

29 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

30 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

31 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

32 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

33 = Reduce HSS thickness


0 = Program default
1 = No
2 = Yes

34 = HSS welding type


0 = Program default
1 = ERW
2 = SAW
35 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

36 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

37 = Compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mn3


Value >= 0; 0 means use program determined value. [FL]

40 = Minor bending capacity, Mn2


Value >= 0; 0 means use program determined value. [FL]

41 = Major shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

42 = Minor shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]

43 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAISC360_05_IBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")

'set overwrite item


ret =
SapModel.DesignSteel.AISC360_05_IBC2006.SetOverwrite("8", 1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC360_05_IBC2006.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 26, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design category
3 = Design provision
4 = Analysis method (Obsolete, replaced by 27, 28, and 29)
5 = Notional load coefficient
6 = Phi bending
7 = Phi compression
8 = Phi tension yielding
9 = Phi tension fracture
10 = Phi shear
11 = Phi shear sort webbed rolled I
12 = Phi torsion
13 = Ignore seismic code
14 = Ignore special seismic load
15 = Doubler plate is plug welded
16 = HSS welding type
17 = Reduce HSS thickness
18 = Consider deflection
19 = DL deflection limit, L/Value
20 = SDL + LL deflection limit, L/Value
21 = LL deflection limit, L/Value
22 = Total load deflection limit, L/Value
23 = Total camber limit, L/Value
24 = Pattern live load factor
25 = Demand/capacity ratio limit
26 = Multi-response case design
27 = Analysis Method
28 = Second Order Method
29 = Stiffness Reduction Method
30 = Importance Factor
31 = Design Systems Rho
32 = Design Systems Sds
33 = Design Systems R
34 = Design Systems Omega0
35 = Design Systems Cd
Value
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

3 = Design provision
1 = LRFD
2 = ASD

4 = Analysis method (Obsolete, replaced by 27, 28, and 29)


1 = Gen 2nd Order Elastic
2 = 2nd Order By Amp 1st Order
3 = Limited 1st Order Elastic
4 = DAM Gen 2nd Order Taub Variable
5 = DAM Gen 2nd Order Taub Fixed
6 = DAM Amp 1st Order Taub Variable
7 = DAM Amp 1st Order Taub Fixed

5 = Notional load coefficient


Value > 0

6 = Phi bending
Value > 0

7 = Phi compression
Value > 0

8 = Phi tension yielding


Value > 0

9 = Phi tension fracture


Value > 0

10 = Phi shear
Value > 0

11 = Phi shear sort webbed rolled I


Value > 0

12 = Phi torsion
Value > 0

13 = Ignore seismic code


0 = No
Any other value = Yes

14 = Ignore special seismic load


0 = No
Any other value = Yes

15 = Doubler plate is plug welded


0 = No
Any other value = Yes

16 = HSS welding type


1 = ERW
2 = SAW

17 = Reduce HSS thickness


0 = No
Any other value = Yes

18 = Consider deflection
0 = No
Any other value = Yes

19 = DL deflection limit, L/Value


Value > 0

20 = SDL + LL deflection limit, L/Value


Value > 0

21 = LL deflection limit, L/Value


Value > 0
22 = Total load deflection limit, L/Value
Value > 0

23 = Total camber limit, L/Value


Value > 0

24 = Pattern live load factor


Value >= 0

25 = Demand/capacity ratio limit


Value > 0

26 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

27 = Analysis Method
1 = Direct Analysis
2 = Effective Length
3 = Limited 1st Order

28 = Second Order Method


1 = General 2nd Order
2 = Amplified 1st Order

29 = Stiffness Reduction Method


1 = Tau-b variable
2 = Tau-b Fixed
3 = No Modification

30 = Importance Factor
Value > 0

31 = Design System Rho


Value > 0

32 = Design System Sds


Value >= 0
33 = Design System R
Value > 0

34 = Design System Omega0


Value > 0

35 = Design System Cd
Value > 0
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAISC360_05_IBC2006()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-05/IBC2006")

'set preference item


ret =
SapModel.DesignSteel.AISC360_05_IBC2006.SetPreference(1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added items 27, 28, and 29, and noted Item 4 is obsolete in Version 12.00.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
Added items 30 through 35 in v17.3.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC360_10.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 43, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, K1 Major
22 = Effective length factor, K1 Minor
23 = Effective length factor, K2 Major
24 = Effective length factor, K2 Minor
25 = Effective length factor, K Lateral Torsional Buckling
26 = Moment coefficient, Cm Major
27 = Moment coefficient, Cm Minor
28 = Bending coefficient, Cb
29 = Nonsway moment factor, B1 Major
30 = Nonsway moment factor, B1 Minor
31 = Sway moment factor, B2 Major
32 = Sway moment factor, B2 Minor
33 = Reduce HSS thickness
34 = HSS welding type
35 = Yield stress, Fy
36 = Expected to specified Fy ratio, Ry
37 = Compressive capacity, Pnc
38 = Tensile capacity, Pnt
39 = Major bending capacity, Mn3
40 = Minor bending capacity, Mn2
41 = Major shear capacity, Vn2
42 = Minor shear capacity, Vn3
43 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program default
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
8 = Total load deflection limit, L/Value
Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K1 Major


Value >= 0; 0 means use program determined value.
22 = Effective length factor, K1 Minor
Value >= 0; 0 means use program determined value.

23 = Effective length factor, K2 Major


Value >= 0; 0 means use program determined value.

24 = Effective length factor, K2 Minor


Value >= 0; 0 means use program determined value.

25 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

26 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

27 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

28 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

29 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

30 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

31 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

32 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

33 = Reduce HSS thickness


0 = Program default
1 = No
2 = Yes

34 = HSS welding type


0 = Program default
1 = ERW
2 = SAW
35 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

36 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

37 = Compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mn3


Value >= 0; 0 means use program determined value. [FL]

40 = Minor bending capacity, Mn2


Value >= 0; 0 means use program determined value. [FL]

41 = Major shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

42 = Minor shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]

43 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC360_10()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-10")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.AISC360_10.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC360_10.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 26, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design category
3 = Design provision
4 = Analysis method (Obsolete, replaced by 27, 28, and 29)
5 = Notional load coefficient
6 = Phi bending
7 = Phi compression
8 = Phi tension yielding
9 = Phi tension fracture
10 = Phi shear
11 = Phi shear sort webbed rolled I
12 = Phi torsion
13 = Ignore seismic code
14 = Ignore special seismic load
15 = Doubler plate is plug welded
16 = HSS welding type
17 = Reduce HSS thickness
18 = Consider deflection
19 = DL deflection limit, L/Value
20 = SDL + LL deflection limit, L/Value
21 = LL deflection limit, L/Value
22 = Total load deflection limit, L/Value
23 = Total camber limit, L/Value
24 = Pattern live load factor
25 = Demand/capacity ratio limit
26 = Multi-response case design
27 = Analysis Method
28 = Second Order Method
29 = Stiffness Reduction Method
30 = Importance Factor
31 = Design Systems Rho
32 = Design Systems Sds
33 = Design Systems R
34 = Design Systems Omega0
35 = Design Systems Cd

Value
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

3 = Design provision
1 = LRFD
2 = ASD

4 = Analysis method (Obsolete, replaced by 27, 28, and 29)


1 = Gen 2nd Order Elastic
2 = 2nd Order By Amp 1st Order
3 = Limited 1st Order Elastic
4 = DAM Gen 2nd Order Taub Variable
5 = DAM Gen 2nd Order Taub Fixed
6 = DAM Amp 1st Order Taub Variable
7 = DAM Amp 1st Order Taub Fixed

5 = Notional load coefficient


Value > 0

6 = Phi bending
Value > 0

7 = Phi compression
Value > 0

8 = Phi tension yielding


Value > 0

9 = Phi tension fracture


Value > 0

10 = Phi shear
Value > 0

11 = Phi shear sort webbed rolled I


Value > 0

12 = Phi torsion
Value > 0

13 = Ignore seismic code


0 = No
Any other value = Yes

14 = Ignore special seismic load


0 = No
Any other value = Yes

15 = Doubler plate is plug welded


0 = No
Any other value = Yes

16 = HSS welding type


1 = ERW
2 = SAW

17 = Reduce HSS thickness


0 = No
Any other value = Yes

18 = Consider deflection
0 = No
Any other value = Yes

19 = DL deflection limit, L/Value


Value > 0

20 = SDL + LL deflection limit, L/Value


Value > 0

21 = LL deflection limit, L/Value


Value > 0
22 = Total load deflection limit, L/Value
Value > 0

23 = Total camber limit, L/Value


Value > 0

24 = Pattern live load factor


Value >= 0

25 = Demand/capacity ratio limit


Value > 0

26 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

27 = Analysis Method
1 = Direct Analysis
2 = Effective Length
3 = Limited 1st Order

28 = Second Order Method


1 = General 2nd Order
2 = Amplified 1st Order

29 = Stiffness Reduction Method


1 = Tau-b variable
2 = Tau-b Fixed
3 = No Modification

30 = Importance Factor
Value > 0

31 = Design System Rho


Value > 0

32 = Design System Sds


Value >= 0
33 = Design System R
Value > 0

34 = Design System Omega0


Value > 0

35 = Design System Cd
Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC360_10()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-10")

'get preference item


ret = SapModel.DesignSteel.AISC360_10.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
Added items 30 through 35 in v17.3.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC360_10.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 43, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, K1 Major
22 = Effective length factor, K1 Minor
23 = Effective length factor, K2 Major
24 = Effective length factor, K2 Minor
25 = Effective length factor, K Lateral Torsional Buckling
26 = Moment coefficient, Cm Major
27 = Moment coefficient, Cm Minor
28 = Bending coefficient, Cb
29 = Nonsway moment factor, B1 Major
30 = Nonsway moment factor, B1 Minor
31 = Sway moment factor, B2 Major
32 = Sway moment factor, B2 Minor
33 = Reduce HSS thickness
34 = HSS welding type
35 = Yield stress, Fy
36 = Expected to specified Fy ratio, Ry
37 = Compressive capacity, Pnc
38 = Tensile capacity, Pnt
39 = Major bending capacity, Mn3
40 = Minor bending capacity, Mn2
41 = Major shear capacity, Vn2
42 = Minor shear capacity, Vn3
43 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program default
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K1 Major


Value >= 0; 0 means use program determined value.
22 = Effective length factor, K1 Minor
Value >= 0; 0 means use program determined value.

23 = Effective length factor, K2 Major


Value >= 0; 0 means use program determined value.

24 = Effective length factor, K2 Minor


Value >= 0; 0 means use program determined value.

25 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

26 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

27 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

28 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

29 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

30 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

31 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

32 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

33 = Reduce HSS thickness


0 = Program default
1 = No
2 = Yes

34 = HSS welding type


0 = Program default
1 = ERW
2 = SAW
35 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

36 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

37 = Compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mn3


Value >= 0; 0 means use program determined value. [FL]

40 = Minor bending capacity, Mn2


Value >= 0; 0 means use program determined value. [FL]

41 = Major shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

42 = Minor shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]

43 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAISC360_10()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-10")

'set overwrite item


ret = SapModel.DesignSteel.AISC360_10.SetOverwrite("8", 1,
7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC360_10.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 26, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design category
3 = Design provision
4 = Analysis method (Obsolete, replaced by 27, 28, and 29)
5 = Notional load coefficient
6 = Phi bending
7 = Phi compression
8 = Phi tension yielding
9 = Phi tension fracture
10 = Phi shear
11 = Phi shear sort webbed rolled I
12 = Phi torsion
13 = Ignore seismic code
14 = Ignore special seismic load
15 = Doubler plate is plug welded
16 = HSS welding type
17 = Reduce HSS thickness
18 = Consider deflection
19 = DL deflection limit, L/Value
20 = SDL + LL deflection limit, L/Value
21 = LL deflection limit, L/Value
22 = Total load deflection limit, L/Value
23 = Total camber limit, L/Value
24 = Pattern live load factor
25 = Demand/capacity ratio limit
26 = Multi-response case design
27 = Analysis Method
28 = Second Order Method
29 = Stiffness Reduction Method
30 = Importance Factor
31 = Design Systems Rho
32 = Design Systems Sds
33 = Design Systems R
34 = Design Systems Omega0
35 = Design Systems Cd
Value
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = IMF
3 = OMF
4 = SCBF
5 = OCBF
6 = OCBFI
7 = EBF

2 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

3 = Design provision
1 = LRFD
2 = ASD

4 = Analysis method (Obsolete, replaced by 27, 28, and 29)


1 = Gen 2nd Order Elastic
2 = 2nd Order By Amp 1st Order
3 = Limited 1st Order Elastic
4 = DAM Gen 2nd Order Taub Variable
5 = DAM Gen 2nd Order Taub Fixed
6 = DAM Amp 1st Order Taub Variable
7 = DAM Amp 1st Order Taub Fixed

5 = Notional load coefficient


Value > 0

6 = Phi bending
Value > 0

7 = Phi compression
Value > 0

8 = Phi tension yielding


Value > 0

9 = Phi tension fracture


Value > 0

10 = Phi shear
Value > 0

11 = Phi shear sort webbed rolled I


Value > 0

12 = Phi torsion
Value > 0

13 = Ignore seismic code


0 = No
Any other value = Yes

14 = Ignore special seismic load


0 = No
Any other value = Yes

15 = Doubler plate is plug welded


0 = No
Any other value = Yes

16 = HSS welding type


1 = ERW
2 = SAW

17 = Reduce HSS thickness


0 = No
Any other value = Yes

18 = Consider deflection
0 = No
Any other value = Yes

19 = DL deflection limit, L/Value


Value > 0

20 = SDL + LL deflection limit, L/Value


Value > 0

21 = LL deflection limit, L/Value


Value > 0
22 = Total load deflection limit, L/Value
Value > 0

23 = Total camber limit, L/Value


Value > 0

24 = Pattern live load factor


Value >= 0

25 = Demand/capacity ratio limit


Value > 0

26 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

27 = Analysis Method
1 = Direct Analysis
2 = Effective Length
3 = Limited 1st Order

28 = Second Order Method


1 = General 2nd Order
2 = Amplified 1st Order

29 = Stiffness Reduction Method


1 = Tau-b variable
2 = Tau-b Fixed
3 = No Modification

30 = Importance Factor
Value > 0

31 = Design System Rho


Value > 0

32 = Design System Sds


Value >= 0
33 = Design System R
Value > 0

34 = Design System Omega0


Value > 0

35 = Design System Cd
Value > 0
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAISC360_10()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC360-10")

'set preference item


ret = SapModel.DesignSteel.AISC360_10.SetPreference(1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.0.0.
Added items 30 through 35 in v17.3.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD89.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 31, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Yield stress, Fy
25 = Compressive stress, Fa
26 = Tensile stress, Ft
27 = Major bending stress, Fb3
28 = Minor bending stress, Fb2
29 = Major shear stress, Fv2
30 = Minor shear stress, Fv3
31 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Brace Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

26 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

27 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]
28 = Minor bending stress, Fb2
Value >= 0; 0 means use program determined value. [F/L2]

29 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

31 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC_ASD89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD89")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.AISC_ASD89.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD89.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Lateral factor
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Lateral factor
Value > 0

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0

8 = Total camber limit, L/Value


Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC_ASD89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD89")

'get preference item


ret = SapModel.DesignSteel.AISC_ASD89.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD89.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 31, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Yield stress, Fy
25 = Compressive stress, Fa
26 = Tensile stress, Ft
27 = Major bending stress, Fb3
28 = Minor bending stress, Fb2
29 = Major shear stress, Fv2
30 = Minor shear stress, Fv3
31 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Brace Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral TorsionalBuckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

26 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

27 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

28 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

29 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

31 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemASIC_ASD89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD89")

'set overwrite item


ret = SapModel.DesignSteel.AISC_ASD89.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD89.SetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Lateral factor
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Lateral factor
Value > 0

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0

8 = Total camber limit, L/Value


Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAISC_ASD89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD89")

'set preference item


ret = SapModel.DesignSteel.AISC_ASD89.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD93.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 35, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, B1 Major
25 = Non-sway moment factor, B1 Minor
26 = Sway moment factor, B2 Major
27 = Sway moment factor, B2 Minor
28 = Yield stress, Fy
29 = Compressive capacity, phi*Pnc
30 = Tensile capacity, phi*Pnt
31 = Major bending capacity, phi*Mn3
32 = Minor bending capacity, phi*Mn2
33 = Major shear capacity, phi*Vn2
34 = Minor shear capacity, phi*Vn3
35 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Non-sway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

26 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

33 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

34 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

35 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC_LRFD93()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD93")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.AISC_LRFD93.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD93.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 15, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Phi bending
3 = Phi compression
4 = Phi tension
5 = Phi shear
6 = Phi compression, angle
7 = Consider deflection
8 = DL deflection limit, L/Value
9 = SDL + LL deflection limit, L/Value
10 = LL deflection limit, L/Value
11 = Total deflection limit, L/Value
12 = Total camber limit, L/Value
13 = Pattern live load factor
14 = Demand/capacity ratio limit
15 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Phi bending
Value > 0

3 = Phi compression
Value > 0

4 = Phi tension
Value > 0

5 = Phi shear
Value > 0

6 = Phi compression, angle


Value > 0

7 = Consider deflection
0 = No
Any other value = Yes

8 = DL deflection limit, L/Value


Value > 0

9 = SDL + LL deflection limit, L/Value


Value > 0

10 = LL deflection limit, L/Value


Value > 0

11 = Total deflection limit, L/Value


Value > 0

12 = Total camber limit, L/Value


Value > 0

13 = Pattern live load factor


Value >= 0

14 = Demand/capacity ratio limit


Value > 0

15 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC_LRFD93()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD93")

'get preference item


ret = SapModel.DesignSteel.AISC_LRFD93.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD93.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 35, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, B1 Major
25 = Non-sway moment factor, B1 Minor
26 = Sway moment factor, B2 Major
27 = Sway moment factor, B2 Minor
28 = Yield stress, Fy
29 = Compressive capacity, phi*Pnc
30 = Tensile capacity, phi*Pnt
31 = Major bending capacity, phi*Mn3
32 = Minor bending capacity, phi*Mn2
33 = Major shear capacity, phi*Vn2
34 = Minor shear capacity, phi*Vn3
35 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

25 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.
26 = Sway moment factor, B2 Major
Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

33 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

34 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

35 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAISC_LRFD93()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD93")

'set overwrite item


ret = SapModel.DesignSteel.AISC_LRFD93.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD93.SetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 15, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Phi bending
3 = Phi compression
4 = Phi tension
5 = Phi shear
6 = Phi compression, angle
7 = Consider deflection
8 = DL deflection limit, L/Value
9 = SDL + LL deflection limit, L/Value
10 = LL deflection limit, L/Value
11 = Total deflection limit, L/Value
12 = Total camber limit, L/Value
13 = Pattern live load factor
14 = Demand/capacity ratio limit
15 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Phi bending
Value > 0

3 = Phi compression
Value > 0

4 = Phi tension
Value > 0

5 = Phi shear
Value > 0

6 = Phi compression, angle


Value > 0

7 = Consider deflection
0 = No
Any other value = Yes

8 = DL deflection limit, L/Value


Value > 0

9 = SDL + LL deflection limit, L/Value


Value > 0

10 = LL deflection limit, L/Value


Value > 0

11 = Total deflection limit, L/Value


Value > 0

12 = Total camber limit, L/Value


Value > 0

13 = Pattern live load factor


Value >= 0

14 = Demand/capacity ratio limit


Value > 0

15 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAISC_LRFD93 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD93")

'set preference item


ret = SapModel.DesignSteel.AISC_LRFD93.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_LRFD97.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 37, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, B1 Major
25 = Non-sway moment factor, B1 Minor
26 = Sway moment factor, B2 Major
27 = Sway moment factor, B2 Minor
28 = Pressure equalized
29 = External pressure
30 = Yield stress, Fy
31 = Compressive capacity, phi*Pnc
32 = Tensile capacity, phi*Pnt
33 = Major bending capacity, phi*Mn3
34 = Minor bending capacity, phi*Mn2
35 = Major shear capacity, phi*Vn2
36 = Minor shear capacity, phi*Vn3
37 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Non-sway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.
26 = Sway moment factor, B2 Major
Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

28 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

29 = External pressure. [F/L2]


Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

30 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

31 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

32 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

33 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

34 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

35 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

36 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

37 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAPI_RP2A_LRFD97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-LRFD 97")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.API_RP2A_LRFD97.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified Item 29 in version 14.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_LRFD97.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Tubular joint punching load method
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Tubular joint punching load method


1 = Punching Shear
2 = Nominal Load

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit, L/Value


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0
8 = Total camber limit, L/Value
Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAPI_RP2A_LRFD97 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-LRFD 97")

'get preference item


ret = SapModel.DesignSteel.API_RP2A_LRFD97.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_LRFD97.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemTypeitem.
Item
This is an integer between 1 and 37, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, B1 Major
25 = Non-sway moment factor, B1 Minor
26 = Sway moment factor, B2 Major
27 = Sway moment factor, B2 Minor
28 = Pressure equalized
29 = External pressure
30 = Yield stress, Fy
31 = Compressive capacity, phi*Pnc
32 = Tensile capacity, phi*Pnt
33 = Major bending capacity, phi*Mn3
34 = Minor bending capacity, phi*Mn2
35 = Major shear capacity, phi*Vn2
36 = Minor shear capacity, phi*Vn3
37 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
11 = LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Non-sway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

26 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

28 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

29 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

30 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

31 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

32 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

33 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

34 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

35 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

36 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

37 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAPI_RP2A_LRFD97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-LRFD 97")

'set overwrite item


ret = SapModel.DesignSteel.API_RP2A_LRFD97.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified Item 29 in version 14.1.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_LRFD97.SetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Tubular joint punching load method
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Tubular joint punching load method


1 = Punching Shear
2 = Nominal Load

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit, L/Value


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0
8 = Total camber limit, L/Value
Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAPI_RP2A_LRFD97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject= New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret= SapModel.DesignSteel.SetCode("API RP2A-LRFD 97")

'set preference item


ret= SapModel.DesignSteel.API_RP2A_LRFD97.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 33, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral TorsionalBuckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Pressure equalized
25 = External pressure
26 = Yield stress, Fy
27 = Compressive stress, Fa
28 = Tensile stress, Ft
29 = Major bending stress, Fb3
30 = Minor bending stress, Fb2
31 = Major shear stress, Fv2
32 = Minor shear stress, Fv3
33 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

25 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension.. [F/L2]

26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

28 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

29 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

32 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

33 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAPI_RP2A_WSD2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.API_RP2A_WSD2000.GetOverwrite("8", 1, Value,
ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified Item 25 in version 14.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 12, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Tubular joint punching load method
3 = Lateral factor, L/Value
4 = Consider deflection
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total deflection limit, L/Value
9 = Total camber limit, L/Value
10 = Pattern live load factor
11 = Demand/capacity ratio limit
12 = Multi-response case design
13 = Code supplements
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Tubular joint punching load method


1 = Punching Shear
2 = Nominal Load

3 = Lateral Factor
Value > 0

4 = Consider deflection
0 = No
Any other value = Yes

5 = DL deflection limit, L/Value


Value > 0

6 = SDL + LL deflection limit, L/Value


Value > 0

7 = LL deflection limit, L/Value


Value > 0

8 = Total deflection limit, L/Value


Value > 0

9 = Total camber limit, L/Value


Value > 0

10 = Pattern live load factor


Value >= 0

11 = Demand/capacity ratio limit


Value > 0

12 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

13 = Code supplements
1 = None
2 = Supplements 2 and 3
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAPI_RP2A_WSD2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2000")

'get preference item


ret = SapModel.DesignSteel.API_RP2A_WSD2000.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
Added code supplements item in version 16.1.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 33, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Pressure equalized
25 = External pressure
26 = Yield stress, Fy
27 = Compressive stress, Fa
28 = Tensile stress, Ft
29 = Major bending stress, Fb3
30 = Minor bending stress, Fb2
31 = Major shear stress, Fv2
32 = Minor shear stress, Fv3
33 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

25 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]
26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

28 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

29 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

32 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

33 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAPI_RP2A_WSD2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2000")

'set overwrite item


ret =
SapModel.DesignSteel.API_RP2A_WSD2000.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified Item 25 in version 14.1.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2000.SetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 12, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Tubular joint punching load method
3 = Lateral factor, L/Value
4 = Consider deflection
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total deflection limit, L/Value
9 = Total camber limit, L/Value
10 = Pattern live load factor
11 = Demand/capacity ratio limit
12 = Multi-response case design
13 = Code supplements
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Tubular joint punching load method


1 = Punching Shear
2 = Nominal Load

3 = Lateral factor
Value > 0

4 = Consider deflection
0 = No
Any other value = Yes

5 = DL deflection limit, L/Value


Value > 0

6 = SDL + LL deflection limit, L/Value


Value > 0

7 = LL deflection limit, L/Value


Value > 0

8 = Total deflection limit, L/Value


Value > 0

9 = Total camber limit, L/Value


Value >= 0

10 = Pattern live load factor


Value >= 0

11 = Demand/capacity ratio limit


Value > 0

12 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

13 = Code supplements
1 = None
2 = Supplements 2 and 3
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAPI_RP2A_WSD2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject= New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret= SapModel.DesignSteel.SetCode("API RP2A-WSD2000")

'set preference item


ret= SapModel.DesignSteel.API_RP2A_WSD2000.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
Added code supplements item in version 16.1.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2014.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 33, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral TorsionalBuckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Pressure equalized
25 = External pressure
26 = Yield stress, Fy
27 = Compressive stress, Fa
28 = Tensile stress, Ft
29 = Major bending stress, Fb3
30 = Minor bending stress, Fb2
31 = Major shear stress, Fv2
32 = Minor shear stress, Fv3
33 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

25 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension.. [F/L2]

26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

28 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

29 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

32 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

33 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAPI_RP2A_WSD2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2014")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.API_RP2A_WSD2014.GetOverwrite("8", 1, Value,
ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2014.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Lateral factor, L/Value
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design

Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Lateral Factor
Value > 0

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit, L/Value


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0
8 = Total camber limit, L/Value
Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAPI_RP2A_WSD2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2014")

'get preference item


ret = SapModel.DesignSteel.API_RP2A_WSD2014.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2014.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 33, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Pressure equalized
25 = External pressure
26 = Yield stress, Fy
27 = Compressive stress, Fa
28 = Tensile stress, Ft
29 = Major bending stress, Fb3
30 = Minor bending stress, Fb2
31 = Major shear stress, Fv2
32 = Minor shear stress, Fv3
33 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

25 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]
26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

28 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

29 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

32 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

33 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAPI_RP2A_WSD2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("API RP2A-WSD2014")

'set overwrite item


ret =
SapModel.DesignSteel.API_RP2A_WSD2000.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.API_RP2A_WSD2000.SetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Lateral factor, L/Value
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Lateral Factor
Value > 0

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit, L/Value


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0

8 = Total camber limit, L/Value


Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAPI_RP2A_WSD2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject= New Sap2000v16.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret= SapModel.DesignSteel.SetCode("API RP2A-WSD2014")

'set preference item


ret= SapModel.DesignSteel.API_RP2A_WSD2014.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 19.1.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Australian_AS4100_1998.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.

Item
This is an integer between 1 and 46, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Steel type
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, Ke Major Braced
22 = Effective length factor, Ke Minor Braced
23 = Effective length factor, Ke Major Sway
24 = Effective length factor, Ke Minor Sway
25 = Twist restraint factor for LTB (kt)
26 = lateral rotation restraint factor (kr)
27 = Load height factor for LTB (kl)
28 = Moment coefficient, Cm Major
29 = Moment coefficient, Cm Minor
30 = Moment modification factor, Alpha_m
31 = Slender reduction factor, Alpha_s
32 = Nonsway moment factor, Db Major
33 = Nonsway moment factor, Db Minor
34 = Sway moment factor, Ds Major
35 = Sway moment factor, Ds Minor
36 = Form factor, Kf
37 = Axial capacity correction factor, Kt
38 = Yield stress, Fy
39 = Compressive capacity, Nc
40 = Tensile capacity, Nt
41 = Major bending capacity, Ms33
42 = Minor bending capacity, Ms22
43 = Major bending capacity, Mb33
44 = Major shear capacity, Vu2
45 = Minor shear capacity, Vu3
46 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment frame
2 = Braced frame

2 = Steel type
1 = Hot rolled
2 = Hot finished
3 = Cold form
4 = Stress relieved
5 = Lightly welded
6 = Heavily welded

3 = Consider deflection
0 = No
Any other value = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
21 = Effective length factor, Ke Major Braced
Value >= 0; 0 means use program determined value.

22 = Effective length factor, Ke Minor Braced


Value >= 0; 0 means use program determined value.

23 = Effective length factor, Ke Major Sway


Value >= 0; 0 means use program determined value.

24 = Effective length factor, Ke Minor Sway


Value >= 0; 0 means use program determined value.

25 = Twist restraint factor for LTB (kt)


Value >= 0; 0 means use program determined value.

26 = Lateral rotation restraint factor (kr)


Value >= 0; 0 means use program determined value.

27 = Load height factor for LTB (kl)


Value >= 0; 0 means use program determined value.

28 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

29 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

30 = Moment modification factor, Alpha_m


Value >= 0; 0 means use program determined value.

31 = Slender reduction factor, Alpha_s


Value >= 0; 0 means use program determined value.

32 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

33 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

34 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value.
35 = Sway moment factor, Bs Minor
Value >= 0; 0 means use program determined value.

36 = Form factor, Kf
Value >= 0; 0 means use program determined value.

37 = Axial capacity correction factor, Kt


Value >= 0; 0 means use program determined value.

38 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

39 = Compressive capacity, Nc
Value >= 0; 0 means use program determined value. [F]

40 = Tensile capacity, Nt
Value >= 0; 0 means use program determined value. [F]

41 = Major bending capacity, Ms33


Value >= 0; 0 means use program determined value. [FL]

42 = Minor bending capacity, Ms22


Value >= 0; 0 means use program determined value. [FL]

43 = Minor bending capacity, Mb33


Value >= 0; 0 means use program determined value. [FL]

44 = Major shear capacity, Vu2


Value >= 0; 0 means use program determined value. [F]

45 = Minor shear capacity, Vu3


Value >= 0; 0 means use program determined value. [F]

46 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True then the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAustralian_AS4100_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

' start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AS 4100-1998")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.Australian_AS4100_1998.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Australian_AS4100_1998.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 17, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Structural analysis method
4 = Steel type
5 = Capacity factor, Phi bending
6 = Capacity factor, Phi compression
7 = Capacity factor, Phi tension yielding
8 = Capacity factor, Phi tension fracture
9 = Capacity factor, Phi shear
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total load deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Moment frame
2 = Braced frame

3 = Structural analysis method


1 = General 2nd Order
2 = Amplified 1st Order

4 = Steel type
1 = Hot rolled
2= Hot finished
3= Cold form
4= Stress relieved
5= Lightly welded
6= Heavily welded

5 = Capacity factor, Phi bending


Value > 0

6 = Capacity factor, Phi compression


Value > 0

7 = Capacity factor, Phi tension yielding


Value > 0

8 = Capacity factor, Phi tension fracture


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total load deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0

16 = Pattern live load factor


Value >= 0
17 = Demand/capacity ratio limit
Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItem Australian_AS4100_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AS 4100-1998")

'get preference item


ret =
SapModel.DesignSteel.Australian_AS4100_1998.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Australian_AS4100_1998.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 46, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Steel type
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, Ke Major Braced
22 = Effective length factor, Ke Minor Braced
23 = Effective length factor, Ke Major Sway
24 = Effective length factor, Ke Minor Sway
25 = Twist restraint factor for LTB (kt)
26 = lateral rotation restraint factor (kr)
27 = Load height factor for LTB (kl)
28 = Moment coefficient, Cm Major
29 = Moment coefficient, Cm Minor
30 = Moment modification factor, Alpha_m
31 = Slender reduction factor, Alpha_s
32 = Nonsway moment factor, Db Major
33 = Nonsway moment factor, Db Minor
34 = Sway moment factor, Ds Major
35 = Sway moment factor, Ds Minor
36 = Form factor, Kf
37 = Axial capacity correction factor, Kt
38 = Yield stress, Fy
39 = Compressive capacity, Nc
40 = Tensile capacity, Nt
41 = Major bending capacity, Ms33
42 = Minor bending capacity, Ms22
43 = Major bending capacity, Mb33
44 = Major shear capacity, Vu2
45 = Minor shear capacity, Vu3
46 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment frame
2 = Braced frame

2 = Steel type
1 = Hot rolled
2 = Hot finished
3 = Cold form
4 = Stress relieved
5 = Lightly welded
6 = Heavily welded

3 = Consider deflection
0 = No
Any other value = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
21 = Effective length factor, Ke Major Braced
Value >= 0; 0 means use program determined value.

22 = Effective length factor, Ke Minor Braced


Value >= 0; 0 means use program determined value.

23 = Effective length factor, Ke Major Sway


Value >= 0; 0 means use program determined value.

24 = Effective length factor, Ke Minor Sway


Value >= 0; 0 means use program determined value.

25 = Twist restraint factor for LTB (kt)


Value >= 0; 0 means use program determined value.

26 = Lateral rotation restraint factor (kr)


Value >= 0; 0 means use program determined value.

27 = Load height factor for LTB (kl)


Value >= 0; 0 means use program determined value.

28 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

29 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

30 = Moment modification factor, Alpha_m


Value >= 0; 0 means use program determined value.

31 = Slender reduction factor, Alpha_s


Value >= 0; 0 means use program determined value.

32 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

33 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

34 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value.
35 = Sway moment factor, Bs Minor
Value >= 0; 0 means use program determined value.

36 = Form factor, Kf
Value >= 0; 0 means use program determined value.

37 = Axial capacity correction factor, Kt


Value >= 0; 0 means use program determined value.

38 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

39 = Compressive capacity, Nc
Value >= 0; 0 means use program determined value. [F]

40 = Tensile capacity, Nt
Value >= 0; 0 means use program determined value. [F]

41 = Major bending capacity, Ms33


Value >= 0; 0 means use program determined value. [FL]

42 = Minor bending capacity, Ms22


Value >= 0; 0 means use program determined value. [FL]

43 = Minor bending capacity, Mb33


Value >= 0; 0 means use program determined value. [FL]

44 = Major shear capacity, Vu2


Value >= 0; 0 means use program determined value. [F]

45 = Minor shear capacity, Vu3


Value >= 0; 0 means use program determined value. [F]

46 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAustralian_AS4100_1998 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AS 4100-1998")

'set overwrite item


ret =
SapModel.DesignSteel.Australian_AS4100_1998.SetOverwrite("8", 1,
7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Australian_AS4100_1998.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 17, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Structural analysis method
4 = Steel type
5 = Capacity factor, Phi bending
6 = Capacity factor, Phi compression
7 = Capacity factor, Phi tension yielding
8 = Capacity factor, Phi tension fracture
9 = Capacity factor, Phi shear
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total load deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Moment frame
2 = Braced frame

3 = Structural analysis method


1 = General 2nd Order
2 = Amplified 1st Order

4 = Steel type
1 = Hot rolled
2= Hot finished
3= Cold form
4= Stress relieved
5= Lightly welded
6= Heavily welded

5 = Capacity factor, Phi bending


Value > 0

6 = Capacity factor, Phi compression


Value > 0

7 = Capacity factor, Phi tension yielding


Value > 0

8 = Capacity factor, Phi tension fracture


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total load deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0

16 = Pattern live load factor


Value >= 0
17 = Demand/capacity ratio limit
Value > 0
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemAustralian_AS4100_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AS 4100-1998")

'set preference item


ret =
SapModel.DesignSteel.Australian_AS4100_1998.SetPreference(1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.ASCE_10_97.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 31, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Yield stress, Fy
25 = Compressive capacity, Pac
26 = Tensile capacity, Pat
27 = Major bending capacity, Ma3
28 = Minor bending capacity, Ma2
29 = Major shear stress, Fv2
30 = Minor shear stress, Fv3
31 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Brace Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pac


Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pat


Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Ma3


Value >= 0; 0 means use program determined value. [FL]
28 = Minor bending capacity, Ma2
Value >= 0; 0 means use program determined value. [FL]

29 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

31 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemASCE_10_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ASCE 10-97")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.ASCE_10_97.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.ASCE_10_97.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflection limit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflection limit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemASCE_10_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ASCE 10-97")

'get preference item


ret = SapModel.DesignSteel.ASCE_10_97.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.ASCE_10_97.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 31, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Cm Major
22 = Moment coefficient, Cm Minor
23 = Bending coefficient, Cb
24 = Yield stress, Fy
25 = Compressive capacity, Pac
26 = Tensile capacity, Pat
27 = Major bending capacity, Ma3
28 = Minor bending capacity, Ma2
29 = Major shear stress, Fv2
30 = Minor shear stress, Fv3
31 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Brace Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pac


Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pat


Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Ma3


Value >= 0; 0 means use program determined value. [FL]

28 = Minor bending capacity, Ma2


Value >= 0; 0 means use program determined value. [FL]

29 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

31 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemASCE_10_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ASCE 10-97")

'set overwrite item


ret = SapModel.DesignSteel. ASCE_10_97.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.ASCE_10_97.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflection limit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflection limit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemASCE_10_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ASCE 10-97")

'set preference item


ret = SapModel.DesignSteel.ASCE_10_97.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.BS5950_2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Uniform moment factor, m Major
22 = Uniform moment factor, m Minor
23 = Eqv. uniform moment factor, mLT
24 = Yield stress, Fy
25 = Compressive capacity, Pc
26 = Tensile capacity, Pt
27 = Major bending capacity, Mc3
28 = Minor bending capacity, Mc2
29 = Buckling resistance moment, Mb
30 = Major shear capacity, Pv2
31 = Minor shear capacity, Pv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Uniform moment factor, m Major


Value >= 0; 0 means use program determined value.

22 = Uniform moment factor, m Minor


Value >= 0; 0 means use program determined value.

23 = Eqv. Uniform moment factor, mLT


Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pc
Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pt
Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Mc3


Value >= 0; 0 means use program determined value. [FL]

28 = Minor bending capacity, Mc2


Value >= 0; 0 means use program determined value. [FL]

29 = Buckling resistance moment, Mb


Value >= 0; 0 means use program determined value. [FL]

30 = Major shear capacity, Pv2


Value >= 0; 0 means use program determined value. [F]

31 = Minor shear capacity, Pv3


Value >= 0; 0 means use program determined value. [F]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemBS5950_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.BS5950_2000.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.BS5950_2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflection limit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflection limit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemBS5950_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 2000")

'get preference item


ret = SapModel.DesignSteel.BS5950_2000.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.BS5950_2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Uniform moment factor, m Major
22 = Uniform moment factor, m Minor
23 = Eqv. uniform moment factor, mLT
24 = Yield stress, Fy
25 = Compressive capacity, Pc
26 = Tensile capacity, Pt
27 = Major bending capacity, Mc3
28 = Minor bending capacity, Mc2
29 = Buckling resistance moment, Mb
30 = Major shear capacity, Pv2
31 = Minor shear capacity, Pv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Uniform moment factor, m Major


Value >= 0; 0 means use program determined value.

22 = Uniform moment factor, m Minor


Value >= 0; 0 means use program determined value.

23 = Eqv. Uniform moment factor, mLT


Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pc
Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pt
Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Mc3


Value >= 0; 0 means use program determined value. [FL]

28 = Minor bending capacity, Mc2


Value >= 0; 0 means use program determined value. [FL]

29 = Buckling resistance moment, Mb


Value >= 0; 0 means use program determined value. [FL]

30 = Major shear capacity, Pv2


Value >= 0; 0 means use program determined value. [F]

31 = Minor shear capacity, Pv3


Value >= 0; 0 means use program determined value. [F]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemBS5950_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 2000")

'set overwrite item


ret = SapModel.DesignSteel.BS5950_2000.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.BS5950_2000.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflection limit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflection limit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemBS5950_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 2000")

'set preference item


ret = SapModel.DesignSteel.BS5950_2000.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Chinese_2010.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 51, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Element type
3 = Is transfer column
4 = Seismic magnification factor
5 = Is rolled section
6 = Is flange edge cut by gas
7 = Is both end pinned
8 = Ignore b/t check
9 = Classify beam as flexo-compression member
10 = Is beam top loaded
11 = Consider deflection
12 = Deflection check type
13 = DL deflection limit, L/Value
14 = SDL + LL deflection limit, L/Value
15 = LL deflection limit, L/Value
16 = Total load deflection limit, L/Value
17 = Total camber limit, L/Value
18 = DL deflection limit, absolute
19 = SDL + LL deflection limit, absolute
20 = LL deflection limit, absolute
21 = Total load deflection limit, absolute
22 = Total camber limit, absolute
23 = Specified camber
24 = Net area to total area ratio
25 = Live load reduction factor
26 = Unbraced length ratio, Major
27 = Unbraced length ratio, Minor Lateral Torsional Buckling
28 = Effective length factor, Mue Major
29 = Effective length factor, Mue Minor
30 = Moment coefficient, Beta_m Major
31 = Moment coefficient, Beta_m Minor
32 = Moment coefficient, Beta_t Major
33 = Moment coefficient, Beta_t Minor
34 = Axial stability coefficient, Phi Major
35 = Axial stability coefficient, Phi Minor
36 = Flexural stability coeff, Phi_bMajor
37 = Flexural stability coeff, Phi_bMinor
38 = Plasticity factor, Gamma Major
39 = Plasticity factor, Gamma Minor
40 = Section influence coefficient, Eta
41 = B/C capacity factor, Eta
42 = Euler moment factor, Delta Major
43 = Euler moment factor, Delta Minor
44 = Yield stress, Fy
45 = Allowable normal stress, f
46 = Allowable shear stress, fv
47 = Consider fictitious shear
48 = Demand/capacity ratio limit
49 = Dual system magnification factor
50 = Lo/r limit in compression
51 = L/r limit in tension
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Element type
0 = Program Determined
1 = Column
2 = Beam
3 = Brace
4 = Truss

3 = Is transfer column
0 = Program Determined
1 = No
2 = Yes

4 = Seismic magnification factor


Value >= 0; 0 means no check for this item.

5 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

6 = Is flange edge cut by gas


0 = Program Determined
1 = No
2 = Yes

7 = Is both end pinned


0 = Program Determined
1 = No
2 = Yes

8 = Ignore b/t check


0 = Program Determined
1 = No
2 = Yes

9 = Classify beam as flexo-compression member


0 = Program Determined
1 = No
2 = Yes

10 = Is beam top loaded


0 = Program Determined
1 = No
2 = Yes

11 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

12 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

13 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

14 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

15 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

16 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

17 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

18 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

19 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

20 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

21 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

22 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

23 = Specified camber
Value >= 0. [L]

24 = Net area to total area ratio


Value >= 0; 0 means use program default value.

25 = Live load reduction factor


Value >= 0; 0 means use program determined value.

26 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

27 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

28 = Effective length factor, Mue Major


Value >= 0; 0 means use program determined value.
29 = Effective length factor, Mue Minor
Value >= 0; 0 means use program determined value.

30 = Moment coefficient, Beta_m Major


Value >= 0; 0 means use program determined value.

31 = Moment coefficient, Beta_m Minor


Value >= 0; 0 means use program determined value.

32 = Moment coefficient, Beta_t Major


Value >= 0; 0 means use program determined value.

33 = Moment coefficient, Beta_t Minor


Value >= 0; 0 means use program determined value.

34 = Axial stability coefficient, Phi Major


Value >= 0; 0 means use program determined value.

35 = Axial stability coefficient, Phi Minor


Value >= 0; 0 means use program determined value.

36 = Flexural stability coefficient, Phi_b Major


Value >= 0; 0 means use program determined value.

37 = Flexural stability coefficient, Phi_b Minor


Value >= 0; 0 means use program determined value.

38 = Plasticity factor, Gamma Major


Value >= 0; 0 means use program determined value.

39 = Plasticity factor, Gamma Minor


Value >= 0; 0 means use program determined value.

40 = Section influence coefficient, Eta


Value >= 0; 0 means use program determined value.

41 = B/C capacity factor, Eta


Value >= 0; 0 means use program determined value.

42 = Euler moment factor, Delta Major


Value >= 0; 0 means use program determined value.
43 = Euler moment factor, Delta Minor
Value >= 0; 0 means use program determined value.

44 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

45 = Allowable normal stress, f


Value >= 0; 0 means use program determined value. [F/L2]

46 = Allowable shear stress, fv


Value >= 0; 0 means use program determined value. [F/L2]

47 = Consider fictitious shear


0 = Program Determined
1 = No
2 = Yes

48 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
49 = Dual system magnification factor
Value >= 0; 0 means use program default value.
50 = Lo/r limit in compression
Value >= 0; 0 means use program determined value.
51 = L/r limit in tension
Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2010")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Chinese_2010.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Chinese_2010.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Gamma0
3 = Ignore b/t check
4 = Classify beam as flexo compression member
5 = Consider deflection
6 = DL deflection limit, L/Value
7 = SDL + LL deflection limit, L/Value
8 = LL deflection limit, L/Value
9 = Total load deflection limit, L/Value
10 = Total camber limit, L/Value
11 = Pattern live load factor
12 = Demand/capacity ratio limit
13 = Multi-response case design
14 = Is tall building?
15 = Seismic Design Grade
Value
The value of the considered preference item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Gamma0
Value > 0

3 = Ignore b/t check


0 = No
Any other value = Yes

4 = Classify beam as flexo compression member


0 = No
Any other value = Yes

5 = Consider deflection
0 = No
Any other value = Yes

6 = DL deflection limit, L/Value


Value > 0

7 = SDL + LL deflection limit, L/Value


Value > 0

8 = LL deflection limit, L/Value


Value > 0

9 = Total load deflection limit, L/Value


Value > 0

10 = Total camber limit, L/Value


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Demand/capacity ratio limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

14 = Tall building
0 = No
1 = Yes
15 = Seismic Design Grade
1 = Grade I
2 = Grade II
3 = Grade III
4 = Grade IV
5 = Non Seismic
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2010")

'get preference item


ret = SapModel.DesignSteel.Chinese_2010.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
Added Seismic Design Grade preference item in v18.0.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Chinese_2010.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 51, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Element type
3 = Is transfer column
4 = Seismic magnification factor
5 = Is rolled section
6 = Is flange edge cut by gas
7 = Is both end pinned
8 = Ignore b/t check
9 = Classify beam as flexo-compression member
10 = Is beam top loaded
11 = Consider deflection
12 = Deflection check type
13 = DL deflection limit, L/Value
14 = SDL + LL deflection limit, L/Value
15 = LL deflection limit, L/Value
16 = Total load deflection limit, L/Value
17 = Total camber limit, L/Value
18 = DL deflection limit, absolute
19 = SDL + LL deflection limit, absolute
20 = LL deflection limit, absolute
21 = Total load deflection limit, absolute
22 = Total camber limit, absolute
23 = Specified camber
24 = Net area to total area ratio
25 = Live load reduction factor
26 = Unbraced length ratio, Major
27 = Unbraced length ratio, Minor Lateral TorsionalBuckling
28 = Effective length factor, Mue Major
29 = Effective length factor, Mue Minor
30 = Moment coefficient, Beta_m Major
31 = Moment coefficient, Beta_m Minor
32 = Moment coefficient, Beta_t Major
33 = Moment coefficient, Beta_t Minor
34 = Axial stability coefficient, Phi Major
35 = Axial stability coefficient, Phi Minor
36 = Flexural stability coeff, Phi_bMajor
37 = Flexural stability coeff, Phi_bMinor
38 = Plasticity factor, Gamma Major
39 = Plasticity factor, Gamma Minor
40 = Section influence coefficient, Eta
41 = B/C capacity factor, Eta
42 = Euler moment factor, Delta Major
43 = Euler moment factor, Delta Minor
44 = Yield stress, Fy
45 = Allowable normal stress, f
46 = Allowable shear stress, fv
47 = Consider fictitious shear
48 = Demand/capacity ratio limit
49 = Dual system magnification factor
50 = Lo/r limit in compression
51 = L/r limit in tension

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Element type
0 = Program Determined
1 = Column
2 = Beam
3 = Brace
4 = Truss

3 = Is transfer column
0 = Program Determined
1 = No
2 = Yes

4 = Seismic magnification factor


Value >= 0; 0 means no check for this item.
5 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

6 = Is flange edge cut by gas


0 = Program Determined
1 = No
2 = Yes

7 = Is both end pinned


0 = Program Determined
1 = No
2 = Yes

8 = Ignore b/t check


0 = Program Determined
1 = No
2 = Yes

9 = Classify beam as flexo-compression member


0 = Program Determined
1 = No
2 = Yes

10 = Is beam top loaded


0 = Program Determined
1 = No
2 = Yes

11 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

12 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

13 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
14 = SDL + LL deflection limit, L/Value
Value >= 0; 0 means no check for this item.

15 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

16 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

17 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

18 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

19 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

20 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

21 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

22 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

23 = Specified camber
Value >= 0. [L]

24 = Net area to total area ratio


Value >= 0; 0 means use program default value.

25 = Live load reduction factor


Value >= 0; 0 means use program determined value.

26 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

27 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
28 = Effective length factor, Mue Major
Value >= 0; 0 means use program determined value.

29 = Effective length factor, Mue Minor


Value >= 0; 0 means use program determined value.

30 = Moment coefficient, Beta_m Major


Value >= 0; 0 means use program determined value.

31 = Moment coefficient, Beta_m Minor


Value >= 0; 0 means use program determined value.

32 = Moment coefficient, Beta_t Major


Value >= 0; 0 means use program determined value.

33 = Moment coefficient, Beta_t Minor


Value >= 0; 0 means use program determined value.

34 = Axial stability coefficient, Phi Major


Value >= 0; 0 means use program determined value.

35 = Axial stability coefficient, Phi Minor


Value >= 0; 0 means use program determined value.

36 = Flexural stability coefficient, Phi_b Major


Value >= 0; 0 means use program determined value.

37 = Flexural stability coefficient, Phi_b Minor


Value >= 0; 0 means use program determined value.

38 = Plasticity factor, Gamma Major


Value >= 0; 0 means use program determined value.

39 = Plasticity factor, Gamma Minor


Value >= 0; 0 means use program determined value.

40 = Section influence coefficient, Eta


Value >= 0; 0 means use program determined value.

41 = B/C capacity factor, Eta


Value >= 0; 0 means use program determined value.

42 = Euler moment factor, Delta Major


Value >= 0; 0 means use program determined value.

43 = Euler moment factor, Delta Minor


Value >= 0; 0 means use program determined value.

44 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

45 = Allowable normal stress, f


Value >= 0; 0 means use program determined value. [F/L2]

46 = Allowable shear stress, fv


Value >= 0; 0 means use program determined value. [F/L2]

47 = Consider fictitious shear


0 = Program Determined
1 = No
2 = Yes

48 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value

49 = Dual system magnification factor


Value >= 0; 0 means use program default value.
50 = Lo/r limit in compression
Value >= 0; 0 means use program determined value.
51 = L/r limit in tension
Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2010")

'set overwrite item


ret = SapModel.DesignSteel.Chinese_2010.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Chinese_2010.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Gamma0
3 = Ignore b/t check
4 = Classify beam as flexo compression member
5 = Consider deflection
6 = DL deflection limit, L/Value
7 = SDL + LL deflection limit, L/Value
8 = LL deflection limit, L/Value
9 = Total load deflection limit, L/Value
10 = Total camber limit, L/Value
11 = Pattern live load factor
12 = Demand/capacity ratio limit
13 = Multi-response case design
14 = Is tall building?
15 = Seismic Design Grade
Value
The value of the considered preference item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Gamma0
Value > 0

3 = Ignore b/t check


0 = No
Any other value = Yes

4 = Classify beam as flexo compression member


0 = No
Any other value = Yes

5 = Consider deflection
0 = No
Any other value = Yes

6 = DL deflection limit, L/Value


Value > 0

7 = SDL + LL deflection limit, L/Value


Value > 0

8 = LL deflection limit, L/Value


Value > 0

9 = Total load deflection limit, L/Value


Value > 0

10 = Total camber limit, L/Value


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Demand/capacity ratio limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

14 = Tall building
0 = No
1 = Yes
15 = Seismic Design Grade
1 = Grade I
2 = Grade II
3 = Grade III
4 = Grade IV
5 = Non Seismic
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2010")

'set preference item


ret = SapModel.DesignSteel.Chinese_2010.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
Added Seismic Design Grade preference item in v18.0.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_09.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 39, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor LTB
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K LTB
23 = Moment coefficient, Omega1 Major
24 = Moment coefficient, Omega1 Minor
25 = Bending coefficient, Omega2
26 = Nonsway moment factor, U1 Major
27 = Nonsway moment factor, U1 Minor
28 = Sway moment factor, U2 Major
29 = Sway moment factor, U2 Minor
30 = Parameter for compressive resistance, n
31 = Yield stress, Fy
32 = Expected to specified Fy ratio, Ry
33 = Compressive resistance, Cr
34 = Tensile resistance, Tr
35 = Major bending resistance, Mr3
36 = Minor bending resistance, Mr2
37 = Major shear resistance, Vr2
38 = Minor shear resistance, Vr3
39 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

2 = Consider deflection
0 = No
Any other value = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L}

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
21 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

22 = Effective length factor, K LTB


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, Omega2


Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

27 = Nonsway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, U2 Major


Value >= 0; 0 means use program determined value.

29 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

30 = Parameter for compressive resistance, n


Value >= 0; 0 means use program determined value.

31 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

32 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value. [F/L2]=

33 = Compressive resistance, Cr
Value >= 0; 0 means use program determined value. [F]

34 = Tensile resistance, Tr
Value >= 0; 0 means use program determined value. [F]
35 = Major bending resistance, Mr3
Value >= 0; 0 means use program determined value. [FL]

36 = Minor bending resistance, Mr2


Value >= 0; 0 means use program determined value. [FL]

37 = Major shear resistance, Vr2


Value >= 0; 0 means use program determined value. [F]

38 = Minor shear resistance, Vr3


Value >= 0; 0 means use program determined value. [F]

39 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemCanadian_S16_09 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CSA-S16-09")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Canadian_S16_09.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_09.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 21, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)
4 = Ductility related modification factor, Rd
5 = Overstrength related modification factor, Ro
6 = Capacity factor, Phi bending
7 = Capacity factor, Phi compression
8 = Capacity factor, Phi tension
9 = Capacity factor, Phi shear
10 = Slender section modification
11 = Ignore seismic code
12 = Ignore special seismic load
13 = Doubler plate is plug welded
14 = Consider deflection
15 = DL deflection limit, L/Value
16 = SDL + LL deflection limit, L/Value
17 = LL deflection limit, L/Value
18 = Total load deflection limit, L/Value
19 = Total camber limit, L/Value
20 = Pattern live load factor
21 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)


Value > 0

4 = Ductility related modification factor, Rd


Value > 0

5 = Overstrength related modification factor, Ro


Value > 0

6 = Capacity factor, Phi bending


Value > 0

7 = Capacity factor, Phi compression


Value > 0

8 = Capacity factor, Phi tension


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Slender section modification


1 = Modified geometry
2 = modified Fy
11 = Ignore seismic code
0 = No
Any other value = Yes

12 = Ignore special seismic load


0 = No
Any other value = Yes
13 = Doubler plate is plug welded
0 = No
Any other value = Yes

14 = Consider deflection
0 = No
Any other value = Yes

15 = DL deflection limit, L/Value


Value > 0

16 = SDL + LL deflection limit, L/Value


Value > 0

17 = LL deflection limit, L/Value


Value > 0

18 = Total load deflection limit, L/Value


Value > 0

19 = Total camber limit, L/Value


Value > 0

20 = Pattern live load factor


Value >= 0

21 = Demand/capacity ratio limit


Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemCanadian_S16_09 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CSA-S16-09")

'get preference item


ret = SapModel.DesignSteel.Canadian_S16_09.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_09.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 39, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor LTB
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K LTB
23 = Moment coefficient, Omega1 Major
24 = Moment coefficient, Omega1 Minor
25 = Bending coefficient, Omega2
26 = Nonsway moment factor, U1 Major
27 = Nonsway moment factor, U1 Minor
28 = Sway moment factor, U2 Major
29 = Sway moment factor, U2 Minor
30 = Parameter for compressive resistance, n
31 = Yield stress, Fy
32 = Expected to specified Fy ratio, Ry
33 = Compressive resistance, Cr
34 = Tensile resistance, Tr
35 = Major bending resistance, Mr3
36 = Minor bending resistance, Mr2
37 = Major shear resistance, Vr2
38 = Minor shear resistance, Vr3
39 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

2 = Consider deflection
0 = No
Any other value = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
6 = LL deflection limit, L/Value
Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L}

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Effective length factor, K LTB


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, Omega2


Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

27 = Nonsway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, U2 Major


Value >= 0; 0 means use program determined value.

29 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

30 = Parameter for compressive resistance, n


Value >= 0; 0 means use program determined value.

31 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

32 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value. [F/L2]=

33 = Compressive resistance, Cr
Value >= 0; 0 means use program determined value. [F]

34 = Tensile resistance, Tr
Value >= 0; 0 means use program determined value. [F]
35 = Major bending resistance, Mr3
Value >= 0; 0 means use program determined value. [FL]

36 = Minor bending resistance, Mr2


Value >= 0; 0 means use program determined value. [FL]

37 = Major shear resistance, Vr2


Value >= 0; 0 means use program determined value. [F]

38 = Minor shear resistance, Vr3


Value >= 0; 0 means use program determined value. [F]

39 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemCanadian_S16_09 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CSA-S16-09")

'set overwrite item


ret = SapModel.DesignSteel.Canadian_S16_09.SetOverwrite("8",
1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_09.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 21, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)
4 = Ductility related modification factor, Rd
5 = Overstrength related modification factor, Ro
6 = Capacity factor, Phi bending
7 = Capacity factor, Phi compression
8 = Capacity factor, Phi tension
9 = Capacity factor, Phi shear
10 = Slender section modification
11 = Ignore seismic code
12 = Ignore special seismic load
13 = Doubler plate is plug welded
14 = Consider deflection
15 = DL deflection limit, L/Value
16 = SDL + LL deflection limit, L/Value
17 = LL deflection limit, L/Value
18 = Total load deflection limit, L/Value
19 = Total camber limit, L/Value
20 = Pattern live load factor
21 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)


Value > 0

4 = Ductility related modification factor, Rd


Value > 0

5 = Overstrength related modification factor, Ro


Value > 0

6 = Capacity factor, Phi bending


Value > 0

7 = Capacity factor, Phi compression


Value > 0

8 = Capacity factor, Phi tension


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Slender section modification


1 = Modified geometry
2 = modified Fy
11 = Ignore seismic code
0 = No
Any other value = Yes

12 = Ignore special seismic load


0 = No
Any other value = Yes
13 = Doubler plate is plug welded
0 = No
Any other value = Yes

14 = Consider deflection
0 = No
Any other value = Yes

15 = DL deflection limit, L/Value


Value > 0

16 = SDL + LL deflection limit, L/Value


Value > 0

17 = LL deflection limit, L/Value


Value > 0

18 = Total load deflection limit, L/Value


Value > 0

19 = Total camber limit, L/Value


Value > 0

20 = Pattern live load factor


Value >= 0

21 = Demand/capacity ratio limit


Value > 0
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemCanadian_S16_09 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CSA-S16-09")

'set preference item


ret = SapModel.DesignSteel.Canadian_S16_09.SetPreference(1,
7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Eurocode_3_2005.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 48, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor
19 = Effective length factor sway, K2 Major
20 = Effective length factor sway, K2 Minor
21 = Moment coefficient, kyy Major
22 = Moment coefficient, kzz Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Yield stress, Fy
27 = Compressive capacity, Nc.Rd
28 = Tensile capacity, Nt.Rd
29 = Major bending capacity, Mc3.Rd
30 = Minor bending capacity, Mc2.Rd
31 = Buckling resistance moment, Mb.Rd
32 = Major shear capacity, V2.Rd
33 = Minor shear capacity, V3.Rd
34 = Demand/capacity ratio limit
35 = Section class
36 = Column buckling curve, y-y
37 = Column buckling curve, z-z
38 = Buckling curve for LTB
39 = System overstrength factor, Omega
40 = Is rolled section
41 = Unbraced length ratio, LTB
42 = Effective length factor braced, K1 Major
43 = Effective length factor braced, K1 Major
44 = Effective length factor, K LTB
45 = Material overstrength factor, GammaOV
46 = Warping constant, Iw
47 = Elastic torsional buckling force, Ncr T
48 = Elastic torsional-flexural buckling force, Ncr TF
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.
8 = Total camber limit, L/Value
Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Effective length factor sway, K2 Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor sway, K2 Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, kyy Major


Value >= 0; 0 means use program determined value.
22 = Moment coefficient, kzz Minor
Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.

26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

28 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

29 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

30 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

31 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

33 = Minor shear capacity, V3.Rd


Value >= 0; 0 means use program determined value. [F]

34 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
35 = Section class
0 = Program default
1 = Class 1
2 = Class 2
3 = Class 3
4 = Class 4

36 = Column buckling curve, y-y


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

37 = Column buckling curve, z-z


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

38 = Buckling curve for LTB


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

39 = System overstrength factor, Omega


Value >= 0; 0 means use program determined value.

40 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

41 = Unbraced length ratio, LTB


Value >= 0; 0 means use program determined value.

42 = Effective length factor braced, K1 Major


Value >= 0; 0 means use program determined value.

43 = Effective length factor braced, K1 Minor


Value >= 0; 0 means use program determined value.
44 = Effective length factor, K LTB
Value >= 0; 0 means use program determined value.

45 = Material overstrength factor, GammaOV


Value >= 0; 0 means use program determined value.

46 = Warping constant, Iw
Value >= 0; 0 means use program determined value. [L6]

47 = Elastic torsional buckling force, Ncr T


Value >= 0; 0 means use program determined value. [F]

48 = Elastic torsional-flexural buckling force, Ncr TF


Value >= 0; 0 means use program determined value. [F]

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemEurocode_3_2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Eurocode 3-2005")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Eurocode_3_2005.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Updated the list of items in v18.0.0.
Added items 46 48 in v18.2.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Eurocode_3_2005.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Country
2 = Combos equation
3 = K factor method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
17 = Reliability Class
Value
The value of the considered preference item.
1 = Country
1 = CEN Default
2 = United Kingdom
3 = Slovenia
4 = Bulgaria
5 = Norway
7 = Sweden
8 = Finland
9 = Denmark
10 = Portugal
11 = Germany

2 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

3 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0

6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

17 = Reliability Class
1 = Class 1
2 = Class 2
3 = Class 3
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemEurocode_3_2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Eurocode 3-2005")

'get preference item


ret = SapModel.DesignSteel.EUROCODE_3_2005.GetPreference(4,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Fixed typographical error in version 14.1.0.
Added Reliability Class parameter and added Sweden, Finland, and Denmark as
Country parameters in version 14.2.2.
Added Portugal and Germany as Country parameters in SAP2000 Version
15.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Eurocode_3_2005.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 48, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor
19 = Effective length factor, K2 Major
20 = Effective length factor, K2 Minor
21 = Moment coefficient, kyy Major
22 = Moment coefficient, kzz Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Yield stress, Fy
27 = Compressive capacity, Nc.Rd
28 = Tensile capacity, Nt.Rd
29 = Major bending capacity, Mc3.Rd
30 = Minor bending capacity, Mc2.Rd
31 = Buckling resistance moment, Mb.Rd
32 = Major shear capacity, V2.Rd
33 = Minor shear capacity, V3.RD
34 = Demand/capacity ratio limit
35 = Section class
36 = Column buckling curve, y-y
37 = Column buckling curve, z-z
38 = Buckling curve for LTB
39 = System overstrength factor, Omega
40 = Is rolled section
41 = Unbraced length ratio, LTB
42 = Effective length factor braced, K1 Major
43 = Effective length factor braced, K1 Major
44 = Effective length factor, K LTB
45 = Material overstrength factor, GammaOV
46 = Warping constant, Iw
47 = Elastic torsional buckling force, Ncr T
48 = Elastic torsional-flexural buckling force, Ncr TF

Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
7 = Total load deflection limit, L/Value
Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Effective length factor sway, K2 Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor sway, K2 Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, kyy Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, kzz Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.

26 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

27 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

28 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

29 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

30 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

31 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

33 = Minor shear capacity, V3.Rd


Value >= 0; 0 means use program determined value. [F]

34 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
35 = Section class
0 = Program default
1= Class 1
2= Class 2
3= Class 3
4= Class 4

36 = Column buckling curve, y-y


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

37 = Column buckling curve, z-z


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

38 = Buckling curve for LTB


0 = Program default
1 = a0
2=a
3=b
4=c
5=d

39 = System overstrength factor, Omega


Value >= 0; 0 means use program determined value.

40 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

41 = Unbraced length ratio, LTB


Value >= 0; 0 means use program determined value.

42 = Effective length factor braced, K1 Major


Value >= 0; 0 means use program determined value.
43 = Effective length factor braced, K1 Minor
Value >= 0; 0 means use program determined value.

44 = Effective length factor, K LTB


Value >= 0; 0 means use program determined value.

45 = Material overstrength factor, GammaOV


Value >= 0; 0 means use program determined value.

46 = Warping constant, Iw
Value >= 0; 0 means use program determined value. [L6]

47 = Elastic torsional buckling force, Ncr T


Value >= 0; 0 means use program determined value. [F]

48 = Elastic torsional-flexural buckling force, Ncr TF


Value >= 0; 0 means use program determined value. [F]

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise, it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemEurocode_3_2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Eurocode 3-2005")

'set overwrite item


ret = SapModel.DesignSteel.EUROCODE_3_2005.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
In version 14.1.0, fixed typographical error.
Updated the list of items in v18.0.0.
Added items 46 48 in v18.2.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Eurocode_3_2005.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Country
2 = Combos equation
3 = K factor method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
17 = Reliability Class
Value
The value of the considered preference item.
1 = Country
1 = CEN Default
2 = United Kingdom
3 = Slovenia
4 = Bulgaria
5 = Norway
7 = Sweden
8 = Finland
9 = Denmark
10 = Portugal
11 = Germany

2 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

3 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0

6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

17 = Reliability Class
1 = Class 1
2 = Class 2
3 = Class 3
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise, it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemEurocode_3_2005()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Eurocode 3-2005")

'set preference item


ret = SapModel.DesignSteel.Eurocode_3_2005.SetPreference(4,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Added Norway as a Country parameter in version 14.1.0.
Added Reliability Class parameter and added Sweden, Finland, and Denmark as
Country parameters in version 14.2.2.
Added Portugal and Germany as Country parameters in SAP2000 Version
15.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Indian_IS_800_2007.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 44, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Section class
3 = Column buckling curve (z-z)
4 = Column buckling curve (y-y)
5 = Is rolled section
6 = Consider deflection
7 = Deflection check type
8 = DL deflection limit, L/Value
9 = SDL + LL deflection limit, L/Value
10 = LL deflection limit, L/Value
11 = Total load deflection limit, L/Value
12 = Total camber limit, L/Value
13 = DL deflection limit, absolute
14 = SDL + LL deflection limit, absolute
15 = LL deflection limit, absolute
16 = Total load deflection limit, absolute
17 = Total camber limit, absolute
18 = Specified camber
19 = Net area to total area ratio
20 = Live load reduction factor
21 = Unbraced length ratio, Major
22 = Unbraced length ratio, Minor
23 = Unbraced length ratio, Lateral Torsional Buckling
24 = Effective length factor Braced, K1 Major
25 = Effective length factor Braced, K1 Minor
26 = Effective length factor Sway, K2 Major
27 = Effective length factor Sway, K2 Minor
28 = Effective length factor, K Lateral Torsional Buckling
29 = Bending coefficient, C1
30 = Uniform moment factor, Cmz
31 = Uniform moment factor, Cmy
32 = Uniform moment factor, CmLT
33 = Moment coefficient, kz
34 = Moment coefficient, ky
35 = Moment coefficient, k_LT
36 = Yield stress, Fy
37 = Compressive capacity, Pd
38 = Tensile capacity, Td
39 = Major bending capacity, Mdz
40 = Minor bending capacity, Mdy
41 = Critical buckling moment, Mcr
42 = Major shear capacity, Vdy
43 = Minor shear capacity, Vdz
44 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = SMF
2 = OMF
3 = SCBF
4 = OCBF
5 = EBF
6 = Secondary

2 = Section class
1 = Class 1 (Plastic)
2 = Class 2 (Compact)
3 = Class 3 (Semicompact)
4 = Class 4 (Slender)

3 = Column buckling curve (z-z)


1=a
2=b
3=c
4=d

4 = Column buckling curve (y-y)


1=a
2=b
3=c
4=d

5 = Is rolled section
Value >= 0; 0 means use program default value
6 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

7 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

8 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

10 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

11 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

12 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

13 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

16 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

17 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

18 = Specified camber
Value >= 0. [L]
19 = Net area to total area ratio
Value >= 0; 0 means use program default value.

20 = Live load reduction factor


Value >= 0; 0 means use program determined value.

21 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

22 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

23 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

24 = Effective length factor Braced, K1 Major


Value >= 0; 0 means use program determined value.

25 = Effective length factor Braced, K1 Minor


Value >= 0; 0 means use program determined value.

26 = Effective length factor Sway, K2 Major


Value >= 0; 0 means use program determined value.

27 = Effective length Sway factor, K2 Minor


Value >= 0; 0 means use program determined value.

28 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

29 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

30 = Uniform moment factor, Cmz


Value >= 0; 0 means use program determined value.

31 = Uniform moment factor, Cmy


Value >= 0; 0 means use program determined value.

32 = Uniform moment factor, CmLT


Value >= 0; 0 means use program determined value.
33 = Moment coefficient, kz
Value >= 0; 0 means use program determined value.

34 = Moment coefficient, ky
Value >= 0; 0 means use program determined value.

35 = Moment coefficient, k_LT


Value >= 0; 0 means use program determined value.

36 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

37 = Compressive capacity, Pd
Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Td
Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mdz


Value >= 0; 0 means use program determined value. [F-L]

40 = Minor bending capacity, Mdy


Value >= 0; 0 means use program determined value. [F-L]

41 = Critical buckling moment, Mcr


Value >= 0; 0 means use program determined value. [F-L]

42 = Major shear capacity, Vdy


Value >= 0; 0 means use program determined value. [F]

43 = Minor shear capacity, Vdz


Value >= 0; 0 means use program determined value. [F]

44 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True then the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemINDIAN_IS_800_2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-2007")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.INDIAN_IS_800_2007.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Indian_IS_800_2007.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 18, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Importance factor
3 = Seismic Zone
4 = Consider P-delta Done
5 = GammaM0
6 = GammaM1
7 = Ignore sseismic code
8 = Ignore special seismic load
9 = Is doubler plate plug-welded
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit
18 = Multi-response case design

Value
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = OMF
3 = SCBF
4 = OCBF
5 = EBF
6 = Secondary

2 = Importance factor
Value > 0

3 = Seismic Zone
1 = Zone I
2 = Zone II
3 = Zone III
4 = Zone IV
5 = Zone V

4 = Consider P-delta Done


0 = No
Any other value = Yes

5 = GammaM0
Value > 0

6 = GammaM1
Value > 0

7 = Ignore sseismic code


0 = No
Any other value = Yes

8 = Ignore special seismic load


0 = No
Any other value = Yes

9 = Is doubler plate plug-welded


0 = No
Any other value = Yes

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0
16 = Pattern live load factor
Value >= 0

17 = Demand/capacity ratio limit


Value > 0

18 = Time history design


1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemIndian_IS_800_2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS 800:2007")

'get preference item


ret =
SapModel.DesignSteel.Indian_IS_800_2007.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Indian_IS_800_2007.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 44, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Section class
3 = Column buckling curve (z-z)
4 = Column buckling curve (y-y)
5 = Is rolled section
6 = Consider deflection
7 = Deflection check type
8 = DL deflection limit, L/Value
9 = SDL + LL deflection limit, L/Value
10 = LL deflection limit, L/Value
11 = Total load deflection limit, L/Value
12 = Total camber limit, L/Value
13 = DL deflection limit, absolute
14 = SDL + LL deflection limit, absolute
15 = LL deflection limit, absolute
16 = Total load deflection limit, absolute
17 = Total camber limit, absolute
18 = Specified camber
19 = Net area to total area ratio
20 = Live load reduction factor
21 = Unbraced length ratio, Major
22 = Unbraced length ratio, Minor
23 = Unbraced length ratio, Lateral Torsional Buckling
24 = Effective length factor Braced, K1 Major
25 = Effective length factor Braced, K1 Minor
26 = Effective length factor Sway, K2 Major
27 = Effective length factor Sway, K2 Minor
28 = Effective length factor, K Lateral Torsional Buckling
29 = Bending coefficient, C1
30 = Uniform moment factor, Cmz
31 = Uniform moment factor, Cmy
32 = Uniform moment factor, CmLT
33 = Moment coefficient, kz
34 = Moment coefficient, ky
35 = Moment coefficient, k_LT
36 = Yield stress, Fy
37 = Compressive capacity, Pd
38 = Tensile capacity, Td
39 = Major bending capacity, Mdz
40 = Minor bending capacity, Mdy
41 = Critical buckling moment, Mcr
42 = Major shear capacity, Vdy
43 = Minor shear capacity, Vdz
44 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = SMF
2 = OMF
3 = SCBF
4 = OCBF
5 = EBF
6 = Secondary

2 = Section class
1 = Class 1 (Plastic)
2 = Class 2 (Compact)
3 = Class 3 (Semicompact)
4 = Class 4 (Slender)

3 = Column buckling curve (z-z)


1=a
2=b
3=c
4=d

4 = Column buckling curve (y-y)


1=a
2=b
3=c
4=d

5 = Is rolled section
Value >= 0; 0 means use program default value
6 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

7 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

8 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

10 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

11 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

12 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

13 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

16 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

17 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

18 = Specified camber
Value >= 0. [L]

19 = Net area to total area ratio


Value >= 0; 0 means use program default value.

20 = Live load reduction factor


Value >= 0; 0 means use program determined value.

21 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

22 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

23 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

24 = Effective length factor Braced, K1 Major


Value >= 0; 0 means use program determined value.

25 = Effective length factor Braced, K1 Minor


Value >= 0; 0 means use program determined value.

26 = Effective length factor Sway, K2 Major


Value >= 0; 0 means use program determined value.

27 = Effective length Sway factor, K2 Minor


Value >= 0; 0 means use program determined value.

28 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

29 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

30 = Uniform moment factor, Cmz


Value >= 0; 0 means use program determined value.

31 = Uniform moment factor, Cmy


Value >= 0; 0 means use program determined value.

32 = Uniform moment factor, CmLT


Value >= 0; 0 means use program determined value.
33 = Moment coefficient, kz
Value >= 0; 0 means use program determined value.

34 = Moment coefficient, ky
Value >= 0; 0 means use program determined value.

35 = Moment coefficient, k_LT


Value >= 0; 0 means use program determined value.

36 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

37 = Compressive capacity, Pd
Value >= 0; 0 means use program determined value. [F]

38 = Tensile capacity, Td
Value >= 0; 0 means use program determined value. [F]

39 = Major bending capacity, Mdz


Value >= 0; 0 means use program determined value. [F-L]

40 = Minor bending capacity, Mdy


Value >= 0; 0 means use program determined value. [F-L]

41 = Critical buckling moment, Mcr


Value >= 0; 0 means use program determined value. [F-L]

42 = Major shear capacity, Vdy


Value >= 0; 0 means use program determined value. [F]

43 = Minor shear capacity, Vdz


Value >= 0; 0 means use program determined value. [F]

44 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemINDIAN_IS_800_2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-2007")

'set overwrite item


ret =
SapModel.DesignSteel.INDIAN_IS_800_2007.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Indian_IS_800_2007.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 18, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Importance factor
3 = Seismic Zone
4 = Consider P-delta Done
5 = GammaM0
6 = GammaM1
7 = Ignore seismic code
8 = Ignore special seismic load
9 = Is doubler plate plug-welded
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit
18 = Multi-response case design

Value
The value of the considered preference item.
The value of the considered preference item.
1 = Framing type
1 = SMF
2 = OMF
3 = SCBF
4 = OCBF
5 = EBF
6 = Secondary

2 = Importance factor
Value > 0

3 = Seismic Zone
1 = Zone I
2 = Zone II
3 = Zone III
4 = Zone IV
5 = Zone V

4 = Consider P-delta Done


0 = No
Any other value = Yes

5 = GammaM0
Value > 0

6 = GammaM1
Value > 0

7 = Ignore sseismic code


0 = No
Any other value = Yes

8 = Ignore special seismic load


0 = No
Any other value = Yes

9 = Is doubler plate plug-welded


0 = No
Any other value = Yes

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0
16 = Pattern live load factor
Value >= 0

17 = Demand/capacity ratio limit


Value > 0

18 = Time history design


1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemIndian_IS_800_2007()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-2007")

'set preference item


ret =
SapModel.DesignSteel.Indian_IS_800_2007.SetPreference(1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Norsok_N004.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Pressure equalized
27 = External pressure
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.
26 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

27 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, V3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemNorsok_N004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Norsok_N004.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Norsok_N004.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Combos equation
2 = K factor method
3 = Pressure interaction method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
Value
The value of the considered preference item.
1 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

2 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

3 = Pressure interaction method


1 = Method A
2 = Method B

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0
6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemNorsok_N004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004")

'get preference item


ret = SapModel.DesignSteel.Norsok_N004.GetPreference(4,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Norsok_N004.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Pressure equalized
27 = External pressure
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.
26 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

27 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, V3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemNorsok_N004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004")

'set overwrite item


ret = SapModel.DesignSteel.Norsok_N004.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Norsok_N004.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Combos equation
2 = K factor method
3 = Pressure interaction method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
Value
The value of the considered preference item.
1 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

2 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

3 = Pressure interaction method


1 = Method A
2 = Method B

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0
6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemNorsok_N004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004")

'set preference item


ret = SapModel.DesignSteel.Norsok_N004.SetPreference(4, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Norsok_N0042013.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Pressure equalized
27 = External pressure
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.
26 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

27 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, V3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemNorsok_N0042013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004 2013")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Norsok_N0042013.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Norsok_N0042013.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Combos equation
2 = K factor method
3 = Pressure interaction method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
Value
The value of the considered preference item.
1 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

2 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

3 = Pressure interaction method


1 = Method A
2 = Method B

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0
6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemNorsok_N0042013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004 2013")

'get preference item


ret = SapModel.DesignSteel.Norsok_N0042013.GetPreference(4,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Norsok_N0042013.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, kzy
25 = Moment coefficient, kyz
26 = Pressure equalized
27 = External pressure
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, kzy


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, kyz


Value >= 0; 0 means use program determined value.
26 = Pressure equalized
0 = Program Determined
1 = No
2 = Yes

27 = External pressure
Any value OK; Positive generates hoop compression and negative generates
hoop tension. [F/L2]

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, V2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, V3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemNorsok_N0042013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004 2013")

'set overwrite item


ret = SapModel.DesignSteel.Norsok_N0042013.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
GetOverwriteype topic text here.
SetPreference
Syntax
SapObject.SapModel.DesignSteel.Norsok_N0042013.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Combos equation
2 = K factor method
3 = Pressure interaction method
4 = Framing type
5 = GammaM0
6 = GammeM1
7 = GammaM2
8 = Consider deflection
9 = DL deflection limit, L/Value
10 = SDL + LL deflection limit, L/Value
11 = LL deflection limit, L/Value
12 = Total deflection limit, L/Value
13 = Total camber limit, L/Value
14 = Pattern live load factor
15 = Demand/capacity ratio limit
16 = Multi-response case design
Value
The value of the considered preference item.
1 = Combos equation
1 = 1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

2 = K factor method
1 = Method 1 (Annex A)
2 = Method 2 (Annex B)

3 = Pressure interaction method


1 = Method A
2 = Method B

4 = Framing type
1 = Moment Frame
2 = Braced Frame

5 = GammaM0
Value > 0
6 = GammeM1
Value > 0

7 = GammeM2
Value > 0

8 = Consider deflection
0 = No
Any other value = Yes

9 = DL deflection limit, L/Value


Value > 0

10 = SDL + LL deflection limit, L/Value


Value > 0

11 = LL deflection limit, L/Value


Value > 0

12 = Total deflection limit, L/Value


Value > 0

13 = Total camber limit, L/Value


Value > 0

14 = Pattern live load factor


Value >= 0

15 = Demand/capacity ratio limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemNorsok_N0042013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Norsok N-004 2013")

'set preference item


ret = SapModel.DesignSteel.Norsok_N0042013.SetPreference(4,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 16.1.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.NewZealand_NZS3404_1997.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 46, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Steel type
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, Ke Major Braced
22 = Effective length factor, Ke Minor Braced
23 = Effective length factor, Ke Major Sway
24 = Effective length factor, Ke Minor Sway
25 = Twist restraint factor for LTB (kt)
26 = lateral rotation restraint factor (kr)
27 = Load height factor for LTB (kl)
28 = Moment coefficient, Cm Major
29 = Moment coefficient, Cm Minor
30 = Moment modification factor, Alpha_m
31 = Slender reduction factor, Alpha_s
32 = Nonsway moment factor, Db Major
33 = Nonsway moment factor, Db Minor
34 = Sway moment factor, Ds Major
35 = Sway moment factor, Ds Minor
36 = Form factor, Kf
37 = Axial capacity correction factor, Kt
38 = Yield stress, Fy
39 = Compressive capacity, Nc
40 = Tensile capacity, Nt
41 = Major bending capacity, Ms33
42 = Minor bending capacity, Ms22
43 = Major bending capacity, Mb33
44 = Major shear capacity, Vu2
45 = Minor shear capacity, Vu3
46 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment frame
2 = Braced frame

2 = Steel type
1 = Hot rolled
2 = Hot finished
3 = Cold form
4 = Stress relieved
5 = Lightly welded
6 = Heavily welded

3 = Consider deflection
0 = No
Any other value = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
7 = LL deflection limit, L/Value
Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
21 = Effective length factor, Ke Major Braced
Value >= 0; 0 means use program determined value.

22 = Effective length factor, Ke Minor Braced


Value >= 0; 0 means use program determined value.

23 = Effective length factor, Ke Major Sway


Value >= 0; 0 means use program determined value.

24 = Effective length factor, Ke Minor Sway


Value >= 0; 0 means use program determined value.

25 = Twist restraint factor for LTB (kt)


Value >= 0; 0 means use program determined value.

26 = Lateral rotation restraint factor (kr)


Value >= 0; 0 means use program determined value.

27 = Load height factor for LTB (kl)


Value >= 0; 0 means use program determined value.

28 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

29 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

30 = Moment modification factor, Alpha_m


Value >= 0; 0 means use program determined value.

31 = Slender reduction factor, Alpha_s


Value >= 0; 0 means use program determined value.

32 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

33 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

34 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value.

35 = Sway moment factor, Bs Minor


Value >= 0; 0 means use program determined value.

36 = Form factor, Kf
Value >= 0; 0 means use program determined value.

37 = Axial capacity correction factor, Kt


Value >= 0; 0 means use program determined value.

38 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

39 = Compressive capacity, Nc
Value >= 0; 0 means use program determined value. [F]

40 = Tensile capacity, Nt
Value >= 0; 0 means use program determined value. [F]

41 = Major bending capacity, Ms33


Value >= 0; 0 means use program determined value. [FL]

42 = Minor bending capacity, Ms22


Value >= 0; 0 means use program determined value. [FL]

43 = Minor bending capacity, Mb33


Value >= 0; 0 means use program determined value. [FL]

44 = Major shear capacity, Vu2


Value >= 0; 0 means use program determined value. [F]

45 = Minor shear capacity, Vu3


Value >= 0; 0 means use program determined value. [F]

46 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemNewZealand_NZS3404_1997 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("NZS 3404-1997")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.NewZealand_NZS3404_1997.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignSteel.NewZealand_NZS3404_1997.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 17, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Structural analysis method
4 = Steel type
5 = Capacity factor, Phi bending
6 = Capacity factor, Phi compression
7 = Capacity factor, Phi tension yielding
8 = Capacity factor, Phi tension fracture
9 = Capacity factor, Phi shear
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total load deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Moment frame
2 = Braced frame

3 = Structural analysis method


1 = General 2nd Order
2 = Amplified 1st Order

4 = Steel type
1 = Hot rolled
2= Hot finished
3= Cold form
4= Stress relieved
5= Lightly welded
6= Heavily welded

5 = Capacity factor, Phi bending


Value > 0

6 = Capacity factor, Phi compression


Value > 0

7 = Capacity factor, Phi tension yielding


Value > 0

8 = Capacity factor, Phi tension fracture


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total load deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0

16 = Pattern live load factor


Value >= 0
17 = Demand/capacity ratio limit
Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemNewZealand_NZS3404_1997 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("NZS 3404-1997")

'get preference item


ret =
SapModel.DesignSteel.NewZealand_NZS3404_1997.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.NewZealand_NZS3404_1997.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 46, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Steel type
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor
20 = Unbraced length ratio, Lateral Torsional Buckling
21 = Effective length factor, Ke Major Braced
22 = Effective length factor, Ke Minor Braced
23 = Effective length factor, Ke Major Sway
24 = Effective length factor, Ke Minor Sway
25 = Twist restraint factor for LTB (kt)
26 = lateral rotation restraint factor (kr)
27 = Load height factor for LTB (kl)
28 = Moment coefficient, Cm Major
29 = Moment coefficient, Cm Minor
30 = Moment modification factor, Alpha_m
31 = Slender reduction factor, Alpha_s
32 = Nonsway moment factor, Db Major
33 = Nonsway moment factor, Db Minor
34 = Sway moment factor, Ds Major
35 = Sway moment factor, Ds Minor
36 = Form factor, Kf
37 = Axial capacity correction factor, Kt
38 = Yield stress, Fy
39 = Compressive capacity, Nc
40 = Tensile capacity, Nt
41 = Major bending capacity, Ms33
42 = Minor bending capacity, Ms22
43 = Major bending capacity, Mb33
44 = Major shear capacity, Vu2
45 = Minor shear capacity, Vu3
46 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Moment frame
2 = Braced frame

2 = Steel type
1 = Hot rolled
2 = Hot finished
3 = Cold form
4 = Stress relieved
5 = Lightly welded
6 = Heavily welded

3 = Consider deflection
0 = No
Any other value = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L}

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

20 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
21 = Effective length factor, Ke Major Braced
Value >= 0; 0 means use program determined value.

22 = Effective length factor, Ke Minor Braced


Value >= 0; 0 means use program determined value.

23 = Effective length factor, Ke Major Sway


Value >= 0; 0 means use program determined value.

24 = Effective length factor, Ke Minor Sway


Value >= 0; 0 means use program determined value.

25 = Twist restraint factor for LTB (kt)


Value >= 0; 0 means use program determined value.

26 = Lateral rotation restraint factor (kr)


Value >= 0; 0 means use program determined value.

27 = Load height factor for LTB (kl)


Value >= 0; 0 means use program determined value.

28 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

29 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

30 = Moment modification factor, Alpha_m


Value >= 0; 0 means use program determined value.

31 = Slender reduction factor, Alpha_s


Value >= 0; 0 means use program determined value.

32 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

33 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

34 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value.
35 = Sway moment factor, Bs Minor
Value >= 0; 0 means use program determined value.

36 = Form factor, Kf
Value >= 0; 0 means use program determined value.

37 = Axial capacity correction factor, Kt


Value >= 0; 0 means use program determined value.

38 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

39 = Compressive capacity, Nc
Value >= 0; 0 means use program determined value. [F]

40 = Tensile capacity, Nt
Value >= 0; 0 means use program determined value. [F]

41 = Major bending capacity, Ms33


Value >= 0; 0 means use program determined value. [FL]

42 = Minor bending capacity, Ms22


Value >= 0; 0 means use program determined value. [FL]

43 = Minor bending capacity, Mb33


Value >= 0; 0 means use program determined value. [FL]

44 = Major shear capacity, Vu2


Value >= 0; 0 means use program determined value. [F]

45 = Minor shear capacity, Vu3


Value >= 0; 0 means use program determined value. [F]

46 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAustralian_AS4100_1998 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("NZS 3404-1997")

'set overwrite item


ret =
SapModel.DesignSteel.NewZealand_NZS3404_1997.SetOverwrite("8", 1,
7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignSteel.NewZealand_NZS3404_1997.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 17, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Structural analysis method
4 = Steel type
5 = Capacity factor, Phi bending
6 = Capacity factor, Phi compression
7 = Capacity factor, Phi tension yielding
8 = Capacity factor, Phi tension fracture
9 = Capacity factor, Phi shear
10 = Consider deflection
11 = DL deflection limit, L/Value
12 = SDL + LL deflection limit, L/Value
13 = LL deflection limit, L/Value
14 = Total load deflection limit, L/Value
15 = Total camber limit, L/Value
16 = Pattern live load factor
17 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Moment frame
2 = Braced frame

3 = Structural analysis method


1 = General 2nd Order
2 = Amplified 1st Order

4 = Steel type
1 = Hot rolled
2= Hot finished
3= Cold form
4= Stress relieved
5= Lightly welded
6= Heavily welded

5 = Capacity factor, Phi bending


Value > 0

6 = Capacity factor, Phi compression


Value > 0

7 = Capacity factor, Phi tension yielding


Value > 0

8 = Capacity factor, Phi tension fracture


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Consider deflection
0 = No
Any other value = Yes

11 = DL deflection limit, L/Value


Value > 0

12 = SDL + LL deflection limit, L/Value


Value > 0

13 = LL deflection limit, L/Value


Value > 0

14 = Total load deflection limit, L/Value


Value > 0

15 = Total camber limit, L/Value


Value > 0

16 = Pattern live load factor


Value >= 0
17 = Demand/capacity ratio limit
Value > 0
Remarks
This function sets the value of a steel design preference item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignPreferenceItemNewZealand_NZS3404_1997 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("NZS 3404-1997")

'set preference item


ret =
SapModel.DesignSteel.NewZealand_NZS3404_1997.SetPreference(1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetPreference
DeleteResults
Syntax
SapObject.SapModel.DesignConcrete.DeleteResults
VB6 Procedure
Function DeleteResults() As Long
Parameters
None
Remarks
This function deletes all concrete frame design results.
The function returns zero if the results are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteConcreteDesignResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'delete concrete design results


ret = SapModel.DesignConcrete.DeleteResults

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
Syntax
SapObject.SapModel.DesignConcrete.GetCode
VB6 Procedure
Function GetCode(ByRef CodeName As String) As Long
Parameters
CodeName
This is one of the following concrete design code names.
AASHTO LRFD 2014
AASHTO LRFD 2012
AASHTO Concrete 07
ACI 318-14
ACI 318-11
ACI 318-08/IBC2009
AS 3600-09
BS8110 97
Chinese 2010
CSA A23.3-14
CSA A23.3-04
Eurocode 2-2004
Hong Kong CP 2013
Indian IS 456-2000
Italian NTC 2008
KBC 2009
Mexican RCDF 2004
NZS 3101:2006
Singapore CP 65:99
SP 63.13330.2012
TS 500-2000
Remarks
This function retrieves the concrete design code.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CodeName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'get concrete design code


ret = SapModel.DesignConcrete.GetCode(CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Modified list of codes contained in the CodeName Parameter in version 15.0.1.
Updated list of available codes in v17.3.0.
Removed older codes which have been removed from the program in v18.0.0.
Updated list of available codes in v19.1.0.
See Also
SetCode
GetComboAutoGenerate
Syntax
SapObject.SapModel.DesignConcrete.GetComboAutoGenerate
VB6 Procedure
Function GetComboAutoGenerate(ByRef AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for concrete frame design is turned on. If it is False, the option is
turned off.
Remarks
This function retrieves the value of the automatically generated code-based
design load combinations option for concrete frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub GetConcreteDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoGenerate As Boolean
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set option to not auto generate code-based design load


combinations
ret =
SapModel.DesignConcrete.GetComboAutoGenerate(AutoGenerate)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetComboAutoGenerate
GetComboStrength
Syntax
SapObject.SapModel.DesignConcrete.GetComboStrength
VB6 Procedure
Function GetComboStrength(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for concrete
strength design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for concrete strength design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for concrete strength design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default concrete design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False, True,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)
'select combos for concrete strength design
For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignConcrete.SetComboStrength(MyName2(i), Selected)
Next i

'get combos selected for concrete strength design


ret = SapModel.DesignConcrete.GetComboStrength(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboStrength
GetDesignSection
Syntax
SapObject.SapModel.DesignConcrete.GetDesignSection
VB6 Procedure
Function GetDesignSection(ByVal Name As String, ByRef PropName As String)
As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
PropName
The name of the design section for the specified frame object.
Remarks
This function retrieves the design section for a specified concrete frame object.
The function returns zero if the section is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get design section


ret = SapModel.DesignConcrete.GetDesignSection("8",
PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDesignSection
GetResultsAvailable {Concrete}
Syntax
SapObject.SapModel.DesignConcrete.GetResultsAvailable
VB6 Procedure
Function GetResultsAvailable() As Boolean
Parameters
None
Remarks
The function returns True if the concrete frame design results are available,
otherwise False.
VBA Example
Sub GetResultsAvailable()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ResultsAvailable As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20, 12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'check if design results are available


ResultsAvailable = SapModel.DesignConcrete.GetResultsAvailable

'close Sap2000
SapObject.ApplicationExit.False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
GetSummaryResultsBeam
Syntax
SapObject.SapModel.DesignConcrete.GetSummaryResultsBeam
VB6 Procedure
Function GetSummaryResultsBeam(ByVal Name As String, ByRef NumberItems
As Long, ByRef FrameName() As String, ByRef Location() As Double, ByRef
TopCombo() As String, ByRef TopArea() As Double, ByRef BotCombo() As
String, ByRef BotArea() As Double, ByRef VmajorCombo() As String, ByRef
VmajorArea() As Double, ByRef TLCombo() As String, ByRef TLArea() As
Double, ByRef TTCombo() As String, ByRef TTArea() As Double, ByRef
ErrorSummary() As String, ByRef WarningSummary() As String, Optional ByVal
ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
Location
This is an array that includes the distance from the I-end of the frame object to
the location where the results are reported. [L]
TopCombo
This is an array that includes the name of the design combination for which the
controlling top longitudinal rebar area for flexure occurs. A combination name
followed by (Sp) indicates that the design loads were obtained by applying
special, code-specific multipliers to all or part of the specified design load
combination, or that the design was based on the capacity of other objects (or
other design locations for the same object).
TopArea
This is an array that includes the total top longitudinal rebar area required for the
flexure at the specified location. It does not include the area of steel required for
torsion. [L2]
BotCombo
This is an array that includes the name of the design combination for which the
controlling bottom longitudinal rebar area for flexure occurs. A combination name
followed by (Sp) indicates that the design loads were obtained by applying
special, code-specific, multipliers to all or part of the specified design load
combination, or that the design was based on the capacity of other objects (or
other design locations for the same object).
BotArea
This is an array that includes the total bottom longitudinal rebar area required for
the flexure at the specified location. It does not include the area of steel required
for torsion. [L2]
VmajorCombo
This is an array that includes the name of the design combination for which the
controlling shear occurs. A combination name followed by (Sp) indicates that the
design loads were obtained by applying special, code-specific, multipliers to all
or part of the specified design load combination, or that the design was based on
the capacity of other objects (or other design locations for the same object).
VmajorArea
This is an array that includes the required area of transverse shear reinforcing
per unit length along the frame object for shear at the specified location. [L2/L]
TLCombo
This is an array that includes the name of the design combination for which the
controlling longitudinal rebar area for torsion occurs. A combination name
followed by (Sp) indicates that the design loads were obtained by applying
special, code-specific, multipliers to all or part of the specified design load
combination, or that the design was based on the capacity of other objects (or
other design locations for the same object).
TLArea
This is an array that includes the total longitudinal rebar area required for
torsion. [L2]
TTCombo
This is an array that includes the name of the design combination for which the
controlling transverse reinforcing for torsion occurs. A combination name
followed by (Sp) indicates that the design loads were obtained by applying
special, code-specific, multipliers to all or part of the specified design load
combination, or that the design was based on the capacity of other objects (or
other design locations for the same object).
TTArea
This is an array that includes the required area of transverse torsional shear
reinforcing per unit length along the frame object for torsion at the specified
location. [L2/L]
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for concrete design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
Note that torsional design is only included for some codes.
VBA Example
Sub GetConcreteBeamDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim FrameName() As String
Dim Location() As Double
Dim TopCombo() As String
Dim TopArea() As Double
Dim BotCombo() As String
Dim BotArea() As Double
Dim VmajorCombo() As String
Dim VmajorArea() As Double
Dim TLCombo() As String
Dim TLArea() As Double
Dim TTCombo() As String
Dim TTArea() As Double
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'create new concrete frame section properties


ret = SapModel.PropFrame.SetRectangle("COL", "4000Psi", 20,
20)
ret = SapModel.PropFrame.SetRectangle("BEAM", "4000Psi", 20,
12)
ret = SapModel.PropFrame.SetRebarBeam("BEAM", Name, Name, 2,
2, 2, 2, 2, 2)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "BEAM", "COL")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get summary result data


ret = SapModel.DesignConcrete.GetSummaryResultsBeam("8",
NumberItems, FrameName, Location, TopCombo, TopArea, BotCombo,
BotArea, VmajorCombo, VmajorArea, TLCombo, TLArea, TTCombo,
TTArea, ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetSummaryResultsColumn
GetSummaryResultsJoint
GetSummaryResultsColumn
Syntax
SapObject.SapModel.DesignConcrete.GetSummaryResultsColumn
VB6 Procedure
Function GetSummaryResultsColumn(ByVal Name As String, ByRef
NumberItems As Long, ByRef FrameName() As String, ByRef MyOption() As
Long, ByRef Location() As Double, ByRef PMMCombo() As String, ByRef
PMMArea() As Double, ByRef PMMRatio() As Double, ByRef VmajorCombo()
As String, ByRef AVmajor() As Double, ByRef VminorCombo() As String, ByRef
AVminor() As Double, ByRef ErrorSummary() As String, ByRef
WarningSummary() As String, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
MyOption
This is an array that includes 1 or 2, indicating the design option for each frame
object.
1 = Check
2 = Design
Location
This is an array that includes the distance from the I-end of the frame object to
the location where the results are reported. [L]
PMMCombo
This is an array that includes the name of the design combination for which the
controlling PMM ratio or rebar area occurs. A combination name followed by
(Sp) indicates that the design loads were obtained by applying special, code-
specific multipliers to all or part of the specified design load combination, or that
the design was based on the capacity of other objects (or other design locations
for the same object).
PMMArea
This is an array that includes the total longitudinal rebar area required for the
axial force plus biaxial moment (PMM) design at the specified location. [L2]
This item applies only when MyOption = 2 (design).
PMMRatio
This is an array that includes the axial force plus biaxial moment (PMM) stress
ratio at the specified location.
VmajorComboitem applies only when MyOption = 1 (check).
VmajorCombo
This is an array that includes the name of the design combination for which the
controlling major shear occurs.
AVmajor
This is an array that includes the required area of transverse shear reinforcing
per unit length along the frame object for major shear at the specified location.
[L2/L]
VminorCombo
This is an array that includes the name of the design combination for which the
controlling minor shear occurs.
AVminor
This is an array that includes the required area of transverse shear reinforcing
per unit length along the frame object for minor shear at the specified location.
[L2/L]
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for concrete design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteColumnDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim FrameName() As String
Dim MyOption() As Long
Dim Location() As Double
Dim PMMCombo() As String
Dim PMMArea() As Double
Dim PMMRatio() As Double
Dim VmajorCombo() As String
Dim AVmajor() As Double
Dim VminorCombo() As String
Dim AVminor() As Double
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'create new concrete frame section properties


ret = SapModel.PropFrame.SetRectangle("COL", "4000Psi", 20,
20)
ret = SapModel.PropFrame.SetRectangle("BEAM", "4000Psi", 20,
12)
ret = SapModel.PropFrame.SetRebarBeam("BEAM", Name, Name, 2,
2, 2, 2, 2, 2)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "BEAM", "COL")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get summary result data


ret = SapModel.DesignConcrete.GetSummaryResultsColumn("1",
NumberItems, FrameName, MyOption, Location, PMMCombo, PMMArea,
PMMRatio, VmajorCombo, AVmajor, VminorCombo, AVminor,
ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetSummaryResultsBeam
GetSummaryResultsJoint
GetSummaryResultsJoint
Syntax
SapObject.SapModel.DesignConcrete.GetSummaryResultsJoint
VB6 Procedure
Function GetSummaryResultsJoint(ByVal Name As String, ByRef NumberItems
As Long, ByRef FrameName() As String, ByRef LCJSRatioMajor() As String,
ByRef JSRatioMajor() As Double, ByRef LCJSRatioMinor() As String, ByRef
JSRatioMinor() As Double, ByRef LCBCCRatioMajor() As String, ByRef
BCCRatioMajor() As Double, ByRef LCBCCRatioMinor() As String, ByRef
BCCRatioMinor() As Double, ByRef ErrorSummary() As String, ByRef
WarningSummary() As String, Optional ByVal ItemType As eItemType = Object)
As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
LCJSRatioMajor
This is an array that includes the name of the design combination for which the
controlling joint shear ratio associated with the column major axis occurs. A
combination name followed by (Sp) indicates that the design loads were obtained
by applying special, code-specific multipliers to all or part of the specified design
load combination, or that the design was based on the capacity of other objects
(or other design locations for the same object).
JSRatioMajor
This is an array that includes the joint shear ratio associated with the column
major axis. This is the joint shear divided by the joint shear capacity.
LCJSRatioMinor
This is an array that includes the name of the design combination for which the
controlling joint shear ratio associated with the column minor axis occurs. A
combination name followed by (Sp) indicates that the design loads were obtained
by applying special, code-specific multipliers to all or part of the specified design
load combination, or that the design was based on the capacity of other objects
(or other design locations for the same object).
JSRatioMinor
This is an array that includes the joint shear ratio associated with the column
minor axis. This is the joint shear divided by the joint shear capacity.
LCBCCRatioMajor
This is an array that includes the name of the design combination for which the
controlling beam/column capacity ratio associated with the column major axis
occurs. A combination name followed by (Sp) indicates that the design loads
were obtained by applying special, code-specific multipliers to all or part of the
specified design load combination, or that the design was based on the capacity
of other objects (or other design locations for the same object).
BCCRatioMajor
This is an array that includes the beam/column capacity ratio associated with the
column major axis. This is the sum of the column capacities divided by the sum
of the beam capacities at the top of the specified column.
LCBCCRatioMinor
This is an array that includes the name of the design combination for which the
controlling beam/column capacity ratio associated with the column minor axis
occurs. A combination name followed by (Sp) indicates that the design loads
were obtained by applying special, code-specific multipliers to all or part of the
specified design load combination, or that the design was based on the capacity
of other objects (or other design locations for the same object).
BCCRatioMinor
This is an array that includes the beam/column capacity ratio associated with the
column minor axis. This is the sum of the column capacities divided by the sum
of the beam capacities at the top of the specified column.
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for concrete design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
Note that joint design is only included for some codes.
VBA Example
Sub GetConcreteJointDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim FrameName() As String
Dim LCJSRatioMajor() As String
Dim JSRatioMajor() As Double
Dim LCJSRatioMinor() As String
Dim JSRatioMinor() As Double
Dim LCBCCRatioMajor() As String
Dim BCCRatioMajor() As Double
Dim LCBCCRatioMinor() As String
Dim BCCRatioMinor() As Double
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'create new concrete frame section properties


ret = SapModel.PropFrame.SetRectangle("COL", "4000Psi", 20,
20)
ret = SapModel.PropFrame.SetRectangle("BEAM", "4000Psi", 20,
12)
ret = SapModel.PropFrame.SetRebarBeam("BEAM", Name, Name, 2,
2, 2, 2, 2, 2)
'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "BEAM", "COL")

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign IBC2003 parameters


ret = SapModel.LoadPatterns.AutoSeismic.SetIBC2003("EQX", 1,
0.05, 1, 0.035, 0, False, 0, 0, 1, 1, 3, 1, 0.4, 0, 0, 8, 3, 5.5)

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-02")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get summary result data


ret = SapModel.DesignConcrete.GetSummaryResultsJoint("3",
NumberItems, FrameName, LCJSRatioMajor, JSRatioMajor,
LCJSRatioMinor, JSRatioMinor, LCBCCRatioMajor, BCCRatioMajor,
LCBCCRatioMinor, BCCRatioMinor, ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetSummaryResultsBeam
GetSummaryResultsColumn
ResetOverwrites
Syntax
SapObject.SapModel.DesignConcrete.ResetOverwrites
VB6 Procedure
Function ResetOverwrites() As Long
Parameters
None
Remarks
This function resets all concrete frame design overwrites to default values.
The function returns zero if the overwrites are successfully reset; otherwise it
returns a nonzero value.
The function will fail if no concrete frame objects are present.
VBA Example
Sub ResetConcreteDesignOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'reset concrete design overwrites


ret = SapModel.DesignConcrete.ResetOverwrites

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
Syntax
SapObject.SapModel.DesignConcrete.SetCode
VB6 Procedure
Function SetCode(ByVal CodeName As String) As Long
Parameters
CodeName
This is one of the following concrete design code names.
AASHTO LRFD 2014
AASHTO LRFD 2012
AASHTO Concrete 07
ACI 318-14
ACI 318-11
ACI 318-08/IBC2009
AS 3600-09
BS8110 97
Chinese 2010
CSA A23.3-14
CSA A23.3-04
Eurocode 2-2004
Hong Kong CP 2013
Indian IS 456-2000
Italian NTC 2008
KBC 2009
Mexican RCDF 2004
NZS 3101:2006
Singapore CP 65:99
SP 63.13330.2012
TS 500-2000
Remarks
This function sets the concrete design code.
The function returns zero if the code is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-14")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Updated list of available codes in v17.3.0.
Removed older codes which have been removed from the program in v18.0.0.
Updated list of available codes in v19.1.0.
See Also
GetCode
SetComboAutoGenerate
Syntax
SapObject.SapModel.DesignConcrete.SetComboAutoGenerate
VB6 Procedure
Function SetComboAutoGenerate(ByVal AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for concrete frame design is turned on. If it is False, the option is
turned off.
Remarks
This function turns on or off the option to automatically generate code-based
design load combinations for concrete frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetConcreteDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set option to not auto generate code-based design load


combinations
ret = SapModel.DesignConcrete.SetComboAutoGenerate(False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetComboAutoGenerate
SetComboStrength
Syntax
SapObject.SapModel.DesignConcrete.SetComboStrength
VB6 Procedure
Function SetComboStrength(ByVal Name As String, ByVal Selected As Boolean)
As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for concrete strength design. If it is False, the combination is not
selected for concrete strength design.
Remarks
This function selects or deselects a load combination for concrete strength
design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetConcreteDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section properties


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default concrete design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False, True,
False, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for concrete strength design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignConcrete.SetComboStrength(MyName(i),
Selected)
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboStrength
SetDesignSection
Syntax
SapObject.SapModel.DesignConcrete.SetDesignSection
VB6 Procedure
Function SetDesignSection(ByVal Name As String, ByVal PropName As String,
ByVal LastAnalysis As Boolean, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
The name of an existing frame section property to be used as the design section
for the specified frame objects. This item applies only when LastAnalysis =
False.
LastAnalysis
If this item is True, the design section for the specified frame objects is reset to
the last analysis section for the frame object. If it is False, the design section is
set to that specified by PropName.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects, and the Name item is ignored.
Remarks
This function modifies the design section for all specified frame objects that
have a concrete frame design procedure.
The function returns zero if the design section is successfully modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetConcreteDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section properties


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)
ret = SapModel.PropFrame.SetRectangle("R2", "4000Psi", 20,
16)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'set design section


ret = SapModel.DesignConcrete.SetDesignSection("8", "R2",
False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDesignSection
StartDesign
Syntax
SapObject.SapModel.DesignConcrete.StartDesign
VB6 Procedure
Function StartDesign() As Long
Parameters
None
Remarks
This function starts the concrete frame design.
The function returns zero if the concrete frame design is successfully started;
otherwise it returns a nonzero value.
The function will fail if no concrete frame objects are present. It also will fail if
analysis results are not available.
VBA Example
Sub StartConcreteDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifyPassed
Syntax
SapObject.SapModel.DesignConcrete.VerifyPassed
VB6 Procedure
Function VerifyPassed(ByRef NumberItems As Long, ByRef n1 As Long, ByRef
n2 As Long, ByRef MyName() As String) As Long
Parameters
NumberItems
The number of concrete frame objects that did not pass the design check or
have not yet been checked.
n1
The number of concrete frame objects that did not pass the design check.
n2
The number of concrete frame objects that have not yet been checked.
MyName
This is an array that includes the name of each frame object that did not pass
the design check or has not yet been checked.
Remarks
This function retrieves the names of the frame objects that did not pass the
design check or have not yet been checked, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyConcreteDesignPassed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName2() As String
Dim NumberItems As Long
Dim n1 As Long
Dim n2 As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'verify frame objects successfully designed


ret = SapModel.DesignConcrete.VerifyPassed(NumberItems, n1,
n2, MyName)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifySections
Syntax
SapObject.SapModel.DesignConcrete.VerifySections
VB6 Procedure
Function VerifySections(ByRef NumberItems As Long, ByRef MyName() As
String) As Long
Parameters
NumberItems
The number of frame objects that have different analysis and design sections.
MyName
This is an array that includes the name of each frame object that has different
analysis and design sections.
Remarks
This function retrieves the names of the frame objects that have different
analysis and design sections, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyConcreteDesignSections()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyName2() As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'verify analysis versus design section


ret = SapModel.DesignConcrete.VerifySections(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_Concrete_07.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemAASHTO_Concrete_07()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO Concrete 07")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.AASHTO_Concrete_07.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_Concrete_07.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItem AASHTO_Concrete_07()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO Concrete 07")

'get preference item


ret =
SapModel.DesignConcrete.AASHTO_Concrete_07.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_Concrete_07.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItem AASHTO_Concrete_07 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO Concrete 07")

'set overwrite item


ret =
SapModel.DesignConcrete.AASHTO_Concrete_07.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_Concrete_07.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItem AASHTO_Concrete_07()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO Concrete 07")

'set preference item


ret =
SapModel.DesignConcrete.AASHTO_Concrete_07.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.1.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2012.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemAASHTO_Concrete_LRFD_2012()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2012")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2012.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2012.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItem AASHTO_LRFD_2012()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2012")

'get preference item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2012.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2012.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItem AASHTO_LRFD_2012 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2012")

'set overwrite item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2012.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2012.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItem AASHTO_LRFD_2012()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2012")

'set preference item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2012.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2014.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemAASHTO_Concrete_LRFD_2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2014")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2014.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2014.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItem AASHTO_LRFD_2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2014")

'get preference item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2014.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2014.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 11, inclusive, indicating the overwrite item
considered.
1 = Live load reduction factor
2 = Unbraced length ratio, Major
3 = Unbraced length ratio, Minor
4 = Effective length factor, K Major
5 = Effective length factor, K Minor
6 = Moment coefficient, Cm Major
7 = Moment coefficient, Cm Minor
8 = Nonsway moment factor, Db Major
9 = Nonsway moment factor, Db Minor
10 = Sway moment factor, Ds Major
11 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Live load reduction factor
Value >= 0; 0 means use program determined value.

2 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

4 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

6 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
8 = Nonsway moment factor, Db Major
Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

10 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItem AASHTO_LRFD_2014 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2014")

'set overwrite item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2014.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.AASHTO_LRFD_2014.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 7, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Seismic Zone
5= Pattern live load factor
6= Utilization factor limit
7= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic Zone
0 = Zone 0
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Pattern live load factor


Value >= 0

6 = Utilization factor limit


Value > 0

7 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItem AASHTO_LRFD_2014()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AASHTO LRFD 2014")

'set preference item


ret =
SapModel.DesignConcrete.AASHTO_LRFD_2014.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 17.3.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI318_08_IBC2009.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Nonsway moment factor, Dns Major
10 = Nonsway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemACI318_08_IBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-08/IBC2009")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.ACI318_08_IBC2009.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI318_08_IBC2009.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0

9 = Phi shear seismic


Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by step
3= Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemACI318_08_IBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-08/IBC2009")

'get preference item


ret =
SapModel.DesignConcrete.ACI318_08_IBC2009.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI318_08_IBC2009.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemACI318_08_IBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-08/IBC2009")

'set overwrite item


ret =
SapModel.DesignConcrete.ACI318_08_IBC2009.SetOverwrite("8", 1, 4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI318_08_IBC2009.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0

9 = Phi shear seismic


Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by step
3= Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemACI318_08_IBC2009()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-08/IBC2009")

'set preference item


ret =
SapModel.DesignConcrete.ACI318_08_IBC2009.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.2.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_09.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, km Major
8 = Moment coefficient, km Minor
9 = Nonsway moment factor, Db Major
10 = Nonsway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, km Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, km Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True then the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemAS_3600_09()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-09")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.AS_3600_09.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_09.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi tension controlled
5 = Phi compression controlled
6 = Phi shear and/or torsion
7 = Phi shear seismic
8 = Phi joint shear
9 = Pattern live load factor
10 = Utilization factor limit
11 = Multi-response case design

Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi tension controlled


Value > 0

5 = Phi compression controlled


Value > 0

6 = Phi shear and/or torsion


Value > 0

7 = Phi shear seismic


Value > 0

8 = Phi joint shear


Value > 0

9 = Pattern live load factor


Value >= 0

10 = Utilization factor limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by step
3= Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemAS_3600_09()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-09")

'get preference item


ret = SapModel.DesignConcrete.AS_3600_09.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_09.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, km Major
8 = Moment coefficient, km Minor
9 = Nonsway moment factor, Db Major
10 = Nonsway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, km Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, km Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group specified
by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects and
the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a nonzero
value.
VBA Example
Sub SetConcreteDesignOverwriteItemAS_3600_09()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-09")

'set overwrite item


ret = SapModel.DesignConcrete.AS_3600_09.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_09.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi tension controlled
5 = Phi compression controlled
6 = Phi shear and/or torsion
7 = Phi shear seismic
8 = Phi joint shear
9 = Pattern live load factor
10 = Utilization factor limit
11 = Time history design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi tension controlled


Value > 0

5 = Phi compression controlled


Value > 0

6 = Phi shear and/or torsion


Value > 0

7 = Phi shear seismic


Value > 0

8 = Phi joint shear


Value > 0
9 = Pattern live load factor
Value >= 0

10 = Utilization factor limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by step
3= Last step
4 = Envelopes - All
5 = Step-by step - All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise, it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemAS_3600_09()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-00")

'set preference item


ret = SapModel.DesignConcrete.AS_3600_09.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.01.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.BS8110_97.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemBS8110_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 97")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.BS8110_97.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.BS8110_97.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and desvisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemBS8110_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 97")

'get preference item


ret = SapModel.DesignConcrete.BS8110_97.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.BS8110_97.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemBS8110_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 97")

'set overwrite item


ret = SapModel.DesignConcrete.BS8110_97.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete. BS8110_97.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemBS8110_97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 97")

'set preference item


ret = SapModel.DesignConcrete.BS8110_97.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2010.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 18, inclusive, indicating the overwrite item
considered.
1 = Seismic design grade
2 = Dual system SMF
3 = MMF
4 = SMF
5 = AFMF
6 = Column location
7 = Transfer beam of column
8 = Corner column seismic modification
9 = Beam gravity neg moment red factor
10 = Unbraced length ratio, Major
11 = Unbraced length ratio, Minor
12 = Effective length factor, K Major
13 = Effective length factor, K Minor
14 = Torsion modification factor
15 = Torsion design factor, Zeta
16 = Concrete cover for closed stirrup
17 = Effective length factor for gravity, K Major
18 = Effective length factor for gravity, K Minor
Value
The value of the considered overwrite item.
1 = Seismic design grade
0 = As specified in preferences
1 = Seismic Super I
2 = Seismic Class I
3 = Seismic Class II
4 = Seismic Class III
5 = Seismic Class IV
6 = NonSeismic

2 = Dual system SMF


Value >= 0; 0 means use program determined value.

3 = MMF
Value >= 0; 0 means use program determined value.
4 = SMF
Value >= 0; 0 means use program determined value.

5 = AFMF
Value >= 0; 0 means use program determined value.

6 = Column Location
1 = Center Column
2 = Side Column
3 = Corner Column
4 = End Column
5 = Individual Column

7 = Transfer beam or column


0 = Program Determined
1 = No
2 = Yes

8 = Corner column seismic modification


0 = Program Determined
1 = No
2 = Yes

9 = Beam gravity neg moment red factor


Value >= 0; 0 means use program determined value.

10 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

11 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

12 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

13 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

14 = Torsion modification factor


Value >= 0; 0 means use program determined value.

15 = Torsion design factor, Zeta


Value >= 0; 0 means use program determined value.

16 = Concrete cover for closed stirrup


Value >= 0; 0 means use program determined value.

17 = Effective length factor for gravity, K Major


Value >= 0; 0 means use program default value.
18 = Effective length factor for gravity, K Minor
Value >= 0; 0 means use program default value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Chinese 2010")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.Chinese_2010.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2010.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Importance factor gamma 0
4 = Column design procedure
5 = Seismic design grade
6 = Pattern live load factor
7 = Utilization factor limit
8 = Multi-response case design
9 = Structural system
10 = Is tall building?
11 = Seismic field type
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Importance factor gamma 0


Value > 0

4 = Column design procedure


1 = Appendix F
2 = Simplified

5 = Seismic design grade


1 = Super I
2 = Grade I
3 = Grade II
4 = Grade III
5 = Grade IV
6 = Nonseismic

6 = Pattern live load factor


Value >= 0
7 = Utilization factor limit
Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

9 = Structural system
1 = Frame only
2 = Shearwall only
3 = Frame-shearwall
4 = Braced frame only
5 = Frame-braced frame
10 = Is tall building?
0 = No
1 = Yes
11 = Seismic field type
1=I
2 = II
3 = III
4 = IV
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Chinese 2010")

'get preference item


ret = SapModel.DesignConcrete.Chinese_2010.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2010.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 18, inclusive, indicating the overwrite item
considered.
1 = Seismic design grade
2 = Dual system SMF
3 = MMF
4 = SMF
5 = AFMF
6 = Column location
7 = Transfer beam of column
8 = Corner column seismic modification
9 = Beam gravity neg moment red factor
10 = Unbraced length ratio, Major
11 = Unbraced length ratio, Minor
12 = Effective length factor, K Major
13 = Effective length factor, K Minor
14 = Torsion modification factor
15 = Torsion design factor, Zeta
16 = Concrete cover for closed stirrup
17 = Effective length factor for gravity, K Major
18 = Effective length factor for gravity, K Minor
Value
The value of the considered overwrite item.
1 = Seismic design grade
0 = As specified in preferences
1 = Seismic Super I
2 = Seismic Class I
3 = Seismic Class II
4 = Seismic Class III
5 = Seismic Class IV
6 = NonSeismic

2 = Dual system SMF


Value >= 0; 0 means use program determined value.

3 = MMF
Value >= 0; 0 means use program determined value.

4 = SMF
Value >= 0; 0 means use program determined value.

5 = AFMF
Value >= 0; 0 means use program determined value.

6 = Column Location
1 = Center Column
2 = Side Column
3 = Corner Column
4 = End Column
5 = Individual Column

7 = Transfer beam or column


0 = Program Determined
1 = No
2 = Yes

8 = Corner column seismic modification


0 = Program Determined
1 = No
2 = Yes

9 = Beam gravity neg moment red factor


Value >= 0; 0 means use program determined value.

10 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

11 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

12 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

13 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

14 = Torsion modification factor


Value >= 0; 0 means use program determined value.
15 = Torsion design factor, Zeta
Value >= 0; 0 means use program determined value.

16 = Concrete cover for closed stirrup


Value >= 0; 0 means use program determined value.
17 = Effective length factor for gravity, K Major
Value >= 0; 0 means use program default value.
18 = Effective length factor for gravity, K Minor
Value >= 0; 0 means use program default value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'createSap2000 object
Set SapObject= New Sap2000v16.SapObject

'startSap2000 application
SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create new concrete frame section property


ret= SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret= SapModel.DesignConcrete.SetCode("Chinese 2010")

'set overwrite item


ret= SapModel.DesignConcrete.Chinese_2010.SetOverwrite("8",
1, 2)

'closeSap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2010.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Importance factor gamma 0
4 = Column design procedure
5 = Seismic design grade
6 = Pattern live load factor
7 = Utilization factor limit
8 = Multi-response case design
9 = Structural system
10 = Is tall building?
11 = Seismic field type
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Importance factor gamma 0


Value > 0

4 = Column design procedure


1 = Appendix F
2 = Simplified

5 = Seismic design grade


1 = Super I
2 = Grade I
3 = Grade II
4 = Grade III
5 = Grade IV
6 = Nonseismic

6 = Pattern live load factor


Value >= 0
7 = Utilization factor limit
Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

9 = Structural system
1 = Frame only
2 = Shearwall only
3 = Frame-shearwall
4 = Braced frame only
5 = Frame-braced frame
10 = Is tall building?
0 = No
1 = Yes
11 = Seismic field type
1=I
2 = II
3 = III
4 = IV
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemChinese_2010()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Chinese 2010")

'set preference item


ret = SapModel.DesignConcrete.Chinese_2010.SetPreference(2,
9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.2.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_04.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Db Major
10 = Non-sway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
13 = Force modification factor, Rd
14 = Force modification factor, Ro
15 = Maximum aggregate size
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Moderate
3 = Conventional

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

13 = Force modification factor, Rd


Value >= 0; 0 means use program determined value.

14 = Force modification factor, Ro


Value >= 0; 0 means use program determined value.

15 = Maximum aggregate size


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemCSA_A23_3_04()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA A23.3-04")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.CSA_A23_3_04.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_04.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 8, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Phi steel
5= Phi concrete
6= Pattern live load factor
7= Utilization factor limit
8= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi steel
Value > 0

5 = Phi concrete
Value > 0

6 = Pattern live load factor


Value >= 0

7 = Utilization factor limit


Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemCSA_A23_3_04()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA A23.3-04")

'get preference item


ret = SapModel.DesignConcrete.CSA_A23_3_04.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_04.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Db Major
10 = Non-sway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
13 = Force modification factor, Rd
14 = Force modification factor, Ro
15 = Maximum aggregate size
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Moderate
3 = Conventional

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

13 = Force modification factor, Rd


Value >= 0; 0 means use program determined value.

14 = Force modification factor, Ro


Value >= 0; 0 means use program determined value.

15 = Maximum aggregate size


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemCSA_A23_3_04()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA A23.3-04")

'set overwrite item


ret = SapModel.DesignConcrete.CSA_A23_3_04.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_04.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 8, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Phi steel
5= Phi concrete
6= Pattern live load factor
7= Utilization factor limit
8= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi steel
Value > 0

5 = Phi concrete
Value > 0

6 = Pattern live load factor


Value >= 0

7 = Utilization factor limit


Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemCSA_A23_3_04()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA A23.3-04")

'set preference item


ret = SapModel.DesignConcrete.CSA_A23_3_04.SetPreference(2,
9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Eurocode_2_2004.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Nonsway moment factor, Dns Major
10 = Nonsway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor

Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemEurocode_2_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Eurocode 2-2004")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Eurocode_2_2004.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Eurocode_2_2004.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Country
2 = Combos equation
3 = Second order method
4 = Number of interaction curves
5 = Number of interaction points
6 = Consider minimum eccentricity
7 = Theta0
8 = Gamma steel
9 = Gamma concrete
10 = AlphaCC
11 = AlphaCT
12 = AlphaLCC
13 = AlphaLCT
14 = Pattern live load factor
15 = Utilization factor limit
16 = Multi-response case design
17 = Reliability Class
Value
The value of the considered preference item.
1 = Country
1 = CEN Default
2 = United Kingdom
3 = Slovenia
5 = Norway
6 = Singapore
7 = Sweden
8 = Finland
9 = Denmark
10 = Portugal
11 = Germany

2 = Combos equation
1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

3 = Second order method


1 = Nominal stiffness
2 = Nominal curvature
3 = None

4 = Number of interaction curves


Value >= 4 and divisible by 4

5 = Number of interaction points


Value >= 5 and odd

6 = Consider minimum eccentricity


0 = No
Any other value = Yes

7 = Theta0
Value > 0

8 = Gamma steel
Value > 0

9 = Gamma concrete
Value > 0

10 = AlphaCC
Value > 0

11 = AlphaCT
Value > 0

12 = AlphaLCC
Value > 0

13 = AlphaLCT
Value > 0

14 = Pattern live load factor


Value >= 0

15 = Utilization factor limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

17 = Reliability Class
1 = Class 1
2 = Class 2
3 = Class 3
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemEurocode_2_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Eurocode 2-2004")

'get preference item


ret =
SapModel.DesignConcrete.Eurocode_2_2004.GetPreference(5, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Added Norway as a Country parameter in version 14.1.0.
Added Reliability Class parameter and added Sweden, Finland, and Denmark as
Country parameters in version 14.2.2.
Added Portugal and Germany as Country parameters in SAP2000 Version
15.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Eurocode_2_2004.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Nonsway moment factor, Dns Major
10 = Nonsway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor

Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemEurocode_2_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)'create model from template
ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Eurocode 2-2004")

'set overwrite item


ret =
SapModel.DesignConcrete.Eurocode_2_2004.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.Eurocode_2_2004.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 16, inclusive, indicating the preference item
considered.
1 = Country
2 = Combos equation
3 = Second order method
4 = Number of interaction curves
5 = Number of interaction points
6 = Consider minimum eccentricity
7 = Theta0
8 = Gamma steel
9 = Gamma concrete
10 = AlphaCC
11 = AlphaCT
12 = AlphaLCC
13 = AlphaLCT
14 = Pattern live load factor
15 = Utilization factor limit
16 = Multi-response case design
17 = Reliability Class
Value
The value of the considered preference item.
1 = Country
1 = CEN Default
2 = United Kingdom
3 = Slovenia
5 = Norway
6 = Singapore
7 = Sweden
8 = Finland
9 = Denmark
10 = Portugal
11 = Germany

2 = Combos equation
1 = Eq. 6.10
2 = Max of Eqs. 6.10a and 6.10b

3 = Second order method


1 = Nominal stiffness
2 = Nominal curvature
3 = None

4 = Number of interaction curves


Value >= 4 and divisible by 4

5 = Number of interaction points


Value >= 5 and odd

6 = Consider minimum eccentricity


0 = No
Any other value = Yes

7 = Theta0
Value > 0

8 = Gamma steel
Value > 0

9 = Gamma concrete
Value > 0

10 = AlphaCC
Value > 0

11 = AlphaCT
Value > 0

12 = AlphaLCC
Value > 0

13 = AlphaLCT
Value > 0

14 = Pattern live load factor


Value >= 0

15 = Utilization factor limit


Value > 0

16 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

17 = Reliability Class
1 = Class 1
2 = Class 2
3 = Class 3
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise, it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemEurocode_2_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True,"R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Eurocode 2-2004")

'set preference item


ret =
SapModel.DesignConcrete.Eurocode_2_2004.SetPreference(5, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Added Norway as a Country parameter in version 14.1.0.
Added Reliability Class parameter and added Sweden, Finland, and Denmark as
Country parameters in version 14.2.2.
Added Portugal and Germany as Country parameters in SAP2000 Version
15.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2013.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemHong_Kong_CP_2013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2013")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2013.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2013.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemHong_Kong_CP_2013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2013")

'get preference item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2013.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2013.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemHong_Kong_CP_2013()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2013")

'set overwrite item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2013.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2013.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemHong_Kong_CP_2013)
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2013")

'set preference item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2013.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Indian_IS_456_2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 16, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
13 = Top rebar area of a beam at the left end (I-end)
14 = Bottom rebar area of a beam at the left end (I-end)
15 = Top rebar area of a beam at the right end (J-end)
16 = Bottom rebar area of a beam at the right end (J-end)
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Ordinary
3 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

13 = Top rebar area of a beam at the left end (I-end)


Value >= 0; 0 means use program determined value.
14 = Bottom rebar area of a beam at the left end (I-end)
Value >= 0; 0 means use program determined value.
15 = Top rebar area of a beam at the right end (J-end)
Value >= 0; 0 means use program determined value.
16 = Bottom rebar area of a beam at the right end (J-end)
Value >= 0; 0 means use program determined value.

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemIndian_IS_456_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Indian IS 456-2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Indian_IS_456_2000.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 13, 14, 15, and 16 in Version 14.0.0.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Indian_IS_456_2003.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 8, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Pattern live load factor
7= Utilization factor limit
8= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Pattern live load factor


Value >= 0

7 = Utilization factor limit


Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemIndian_IS_456_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Indian IS 456-2000")

'get preference item


ret =
SapModel.DesignConcrete.Indian_IS_456_2000.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Indian_IS_456_2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
13 = Top rebar area of a beam at the left end (I-end)
14 = Bottom rebar area of a beam at the left end (I-end)
15 = Top rebar area of a beam at the right end (J-end)
16 = Bottom rebar area of a beam at the right end (J-end)
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Ordinary
3 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.
5 = Effective length factor, K Major
Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
13 = Top rebar area of a beam at the left end (I-end)
Value >= 0; 0 means use program determined value.
14 = Bottom rebar area of a beam at the left end (I-end)
Value >= 0; 0 means use program determined value.
15 = Top rebar area of a beam at the right end (J-end)
Value >= 0; 0 means use program determined value.
16 = Bottom rebar area of a beam at the right end (J-end)
Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group,the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemIndian_IS_456_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Indian IS 456-2000")

'set overwrite item


ret =
SapModel.DesignConcrete.Indian_IS_456_2000.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 13, 14, 15, and 16 in Version 14.0.0.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.Indian_IS_456_2003.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 8, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Pattern live load factor
7= Utilization factor limit
8= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Pattern live load factor


Value >= 0

7 = Utilization factor limit


Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemIndian_IS_456_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Indian IS 456-2000")

'set preference item


ret =
SapModel.DesignConcrete.Indian_IS_456_2000.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.KCI_1999.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemKCI_1999()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("KCI-1999")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.KCI_1999.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.KCI_1999.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending tension
5 = Phi compression controlled tied
6 = Phi compression controlled spiral
7 = Phi shear
8 = Pattern live load factor
9 = Utilization factor limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending tension


Value > 0

5 = Phi compression controlled tied


Value > 0

6 = Phi compression controlled spiral


Value > 0

7 = Phi shear
Value > 0

8 = Pattern live load factor


Value >= 0
9 = Utilization factor limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemKCI_1999()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("KCI-1999")

'get preference item


ret = SapModel.DesignConcrete.KCI_1999.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.KCI_1999.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemKCI_1999 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("KCI-1999")

'set overwrite item


ret = SapModel.DesignConcrete.KCI_1999.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.KCI_1999.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending tension
5 = Phi compression controlled tied
6 = Phi compression controlled spiral
7 = Phi shear
8 = Pattern live load factor
9 = Utilization factor limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending tension


Value > 0

5 = Phi compression controlled tied


Value > 0

6 = Phi compression controlled spiral


Value > 0

7 = Phi shear
Value > 0

8 = Pattern live load factor


Value >= 0
9 = Utilization factor limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemKCI_1999()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("KCI-1999")

'set preference item


ret = SapModel.DesignConcrete.KCI_1999.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Singapore_CP_65_99.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemSingapore_CP_65_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Singapore CP 65:99")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Singapore_CP_65_99.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Singapore_CP_65_99.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemSingapore_CP_65_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Singapore CP 65:99")

'get preference item


ret =
SapModel.DesignConcrete.Singapore_CP_65_99.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Singaopre_CP_65_99.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemSingapore_CP_65_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Singapore CP 65:99")

'set overwrite item


ret =
SapModel.DesignConcrete.Singapore_CP_65_99.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.Singapore_CP_65_99.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemSingapore_CP_65_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Singapore CP 65:99")

'set preference item


ret =
SapModel.DesignConcrete.Singapore_CP_65_99.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
GetOverwrite
SapObject.SapModel.DesignConcrete.TS_500_2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, k Major
6 = Effective length factor, k Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Bns Major
10 = Non-sway moment factor, Bns Minor
11 = Sway moment factor, Bs Major
12 = Sway moment factor, Bs Minor

Value
The value of the considered preference item.
1 = Framing type
0 = Program Default
1 = High Ductile
2 = Nominal Ductile
3 = Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value

5 = Effective length factor, k Major


Value >= 0; 0 means use program determined value

6 = Effective length factor, k Minor


Value >= 0; 0 means use program determined value

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value

9 = Non-sway moment factor, Bns Major


Value >= 0; 0 means use program determined value

10 = Non-sway moment factor, Bns Minor


Value >= 0; 0 means use program determined value

11 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value

12 = Sway moment factor, Bs Minor


Value >= 0; 0 means use program determined value
ProgDet
If this Item is true, the specified value is program determined.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemTS_500_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("TS 500-2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.TS_500_2000.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetOverwrite
GetPreference
SapObject.SapModel.DesignConcrete.TS_500_2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 10, inclusive, indicating the overwrite item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider maximum eccentricity
4 = Seismic zone
5 = Gamma steel
6 = Gamma concrete
7 = Gamma concrete shear
8 = Pattern live load factor
9 = Utilization factor limit
10 = Multi-response case design

Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider maximum eccentricity


0 = No
Any other value = Yes

4 = Seismic zone
1 = Zone 1
2 = Zone 2
3 = Zone 3
4 = Zone 4

5 = Gamma steel
Value > 0

6 = Gamma concrete
Value > 0
7 = Gamma concrete shear
Value > 0

8 = Pattern live load factor


Value >= 0

9 = Utilization factor limit


Value >= 0.

10 = Multi-response case design


1 = Envelopes
2 = Step-by-Step
3 = Last Step
4 = Envelopes -- All
5 = Step-by-Step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemTS_500_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("TS 500-2000")

'get preference item


ret = SapModel.DesignConcrete.TS_500_2000.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
SetPreference
SetOverwrite
SapObject.SapModel.DesignConcrete.TS_500_2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, k Major
6 = Effective length factor, k Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Bns Major
10 = Non-sway moment factor, Bns Minor
11 = Sway moment factor, Bs Major
12 = Sway moment factor, Bs Minor

Value
The value of the considered preference item.
1 = Framing type
0 = Program Default
1 = High Ductile
2 = Nominal Ductile
3 = Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value

5 = Effective length factor, k Major


Value >= 0; 0 means use program determined value
6 = Effective length factor, k Minor
Value >= 0; 0 means use program determined value

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value

9 = Non-sway moment factor, Bns Major


Value >= 0; 0 means use program determined value

10 = Non-sway moment factor, Bns Minor


Value >= 0; 0 means use program determined value

11 = Sway moment factor, Bs Major


Value >= 0; 0 means use program determined value

12 = Sway moment factor, Bs Minor


Value >= 0; 0 means use program determined value
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
Selected Objects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemTS_500_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("TS 500-2000")

'set overwrite item


ret = SapModel.DesignConcrete.TS_500_2000.SetOverwrite(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 19.0.0.
See Also
GetOverwrite
DeleteResults
Syntax
SapObject.SapModel.DesignAluminum.DeleteResults
VB6 Procedure
Function DeleteResults() As Long
Parameters
None
Remarks
This function deletes all aluminum frame design results.
The function returns zero if the results are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteAluminumDesignResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'delete aluminum design results


ret = SapModel.DesignAluminum.DeleteResults

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
Syntax
SapObject.SapModel.DesignAluminum.GetCode
VB6 Procedure
Function GetCode(ByRef CodeName As String) As Long
Parameters
CodeName
This is one of the following aluminum design code names.
AA-ASD 2000
AA-LRFD 2000
Remarks
This function retrieves the aluminum design code.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim CodeName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'get aluminum design code


ret = SapModel.DesignAluminum.GetCode(CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
GetComboAutoGenerate
Syntax
SapObject.SapModel.DesignAluminum.GetComboAutoGenerate
VB6 Procedure
Function SetComboAutoGenerate(ByRef AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for aluminum frame design is turned on. If it is False, the option is
turned off.
Remarks
This function retrieves the value of the automatically generated code-based
design load combinations option for aluminum frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub GetAluminumDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoGenerate As Boolean
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set option to not auto generate code-based design load


combinations
ret =
SapModel.DesignAluminum.GetComboAutoGenerate(AutoGenerate)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetComboAutoGenerate
GetComboDeflection
Syntax
SapObject.SapModel.DesignAluminum.GetComboDeflection
VB6 Procedure
Function GetComboDeflection(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for aluminum
deflection design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for aluminum deflection design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for aluminum deflection design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default aluminum design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, True, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for aluminum deflection design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignAluminum.SetComboDeflection(MyName2(i), Selected)
Next i

'get combos selected for aluminum deflection design


ret =
SapModel.DesignAluminum.GetComboDeflection(NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboDeflection
GetComboStrength
Syntax
SapObject.SapModel.DesignAluminum.GetComboStrength
VB6 Procedure
Function GetComboStrength(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for aluminum
strength design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for aluminum strength design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for aluminum strength design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default aluminum design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, True, False)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for aluminum strength design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignAluminum.SetComboStrength(MyName2(i), Selected)
Next i

'get combos selected for aluminum strength design


ret = SapModel.DesignAluminum.GetComboStrength(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboStrength
GetDesignSection
Syntax
SapObject.SapModel.DesignAluminum.GetDesignSection
VB6 Procedure
Function GetDesignSection(ByVal Name As String, ByRef PropName As String)
As Long
Parameters
Name
The name of a frame object with a aluminum frame design procedure.
PropName
The name of the design section for the specified frame object.
Remarks
This function retrieves the design section for a specified aluminum frame object.
The function returns zero if the section is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'get design section


ret = SapModel.DesignAluminum.GetDesignSection("8",
PropName)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDesignSection
GetGroup
Syntax
SapObject.SapModel.DesignAluminum.GetGroup
VB6 Procedure
Function GetGroup(ByRef NumberItems As Long, ByRef MyName() As String)
As Long
Parameters
NumberItems
The number of groups selected for aluminum design.
MyName
This is an array that includes the name of each group selected for aluminum
design.
Remarks
This function retrieves the names of all groups selected for aluminum design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'select group for aluminum design


ret = SapModel.DesignAluminum.SetGroup("ALL", True)

'get groups selected for aluminum design


ret = SapModel.DesignAluminum.GetGroup(NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetGroup
GetResultsAvailable {Aluminum}
Syntax
SapObject.SapModel.DesignAluminum.GetResultsAvailable
VB6 Procedure
Function GetResultsAvailable() As Boolean
Parameters
None
Remarks
The function returns True if the aluminum frame design results are available,
otherwise False.
VBA Example
Sub GetResultsAvailable()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ResultsAvailable As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum formed material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_ALUMINUM,
, , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6, 0.5,
0.3, 6, 0.5 )

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'check if design results are available


ResultsAvailable = SapModel.DesignAluminum.GetResultsAvailable

'close Sap2000
SapObject.ApplicationExit.False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
GetSummaryResults
Syntax
SapObject.SapModel.DesignAluminum.GetSummaryResults
VB6 Procedure
Function GetSummaryResults(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef Ratio() As Double, ByRef
RatioType() As Long, ByRef Location() As Double, ByRef ComboName() As
String, ByRef ErrorSummary() As String, ByRef WarningSummary() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
Ratio
This is an array that includes the controlling stress or capacity ratio for each
frame object.
RatioType
This is an array that includes 1, 3 or 4, indicating the controlling stress or
capacity ratio type for each frame object.
1 = PMM
3 = Major shear
4 = Minor shear
Location
This is an array that includes the distance from the I-end of the frame object to
the location where the controlling stress or capacity ratio occurs. [L]
ComboName
This is an array that includes the name of the design combination for which the
controlling stress or capacity ratio occurs.
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for aluminum design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim FrameName() As String
Dim Ratio() As Double
Dim RatioType() As Long
Dim Location() As Double
Dim ComboName() As String
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis
'start aluminum design
ret = SapModel.DesignAluminum.StartDesign

'get summary result data


ret = SapModel.DesignAluminum.GetSummaryResults("8",
NumberItems, FrameName, Ratio, RatioType, Location, ComboName,
ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
ResetOverwrites
Syntax
SapObject.SapModel.DesignAluminum.ResetOverwrites
VB6 Procedure
Function ResetOverwrites() As Long
Parameters
None
Remarks
This function resets all aluminum frame design overwrites to default values.
The function returns zero if the overwrites are successfully reset; otherwise it
returns a nonzero value.
The function will fail if no aluminum frame objects are present.
VBA Example
Sub ResetAluminumDesignOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'reset aluminum design overwrites


ret = SapModel.DesignAluminum.ResetOverwrites

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetAutoSelectNull
Syntax
SapObject.SapModel.DesignAluminum.SetAutoSelectNull
VB6 Procedure
Function SetAutoSelectNull(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function removes the auto select section assignments from all specified
frame objects that have a aluminum frame design procedure.
The function returns zero if the auto select section assignments are
successfully removed; otherwise it returns a nonzero value.
VBA Example
Sub SetAluminumAutoSelectSectionsNull()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section properties


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("AI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("AI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "AI"
MyName(1) = "AI2"
MyName(2) = "AI3"
ret = SapModel.PropFrame.SetAutoSelectAluminum("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'set frame object selected


ret = SapModel.FrameObj.SetSelected("8", True)

'set auto select section null


ret =
SapModel.DesignAluminum.SetAutoSelectNull("",SelectedObjects)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
Syntax
SapObject.SapModel.DesignAluminum.SetCode
VB6 Procedure
Function SetCode(ByVal CodeName As String) As Long
Parameters
CodeName
This is one of the following aluminum design code names.
AA-ASD 2000
AA-LRFD 2000
Remarks
This function sets the aluminum design code.
The function returns zero if the code is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetAluminumDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-LRFD 2000")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
SetComboAutoGenerate
Syntax
SapObject.SapModel.DesignAluminum.SetComboAutoGenerate
VB6 Procedure
Function SetComboAutoGenerate(ByVal AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for aluminum frame design is turned on. If it is False, the option is
turned off.
Remarks
This function turns on or off the option to automatically generate code-based
design load combinations for aluminum frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetAluminumDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set option to not auto generate code-based design load


combinations
ret = SapModel.DesignAluminum.SetComboAutoGenerate(False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetComboAutoGenerate
SetComboDeflection
Syntax
SapObject.SapModel.DesignAluminum.SetComboDeflection
VB6 Procedure
Function SetComboDeflection(ByVal Name As String, ByVal Selected As
Boolean) As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for aluminum deflection design. If it is False, the combination is not
selected for aluminum deflection design.
Remarks
This function selects or deselects a load combination for aluminum deflection
design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetAluminumDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default aluminum design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, True, False)
'get combo names
ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for aluminum deflection design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignAluminum.SetComboDeflection(MyName(i), Selected)
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboDeflection
SetComboStrength
Syntax
SapObject.SapModel.DesignAluminum.SetComboStrength
VB6 Procedure
Function SetComboStrength(ByVal Name As String, ByVal Selected As Boolean)
As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for aluminum strength design. If it is False, the combination is not
selected for aluminum strength design.
Remarks
This function selects or deselects a load combination for aluminum strength
design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetAluminumDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default aluminum design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, True, False)
'get combo names
ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for aluminum strength design


For i = 0 To NumberNames - 1
If i = 0 Then Selected = True Else Selected = False
ret = SapModel.DesignAluminum.SetComboStrength(MyName(i),
Selected)
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboStrength
SetDesignSection
Syntax
SapObject.SapModel.DesignAluminum.SetDesignSection
VB6 Procedure
Function SetDesignSection(ByVal Name As String, ByVal PropName As String,
ByVal LastAnalysis As Boolean, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
The name of an existing frame section property to be used as the design section
for the specified frame objects. This item applies only when LastAnalysis =
False.
LastAnalysis
If this item is True, the design section for the specified frame objects is reset to
the last analysis section for the frame object. If it is False, the design section is
set to that specified by PropName.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects, and the Name item is ignored.
Remarks
This function modifies the design section for all specified frame objects that
have a aluminum frame design procedure.
The function returns zero if the design section is successfully modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetAluminumDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section properties


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)
ret = SapModel.PropFrame.SetISection("AI2", Name , 18, 6,
0.6, 0.3, 6, 0.6)
ret = SapModel.PropFrame.SetISection("AI3", Name , 18, 6,
0.7, 0.3, 6, 0.7)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "AI"
MyName(1) = "AI2"
MyName(2) = "AI3"
ret = SapModel.PropFrame.SetAutoSelectAluminum("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'set design section


ret = SapModel.DesignAluminum.SetDesignSection("8", "AI3",
False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDesignSection
SetGroup
Syntax
SapObject.SapModel.DesignAluminum.SetGroup
VB6 Procedure
Function SetGroup(ByVal Name As String, ByVal Selected As Boolean) As Long
Parameters
Name
The name of an existing group.
Selected
If this item is True, the specified group is selected as a design group for
aluminum design. If it is False, the group is not selected for aluminum design.
Remarks
This function selects or deselects a group for aluminum design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetAluminumDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'select group for aluminum design


ret = SapModel.DesignAluminum.SetGroup("ALL", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetGroup
StartDesign
Syntax
SapObject.SapModel.DesignAluminum.StartDesign
VB6 Procedure
Function StartDesign() As Long
Parameters
None
Remarks
This function starts the aluminum frame design.
The function returns zero if the aluminum frame design is successfully started;
otherwise it returns a nonzero value.
The function will fail if no aluminum frame objects are present. It will also fail if
analysis results are not available.
VBA Example
Sub StartAluminumDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifyPassed
Syntax
SapObject.SapModel.DesignAluminum.VerifyPassed
VB6 Procedure
Function VerifyPassed(ByRef NumberItems As Long, ByRef n1 As Long, ByRef
n2 As Long, ByRef MyName() As String) As Long
Parameters
NumberItems
The number of aluminum frame objects that did not pass the design check or
have not yet been checked.
n1
The number of aluminum frame objects that did not pass the design check.
n2
The number of aluminum frame objects that have not yet been checked.
MyName
This is an array that includes the name of each frame object that did not pass
the design check or has not yet been checked.
Remarks
This function retrieves the names of the frame objects that did not pass the
design check or have not yet been checked, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyAluminumDesignPassed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim n1 As Long
Dim n2 As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign
'verify frame objects successfully designed
ret = SapModel.DesignAluminum.VerifyPassed(NumberItems, n1,
n2, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifySections
Syntax
SapObject.SapModel.DesignAluminum.VerifySections
VB6 Procedure
Function VerifySections(ByRef NumberItems As Long, ByRef MyName() As
String) As Long
Parameters
NumberItems
The number of frame objects that have different analysis and design sections.
MyName
This is an array that includes the name of each frame object that has different
analysis and design sections.
Remarks
This function retrieves the names of the frame objects that have different
analysis and design sections, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyAluminumDesignSections()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign

'verify analysis versus design section


ret = SapModel.DesignAluminum.VerifySections(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
Syntax
SapObject.SapModel.DesignAluminum.AA_ASD_2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a aluminum frame design procedure.
Item
This is an integer between 1 and 23, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Bending coefficient, Cb
10 = Buckling constant for compression, k1
11 = Buckling constant for compression, k2
12 = Buckling constant for bending, k1
13 = Buckling constant for bending, k2
14 = Safety coefficient, kt
15 = Bending coefficient, C1
16 = Bending coefficient, C2
17 = Yield stress, Fy
18 = Compressive stress, Fa
19 = Tensile stress, Ft
20 = Major bending stress, Fb3
21 = Minor bending stress, Fb2
22 = Major shear stress, Fs2
23 = Minor shear stress, Fs3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Live load reduction factor


Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

10 = Buckling constant for compression, k1


Value >= 0; 0 means use program determined value.

11 = Buckling constant for compression, k2


Value >= 0; 0 means use program determined value.

12 = Buckling constant for bending, k1


Value >= 0; 0 means use program determined value.

13 = Buckling constant for bending, k2


Value >= 0; 0 means use program determined value.

14 = Safety coefficient, kt
Value >= 0; 0 means use program determined value.

15 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

16 = Bending coefficient, C2
Value >= 0; 0 means use program determined value.

17 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]
18 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

19 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

20 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

21 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

22 = Major shear stress, Fs2


Value >= 0; 0 means use program determined value. [F/L2]

23 = Minor shear stress, Fs3


Value >= 0; 0 means use program determined value. [F/L2]
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of an aluminum design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignOverwriteItemAA_ASD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-ASD 2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign
'get overwrite item
ret = SapModel.DesignAluminum.AA_ASD_2000.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignAluminum.AA_ASD_2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 6, inclusive, indicating the preference item
considered.
1= Framing type
2= Demand/capacity ratio limit
3= Lateral factor
4= Use lateral factor
5= Bridge type structure
6= Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Lateral factor
Value > 0

4 = Use lateral factor


0 = No
Any other value = Yes

5 = Bridge type structure


0 = No
Any other value = Yes

6 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function retrieves the value of an aluminum design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignPreferenceItemAA_ASD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-ASD 2000")

'get preference item


ret = SapModel.DesignAluminum.AA_ASD_2000.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignAluminum.AA_ASD_2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 23, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Bending coefficient, Cb
10 = Buckling constant for compression, k1
11 = Buckling constant for compression, k2
12 = Buckling constant for bending, k1
13 = Buckling constant for bending, k2
14 = Safety coefficient, kt
15 = Bending coefficient, C1
16 = Bending coefficient, C2
17 = Yield stress, Fy
18 = Compressive stress, Fa
19 = Tensile stress, Ft
20 = Major bending stress, Fb3
21 = Minor bending stress, Fb2
22 = Major shear stress, Fs2
23 = Minor shear stress, Fs3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Live load reduction factor


Value >= 0; 0 means use a program determined value.
3 = Unbraced length ratio, Major
Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

10 = Buckling constant for compression, k1


Value >= 0; 0 means use program determined value.

11 = Buckling constant for compression, k2


Value >= 0; 0 means use program determined value.

12 = Buckling constant for bending, k1


Value >= 0; 0 means use program determined value.

13 = Buckling constant for bending, k2


Value >= 0; 0 means use program determined value.

14 = Safety coefficient, kt
Value >= 0; 0 means use program determined value.

15 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

16 = Bending coefficient, C2
Value >= 0; 0 means use program determined value.

17 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

18 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

19 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

20 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

21 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

22 = Major shear stress, Fs2


Value >= 0; 0 means use program determined value. [F/L2]

23 = Minor shear stress, Fs3


Value >= 0; 0 means use program determined value. [F/L2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of an aluminum design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetAluminumDesignOverwriteItemAA_ASD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-ASD 2000")

'set overwrite item


ret = SapModel.DesignAluminum.AA_ASD_2000.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignAluminum.AA_ASD_2000.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 6, inclusive, indicating the preference item
considered.
1= Framing type
2= Demand/capacity ratio limit
3= Lateral factor
4= Use lateral factor
5= Bridge type structure
6= Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Lateral factor
Value > 0

4 = Use lateral factor


0 = No
Any other value = Yes

5 = Bridge type structure


0 = No
Any other value = Yes

6 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function sets the value of an aluminum design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetAluminumDesignPreferenceItemAA_ASD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-ASD 2000")

'set preference item


ret = SapModel.DesignAluminum.AA_ASD_2000.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignAluminum.AA_LRFD_2000.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a aluminum frame design procedure.
Item
This is an integer between 1 and 23, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Bending coefficient, Cb
10 = Buckling constant for compression, k1
11 = Buckling constant for compression, k2
12 = Buckling constant for bending, k1
13 = Buckling constant for bending, k2
14 = Safety coefficient, kt
15 = Bending coefficient, C1
16 = Bending coefficient, C2
17 = Yield stress, Fy
18 = Compressive stress, Fa
19 = Tensile stress, Ft
20 = Major bending stress, Fb3
21 = Minor bending stress, Fb2
22 = Major shear stress, Fs2
23 = Minor shear stress, Fs3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Live load reduction factor


Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

10 = Buckling constant for compression, k1


Value >= 0; 0 means use program determined value.

11 = Buckling constant for compression, k2


Value >= 0; 0 means use program determined value.

12 = Buckling constant for bending, k1


Value >= 0; 0 means use program determined value.

13 = Buckling constant for bending, k2


Value >= 0; 0 means use program determined value.

14 = Safety coefficient, kt
Value >= 0; 0 means use program determined value.

15 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

16 = Bending coefficient, C2
Value >= 0; 0 means use program determined value.

17 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]
18 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

19 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

20 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

21 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

22 = Major shear stress, Fs2


Value >= 0; 0 means use program determined value. [F/L2]

23 = Minor shear stress, Fs3


Value >= 0; 0 means use program determined value. [F/L2]
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of an aluminum design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignOverwriteItemAA_LRFD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-LRFD 2000")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start aluminum design


ret = SapModel.DesignAluminum.StartDesign
'get overwrite item
ret = SapModel.DesignAluminum.AA_LRFD_2000.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignAluminum.AA_LRFD_2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 6, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Phiy resistance factor
4 = Phib resistance factor
5 = Phic resistance factor
6 = Phiu resistance factor
7 = Phicc resistance factor
8 = Phicp resistance factor
9 = Phiv resistance factor
10 = Phivp resistance factor
11 = Phiw resistance factor
12 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Phiy resistance factor


Value > 0

4 = Phib resistance factor


Value > 0

5 = Phic resistance factor


Value > 0

6 = Phiu resistance factor


Value > 0

7 = Phicc resistance factor


Value > 0

8 = Phicp resistance factor


Value > 0

9 = Phiv resistance factor


Value > 0

10 = Phivp resistance factor


Value > 0

11 = Phiw resistance factor


Value > 0

12 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function retrieves the value of an aluminum design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetAluminumDesignPreferenceItemAA_LRFD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-LRFD 2000")

'get preference item


ret = SapModel.DesignAluminum.AA_LRFD_2000.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignAluminum.AA_LRFD_2000.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 23, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Bending coefficient, Cb
10 = Buckling constant for compression, k1
11 = Buckling constant for compression, k2
12 = Buckling constant for bending, k1
13 = Buckling constant for bending, k2
14 = Safety coefficient, kt
15 = Bending coefficient, C1
16 = Bending coefficient, C2
17 = Yield stress, Fy
18 = Compressive stress, Fa
19 = Tensile stress, Ft
20 = Major bending stress, Fb3
21 = Minor bending stress, Fb2
22 = Major shear stress, Fs2
23 = Minor shear stress, Fs3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Live load reduction factor


Value >= 0; 0 means use a program determined value.
3 = Unbraced length ratio, Major
Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

10 = Buckling constant for compression, k1


Value >= 0; 0 means use program determined value.

11 = Buckling constant for compression, k2


Value >= 0; 0 means use program determined value.

12 = Buckling constant for bending, k1


Value >= 0; 0 means use program determined value.

13 = Buckling constant for bending, k2


Value >= 0; 0 means use program determined value.

14 = Safety coefficient, kt
Value >= 0; 0 means use program determined value.

15 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

16 = Bending coefficient, C2
Value >= 0; 0 means use program determined value.

17 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

18 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

19 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

20 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

21 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

22 = Major shear stress, Fs2


Value >= 0; 0 means use program determined value. [F/L2]

23 = Minor shear stress, Fs3


Value >= 0; 0 means use program determined value. [F/L2]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of an aluminum design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetAluminumDesignOverwriteItemAA_LRFD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-LRFD 2000")

'set overwrite item


ret = SapModel.DesignAluminum.AA_LRFD_2000.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignAluminum.AA_LRFD_2000.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 6, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Phiy resistance factor
4 = Phib resistance factor
5 = Phic resistance factor
6 = Phiu resistance factor
7 = Phicc resistance factor
8 = Phicp resistance factor
9 = Phiv resistance factor
10 = Phivp resistance factor
11 = Phiw resistance factor
12 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Phiy resistance factor


Value > 0

4 = Phib resistance factor


Value > 0

5 = Phic resistance factor


Value > 0

6 = Phiu resistance factor


Value > 0

7 = Phicc resistance factor


Value > 0

8 = Phicp resistance factor


Value > 0

9 = Phiv resistance factor


Value > 0

10 = Phivp resistance factor


Value > 0

11 = Phiw resistance factor


Value > 0

12 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function sets the value of an aluminum design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetAluminumDesignPreferenceItemAA_LRFD_2000()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add aluminum material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_ALUMINUM, , , MATERIAL_ALUMINUM_SUBTYPE_6061_T6)

'create new aluminum frame section property


ret = SapModel.PropFrame.SetISection("AI", Name , 18, 6,
0.5, 0.3, 6, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "AI", "AI")

'set aluminum design code


ret = SapModel.DesignAluminum.SetCode("AA-LRFD 2000")

'set preference item


ret = SapModel.DesignAluminum.AA_LRFD_2000.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetPreference
DeleteResults
Syntax
SapObject.SapModel.DesignColdFormed.DeleteResults
VB6 Procedure
Function DeleteResults() As Long
Parameters
None
Remarks
This function deletes all cold formed frame design results.
The function returns zero if the results are successfully deleted; otherwise it
returns a nonzero value.
VBA Example
Sub DeleteColdFormedDesignResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'delete cold formed design results


ret = SapModel.DesignColdFormed.DeleteResults
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
Syntax
SapObject.SapModel.DesignColdFormed.GetCode
VB6 Procedure
Function GetCode(ByRef CodeName As String) As Long
Parameters
CodeName
This is one of the following cold formed design code names.
AISI-ASD96
AISI-LRFD96
Remarks
This function retrieves the cold formed design code.
The function returns zero if the code is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim CodeName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'get cold formed design code


ret = SapModel.DesignColdFormed.GetCode(CodeName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
GetComboAutoGenerate
Syntax
SapObject.SapModel.DesignColdFormed.GetComboAutoGenerate
VB6 Procedure
Function GetComboAutoGenerate(ByRef AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for cold formed frame design is turned on. If it is False, the option
is turned off.
Remarks
This function retrieves the value of the automatically generated code-based
design load combinations option for cold formed frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub GetColdFormedDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim AutoGenerate As Boolean
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set option to not auto generate code-based design load


combinations
ret =
SapModel.DesignColdFormed.GetComboAutoGenerate(AutoGenerate)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
SetComboAutoGenerate
GetComboDeflection
Syntax
SapObject.SapModel.DesignColdFormed.GetComboDeflection
VB6 Procedure
Function GetComboDeflection(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for cold
formed deflection design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for cold formed deflection design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for cold formed deflection design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default cold formed design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, False, True)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for cold formed deflection design


For i = 0 To NumberNames 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignColdFormed.SetComboDeflection(MyName2(i), Selected)
Next i

'get combos selected for cold formed deflection design


ret =
SapModel.DesignColdFormed.GetComboDeflection(NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboDeflection
GetComboStrength
Syntax
SapObject.SapModel.DesignColdFormed.GetComboStrength
VB6 Procedure
Function GetComboStrength(ByRef NumberItems As Long, ByRef MyName()
As String) As Long
Parameters
NumberItems
The number of load combinations selected as design combinations for cold
formed strength design.
MyName
This is an array that includes the name of each response combination selected
as a design combination for cold formed strength design.
Remarks
This function retrieves the names of all load combinations selected as design
combinations for cold formed strength design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName2() As String
Dim Selected As Boolean
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default cold formed design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, False, True)

'get combo names


ret = SapModel.RespCombo.GetNameList(NumberNames, MyName2)

'select combos for cold formed strength design


For i = 0 To NumberNames 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignColdFormed.SetComboStrength(MyName2(i), Selected)
Next i

'get combos selected for cold formed strength design


ret =
SapModel.DesignColdFormed.GetComboStrength(NumberItems, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetComboStrength
GetDesignSection
Syntax
SapObject.SapModel.DesignColdFormed.GetDesignSection
VB6 Procedure
Function GetDesignSection(ByVal Name As String, ByRef PropName As String)
As Long
Parameters
Name
The name of a frame object with a cold formed frame design procedure.
PropName
The name of the design section for the specified frame object.
Remarks
This function retrieves the design section for a specified cold formed frame
object.
The function returns zero if the section is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim PropName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'get design section


ret = SapModel.DesignColdFormed.GetDesignSection("8",
PropName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDesignSection
GetGroup
Syntax
SapObject.SapModel.DesignColdFormed.GetGroup
VB6 Procedure
Function GetGroup(ByRef NumberItems As Long, ByRef MyName() As String)
As Long
Parameters
NumberItems
The number of groups selected for cold formed design.
MyName
This is an array that includes the name of each group selected for cold formed
design.
Remarks
This function retrieves the names of all groups selected for cold formed design.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'select group for cold formed design


ret = SapModel.DesignColdFormed.SetGroup("ALL", True)

'get groups selected for cold formed design


ret = SapModel.DesignColdFormed.GetGroup(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetGroup
GetResultsAvailable {Cold Formed}
Syntax
SapObject.SapModel.DesignColdFormed.GetResultsAvailable
VB6 Procedure
Function GetResultsAvailable() As Boolean
Parameters
None
Remarks
The function returns True if the cold formed frame design results are available,
otherwise False.
VBA Example
Sub GetResultsAvailable()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim ResultsAvailable As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new concrete frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name, 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'check if design results are available


ResultsAvailable =
SapModel.DesignColdFormed.GetResultsAvailable
'close Sap2000
SapObject.ApplicationExit.False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.2.0.
GetSummaryResults
Syntax
SapObject.SapModel.DesignColdFormed.GetSummaryResults
VB6 Procedure
Function GetSummaryResults(ByVal Name As String, ByRef NumberItems As
Long, ByRef FrameName() As String, ByRef Ratio() As Double, ByRef
RatioType() As Long, ByRef Location() As Double, ByRef ComboName() As
String, ByRef ErrorSummary() As String, ByRef WarningSummary() As String,
Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
NumberItems
The number of frame objects for which results are obtained.
FrameName
This is an array that includes each frame object name for which results are
obtained.
Ratio
This is an array that includes the controlling stress or capacity ratio for each
frame object.
RatioType
This is an array that includes 1, 3 or 4, indicating the controlling stress or
capacity ratio type for each frame object.
1 = PMM
3 = Major shear
4 = Minor shear
Location
This is an array that includes the distance from the I-end of the frame object to
the location where the controlling stress or capacity ratio occurs. [L]
ComboName
This is an array that includes the name of the design combination for which the
controlling stress or capacity ratio occurs.
ErrorSummary
This is an array that includes the design error messages for the frame object, if
any.
WarningSummary
This is an array that includes the design warning messages for the frame object,
if any.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the design results are retrieved for the frame object
specified by the Name item.
If this item is Group, the design results are retrieved for all frame objects in the
group specified by the Name item.
If this item is SelectedObjects, the design results are retrieved for all selected
frame objects, and the Name item is ignored.
Remarks
This function retrieves summary results for cold formed design.
The function returns zero if the results are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignSummaryResults()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim FrameName() As String
Dim Ratio() As Double
Dim RatioType() As Long
Dim Location() As Double
Dim ComboName() As String
Dim ErrorSummary() As String
Dim WarningSummary() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'get summary result data


ret = SapModel.DesignColdFormed.GetSummaryResults("8",
NumberItems, FrameName, Ratio, RatioType, Location, ComboName,
ErrorSummary, WarningSummary)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
ResetOverwrites
Syntax
SapObject.SapModel.DesignColdFormed.ResetOverwrites
VB6 Procedure
Function ResetOverwrites() As Long
Parameters
None
Remarks
This function resets all cold formed frame design overwrites to default values.
The function returns zero if the overwrites are successfully reset; otherwise it
returns a nonzero value.
The function will fail if no cold formed frame objects are present.
VBA Example
Sub ResetColdFormedDesignOverwrites()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'reset cold formed design overwrites


ret = SapModel.DesignColdFormed.ResetOverwrites

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetAutoSelectNull
Syntax
SapObject.SapModel.DesignColdFormed.SetAutoSelectNull
VB6 Procedure
Function SetAutoSelectNull(ByVal Name As String, Optional ByVal ItemType As
eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function removes the auto select section assignments from all specified
frame objects that have a cold formed frame design procedure.
The function returns zero if the auto select section assignments are
successfully removed; otherwise it returns a nonzero value.
VBA Example
Sub SetColdFormedAutoSelectSectionsNull()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)
ret = SapModel.PropFrame.SetColdC("CdC2", Name , 9, 3, 0.07,
0.25, 0.5)
ret = SapModel.PropFrame.SetColdC("CdC3", Name , 9, 3, 0.08,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "CdC"
MyName(1) = "CdC2"
MyName(2) = "CdC3"
ret = SapModel.PropFrame.SetAutoSelectColdFormed("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'set frame object selected


ret = SapModel.FrameObj.SetSelected("8", True)

'set auto select section null


ret =
SapModel.DesignColdFormed.SetAutoSelectNull("",SelectedObjects)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetCode
Syntax
SapObject.SapModel.DesignColdFormed.SetCode
VB6 Procedure
Function SetCode(ByVal CodeName As String) As Long
Parameters
CodeName
This is one of the following cold formed design code names.
AISI-ASD96
AISI-LRFD96
Remarks
This function sets the cold formed design code.
The function returns zero if the code is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetColdFormedDesignCode()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144)

'set cold formed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-LRFD96")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetCode
SetComboAutoGenerate
Syntax
SapObject.SapModel.DesignColdFormed.SetComboAutoGenerate
VB6 Procedure
Function SetComboAutoGenerate(ByVal AutoGenerate As Boolean) As Long
Parameters
AutoGenerate
If this item is True, the option to automatically generate code-based design load
combinations for cold formed frame design is turned on. If it is False, the option
is turned off.
Remarks
This function turns on or off the option to automatically generate code-based
design load combinations for cold formed frame design.
The function returns zero if the options are successfully set; otherwise it returns
a nonzero value.
VBA Example
Sub SetColdFormedDesignComboAutoGenerate()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
'create Sap2000 object
Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set option to not auto generate code-based design load


combinations
ret = SapModel.DesignColdFormed.SetComboAutoGenerate(False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 18.1.0.
See Also
GetComboAutoGenerate
SetComboDeflection
Syntax
SapObject.SapModel.DesignColdFormed.SetComboDeflection
VB6 Procedure
Function SetComboDeflection(ByVal Name As String, ByVal Selected As
Boolean) As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for cold formed deflection design. If it is False, the combination is
not selected for cold formed deflection design.
Remarks
This function selects or deselects a load combination for cold formed deflection
design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetColdFormedDesignComboDeflection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default cold formed design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, False, True)
'get combo names
ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for cold formed deflection design


For i = 0 To NumberNames 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignColdFormed.SetComboDeflection(MyName(i), Selected)
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboDeflection
SetComboStrength
Syntax
SapObject.SapModel.DesignColdFormed.SetComboStrength
VB6 Procedure
Function SetComboStrength(ByVal Name As String, ByVal Selected As Boolean)
As Long
Parameters
Name
The name of an existing load combination.
Selected
If this item is True, the specified load combination is selected as a design
combination for cold formed strength design. If it is False, the combination is not
selected for cold formed strength design.
Remarks
This function selects or deselects a load combination for cold formed strength
design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetColdFormedDesignComboStrength()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim i As Long
Dim NumberNames As Long
Dim MyName() As String
Dim Selected As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'add load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'add default cold formed design combos


ret = SapModel.RespCombo.AddDesignDefaultCombos(False,
False, False, True)
'get combo names
ret = SapModel.RespCombo.GetNameList(NumberNames, MyName)

'select combos for cold formed strength design


For i = 0 To NumberNames 1
If i = 0 Then Selected = True Else Selected = False
ret =
SapModel.DesignColdFormed.SetComboStrength(MyName(i), Selected)
Next i

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetComboStrength
SetDesignSection
Syntax
SapObject.SapModel.DesignColdFormed.SetDesignSection
VB6 Procedure
Function SetDesignSection(ByVal Name As String, ByVal PropName As String,
ByVal LastAnalysis As Boolean, Optional ByVal ItemType As eItemType =
Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
PropName
The name of an existing frame section property to be used as the design section
for the specified frame objects. This item applies only when LastAnalysis =
False.
LastAnalysis
If this item is True, the design section for the specified frame objects is reset to
the last analysis section for the frame object. If it is False, the design section is
set to that specified by PropName.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, the assignment is made to all selected frame
objects, and the Name item is ignored.
Remarks
This function modifies the design section for all specified frame objects that
have a cold formed frame design procedure.
The function returns zero if the design section is successfully modified;
otherwise it returns a nonzero value.
VBA Example
Sub SetColdFormedDesignSection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)
ret = SapModel.PropFrame.SetColdC("CdC2", Name , 9, 3, 0.07,
0.25, 0.5)
ret = SapModel.PropFrame.SetColdC("CdC3", Name , 9, 3, 0.08,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'define new auto select list frame section property


ReDim MyName(2)
MyName(0) = "CdC"
MyName(1) = "CdC2"
MyName(2) = "CdC3"
ret = SapModel.PropFrame.SetAutoSelectColdFormed("AUTO1", 3,
MyName)

'set frame section properties


ret = SapModel.FrameObj.SetSection("8", "AUTO1")
ret = SapModel.FrameObj.SetSection("10", "AUTO1")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'set design section


ret = SapModel.DesignColdFormed.SetDesignSection("8",
"CdC3", False)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDesignSection
SetGroup
Syntax
SapObject.SapModel.DesignColdFormed.SetGroup
VB6 Procedure
Function SetGroup(ByVal Name As String, ByVal Selected As Boolean) As Long
Parameters
Name
The name of an existing group.
Selected
If this item is True, the specified group is selected as a design group for cold
formed design. If it is False, the group is not selected for cold formed design.
Remarks
This function selects or deselects a group for cold formed design.
The function returns zero if the selection status is successfully set; otherwise it
returns a nonzero value.
VBA Example
Sub SetColdFormedDesignGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'select group for cold formed design


ret = SapModel.DesignColdFormed.SetGroup("ALL", True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetGroup
StartDesign
Syntax
SapObject.SapModel.DesignColdFormed.StartDesign
VB6 Procedure
Function StartDesign() As Long
Parameters
None
Remarks
This function starts the cold formed frame design.
The function returns zero if the cold formed frame design is successfully started;
otherwise it returns a nonzero value.
The function will fail if no cold formed frame objects are present. It will also fail if
analysis results are not available.
VBA Example
Sub StartColdFormedDesign()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifyPassed
Syntax
SapObject.SapModel.DesignColdFormed.VerifyPassed
VB6 Procedure
Function VerifyPassed(ByRef NumberItems As Long, ByRef n1 As Long, ByRef
n2 As Long, ByRef MyName() As String) As Long
Parameters
NumberItems
The number of cold formed frame objects that did not pass the design check or
have not yet been checked.
n1
The number of cold formed frame objects that did not pass the design check.
n2
The number of cold formed frame objects that have not yet been checked.
MyName
This is an array that includes the name of each frame object that did not pass
the design check or has not yet been checked.
Remarks
This function retrieves the names of the frame objects that did not pass the
design check or have not yet been checked, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyColdFormedDesignPassed()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim n1 As Long
Dim n2 As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign
'verify frame objects successfully designed
ret = SapModel.DesignColdFormed.VerifyPassed(NumberItems,
n1, n2, MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
VerifySections
Syntax
SapObject.SapModel.DesignColdFormed.VerifySections
VB6 Procedure
Function VerifySections(ByRef NumberItems As Long, ByRef MyName() As
String) As Long
Parameters
NumberItems
The number of frame objects that have different analysis and design sections.
MyName
This is an array that includes the name of each frame object that has different
analysis and design sections.
Remarks
This function retrieves the names of the frame objects that have different
analysis and design sections, if any.
The function returns zero if the names are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub VerifyColdFormedDesignSections()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim NumberItems As Long
Dim MyName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'verify analysis versus design section


ret = SapModel.DesignColdFormed.VerifySections(NumberItems,
MyName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
Syntax
SapObject.SapModel.DesignColdFormed.AISI_ASD96.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a cold formed frame design procedure.
Item
This is an integer between 1 and 27, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Moment coefficient, Ctf Major
10 = Moment coefficient, Ctf Minor
11 = Bending coefficient, Cb
12 = Moment factor, Alpha Major
13 = Moment factor, Alpha Minor
14 = Through fastened to deck
15 = Fastener eccentricity, a/b
16 = Hole diameter at top flange
17 = Hole diameter at bottom flange
18 = Hole diameter on web
19 = Yield stress, Fy
20 = Nominal compressive capacity, Pnc
21 = Nominal tensile capacity, Pnt
22 = Nominal bending capacity for yielding, Mn33
23 = Nominal bending capacity for yielding, Mn22
24 = Nominal bending capacity for lateral torsional buckling, Mn33
25 = Nominal bending capacity for lateral torsional buckling, Mn22
26 = Nominal shear capacity, Vn2
27 = Nominal shear capacity, Vn3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame
2 = Live load reduction factor
Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, Ctf Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, Ctf Minor


Value >= 0; 0 means use program determined value.

11 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

12 = Moment factor, Alpha Major


Value >= 0; 0 means use program determined value.

13 = Moment factor, Alpha Minor


Value >= 0; 0 means use program determined value.

14 = Through fastened to deck


0 = No.
Any other value = Yes.

15 = Fastener eccentricity, a/b


Value >= 0; 0 means use program determined value. [L]
16 = Hole diameter at top flange
Value >= 0; 0 means use program determined value. [L]

17 = Hole diameter at bottom flange


Value >= 0; 0 means use program determined value. [L]

18 = Hole diameter on web


Value >= 0; 0 means use program determined value. [L]

19 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

20 = Nominal compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

21 = Nominal tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

22 = Nominal bending capacity for yielding, Mn33


Value >= 0; 0 means use program determined value. [FL]

23 = Nominal bending capacity for yielding, Mn22


Value >= 0; 0 means use program determined value. [FL]

24 = Nominal bending capacity for lateral torsional buckling, Mn33


Value >= 0; 0 means use program determined value. [FL]

25 = Nominal bending capacity for lateral torsional buckling, Mn22


Value >= 0; 0 means use program determined value. [FL]

26 = Nominal shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

27 = Nominal shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a cold formed design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignOverwriteItemAISI_ASD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set cold formed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-ASD96")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'get overwrite item


ret = SapModel.DesignColdFormed.AISI_ASD96.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignColdFormed.AISI_ASD96.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Omega bending stiffened
4 = Omega bending unstiffened
5 = Omega bending lateral torsional buckling
6 = Omega shear slender
7 = Omega shear nonslender
8 = Omega axial tension
9 = Omega axial compression
10 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Omega bending stiffened


Value > 0

4 = Omega bending unstiffened


Value > 0

5 = Omega bending lateral torsional buckling


Value > 0

6 = Omega shear slender


Value > 0

7 = Omega shear nonslender


Value > 0

8 = Omega axial tension


Value > 0
9 = Omega axial compression
Value > 0

10 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function retrieves the value of a cold formed design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignPreferenceItemAISI_ASD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set coldformed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-ASD96")

'get preference item


ret = SapModel.DesignColdFormed.AISI_ASD96.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignColdFormed.AISI_ASD96.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 27, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Moment coefficient, Ctf Major
10 = Moment coefficient, Ctf Minor
11 = Bending coefficient, Cb
12 = Moment factor, Alpha Major
13 = Moment factor, Alpha Minor
14 = Through fastened to deck
15 = Fastener eccentricity, a/b
16 = Hole diameter at top flange
17 = Hole diameter at bottom flange
18 = Hole diameter on web
19 = Yield stress, Fy
20 = Nominal compressive capacity, Pnc
21 = Nominal tensile capacity, Pnt
22 = Nominal bending capacity for yielding, Mn33
23 = Nominal bending capacity for yielding, Mn22
24 = Nominal bending capacity for lateral torsional buckling, Mn33
25 = Nominal bending capacity for lateral torsional buckling, Mn22
26 = Nominal shear capacity, Vn2
27 = Nominal shear capacity, Vn3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame
2 = Live load reduction factor
Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, Ctf Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, Ctf Minor


Value >= 0; 0 means use program determined value.

11 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

12 = Moment factor, Alpha Major


Value >= 0; 0 means use program determined value.

13 = Moment factor, Alpha Minor


Value >= 0; 0 means use program determined value.

14 = Through fastened to deck


0 = No.
Any other value = Yes.

15 = Fastener eccentricity, a/b


Value >= 0; 0 means use program determined value. [L]
16 = Hole diameter at top flange
Value >= 0; 0 means use program determined value. [L]

17 = Hole diameter at bottom flange


Value >= 0; 0 means use program determined value. [L]

18 = Hole diameter on web


Value >= 0; 0 means use program determined value. [L]

19 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

20 = Nominal compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

21 = Nominal tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

22 = Nominal bending capacity for yielding, Mn33


Value >= 0; 0 means use program determined value. [FL]

23 = Nominal bending capacity for yielding, Mn22


Value >= 0; 0 means use program determined value. [FL]

24 = Nominal bending capacity for lateral torsional buckling, Mn33


Value >= 0; 0 means use program determined value. [FL]

25 = Nominal bending capacity for lateral torsional buckling, Mn22


Value >= 0; 0 means use program determined value. [FL]

26 = Nominal shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

27 = Nominal shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a cold formed design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetColdFormedDesignOverwriteItemAISI_ASD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set cold formed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-ASD96")

'set overwrite item


ret = SapModel.DesignColdFormed.AISI_ASD96.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignColdFormed.AISI_ASD96.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Omega bending stiffened
4 = Omega bending unstiffened
5 = Omega bending lateral torsional buckling
6 = Omega shear slender
7 = Omega shear nonslender
8 = Omega axial tension
9 = Omega axial compression
10 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Omega bending stiffened


Value > 0

4 = Omega bending unstiffened


Value > 0

5 = Omega bending lateral torsional buckling


Value > 0

6 = Omega shear slender


Value > 0

7 = Omega shear nonslender


Value > 0

8 = Omega axial tension


Value > 0
9 = Omega axial compression
Value > 0

10 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function sets the value of a cold formed design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetColdFormedDesignPreferenceItemAISI_ASD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set coldformed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-ASD96")

'set preference item


ret = SapModel.DesignColdFormed.AISI_ASD96.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetPreference
GetOverwrite
Syntax
SapObject.SapModel.DesignColdFormed.AISI_LRFD96.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a cold formed frame design procedure.
Item
This is an integer between 1 and 27, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Moment coefficient, Ctf Major
10 = Moment coefficient, Ctf Minor
11 = Bending coefficient, Cb
12 = Moment factor, Alpha Major
13 = Moment factor, Alpha Minor
14 = Through fastened to deck
15 = Fastener eccentricity, a/b
16 = Hole diameter at top flange
17 = Hole diameter at bottom flange
18 = Hole diameter on web
19 = Yield stress, Fy
20 = Nominal compressive capacity, Pnc
21 = Nominal tensile capacity, Pnt
22 = Nominal bending capacity for yielding, Mn33
23 = Nominal bending capacity for yielding, Mn22
24 = Nominal bending capacity for lateral torsional buckling, Mn33
25 = Nominal bending capacity for lateral torsional buckling, Mn22
26 = Nominal shear capacity, Vn2
27 = Nominal shear capacity, Vn3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame
2 = Live load reduction factor
Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, Ctf Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, Ctf Minor


Value >= 0; 0 means use program determined value.

11 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

12 = Moment factor, Alpha Major


Value >= 0; 0 means use program determined value.

13 = Moment factor, Alpha Minor


Value >= 0; 0 means use program determined value.

14 = Through fastened to deck


0 = No.
Any other value = Yes.

15 = Fastener eccentricity, a/b


Value >= 0; 0 means use program determined value. [L]
16 = Hole diameter at top flange
Value >= 0; 0 means use program determined value. [L]

17 = Hole diameter at bottom flange


Value >= 0; 0 means use program determined value. [L]

18 = Hole diameter on web


Value >= 0; 0 means use program determined value. [L]

19 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

20 = Nominal compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

21 = Nominal tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

22 = Nominal bending capacity for yielding, Mn33


Value >= 0; 0 means use program determined value. [FL]

23 = Nominal bending capacity for yielding, Mn22


Value >= 0; 0 means use program determined value. [FL]

24 = Nominal bending capacity for lateral torsional buckling, Mn33


Value >= 0; 0 means use program determined value. [FL]

25 = Nominal bending capacity for lateral torsional buckling, Mn22


Value >= 0; 0 means use program determined value. [FL]

26 = Nominal shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

27 = Nominal shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a cold formed design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignOverwriteItemAISI_LRFD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set cold formed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-LRFD96")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start cold formed design


ret = SapModel.DesignColdFormed.StartDesign

'get overwrite item


ret =
SapModel.DesignColdFormed.AISI_LRFD96.GetOverwrite("8", 1, Value,
ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPreference
Syntax
SapObject.SapModel.DesignColdFormed.AISI_LRFD96.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Phi bending stiffened
4 = Phi bending unstiffened
5 = Phi bending lateral torsional buckling
6 = Phi shear slender
7 = Phi shear nonslender
8 = Phi axial tension
9 = Phi axial compression
10 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Phi bending stiffened


Value > 0

4 = Phi bending unstiffened


Value > 0

5 = Phi bending lateral torsional buckling


Value > 0

6 = Phi shear slender


Value > 0

7 = Phi shear nonslender


Value > 0

8 = Phi axial tension


Value > 0
9 = Phi axial compression
Value > 0

10 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function retrieves the value of a cold formed design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetColdFormedDesignPreferenceItemAISI_LRFD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set coldformed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-LRFD96")

'get preference item


ret = SapModel.DesignColdFormed.AISI_LRFD96.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetPreference
SetOverwrite
Syntax
SapObject.SapModel.DesignColdFormed.AISI_LRFD96.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 27, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor and Lateral Torsional Buckling
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Moment coefficient, Ctf Major
10 = Moment coefficient, Ctf Minor
11 = Bending coefficient, Cb
12 = Moment factor, Alpha Major
13 = Moment factor, Alpha Minor
14 = Through fastened to deck
15 = Fastener eccentricity, a/b
16 = Hole diameter at top flange
17 = Hole diameter at bottom flange
18 = Hole diameter on web
19 = Yield stress, Fy
20 = Nominal compressive capacity, Pnc
21 = Nominal tensile capacity, Pnt
22 = Nominal bending capacity for yielding, Mn33
23 = Nominal bending capacity for yielding, Mn22
24 = Nominal bending capacity for lateral torsional buckling, Mn33
25 = Nominal bending capacity for lateral torsional buckling, Mn22
26 = Nominal shear capacity, Vn2
27 = Nominal shear capacity, Vn3
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame
2 = Live load reduction factor
Value >= 0; 0 means use a program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor and Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, Ctf Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, Ctf Minor


Value >= 0; 0 means use program determined value.

11 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

12 = Moment factor, Alpha Major


Value >= 0; 0 means use program determined value.

13 = Moment factor, Alpha Minor


Value >= 0; 0 means use program determined value.

14 = Through fastened to deck


0 = No.
Any other value = Yes.

15 = Fastener eccentricity, a/b


Value >= 0; 0 means use program determined value. [L]
16 = Hole diameter at top flange
Value >= 0; 0 means use program determined value. [L]

17 = Hole diameter at bottom flange


Value >= 0; 0 means use program determined value. [L]

18 = Hole diameter on web


Value >= 0; 0 means use program determined value. [L]

19 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

20 = Nominal compressive capacity, Pnc


Value >= 0; 0 means use program determined value. [F]

21 = Nominal tensile capacity, Pnt


Value >= 0; 0 means use program determined value. [F]

22 = Nominal bending capacity for yielding, Mn33


Value >= 0; 0 means use program determined value. [FL]

23 = Nominal bending capacity for yielding, Mn22


Value >= 0; 0 means use program determined value. [FL]

24 = Nominal bending capacity for lateral torsional buckling, Mn33


Value >= 0; 0 means use program determined value. [FL]

25 = Nominal bending capacity for lateral torsional buckling, Mn22


Value >= 0; 0 means use program determined value. [FL]

26 = Nominal shear capacity, Vn2


Value >= 0; 0 means use program determined value. [F]

27 = Nominal shear capacity, Vn3


Value >= 0; 0 means use program determined value. [F]
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a cold formed design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetColdFormedDesignOverwriteItemAISI_LRFD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set cold formed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-LRFD96")

'set overwrite item


ret =
SapModel.DesignColdFormed.AISI_LRFD96.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPreference
Syntax
SapObject.SapModel.DesignColdFormed.AISI_LRFD96.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Demand/capacity ratio limit
3 = Phi bending stiffened
4 = Phi bending unstiffened
5 = Phi bending lateral torsional buckling
6 = Phi shear slender
7 = Phi shear nonslender
8 = Phi axial tension
9 = Phi axial compression
10 = Time history design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Demand/capacity ratio limit


Value > 0

3 = Phi bending stiffened


Value > 0

4 = Phi bending unstiffened


Value > 0

5 = Phi bending lateral torsional buckling


Value > 0

6 = Phi shear slender


Value > 0

7 = Phi shear nonslender


Value > 0

8 = Phi axial tension


Value > 0
9 = Phi axial compression
Value > 0

10 = Time history design


1 = Envelopes
2 = Step-by step
Remarks
This function sets the value of a cold formed design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetColdFormedDesignPreferenceItemAISI_LRFD96()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'add cold formed material


ret = SapModel.PropMaterial.AddQuick(Name,
MATERIAL_COLDFORMED, , , ,
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50)

'create new cold formed frame section property


ret = SapModel.PropFrame.SetColdC("CdC", Name , 9, 3, 0.06,
0.25, 0.5)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 72, 2, 144,
True, "CdC", "CdC")

'set coldformed design code


ret = SapModel.DesignColdFormed.SetCode("AISI-LRFD96")

'set preference item


ret = SapModel.DesignColdFormed.AISI_LRFD96.SetPreference(1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetPreference
All
Syntax
SapObject.SapModel.SelectObj.All
VB6 Procedure
Function All(Optional ByVal DeSelect As Boolean = False) As Long
Parameters
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects in the model.
This function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectAll()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'select all
ret = SapModel.SelectObj.All

'deselect all
ret = SapModel.SelectObj.All(True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
ClearSelection
Syntax
SapObject.SapModel.SelectObj.ClearSelection
VB6 Procedure
Function ClearSelection() As Long
Parameters
None
Remarks
This function deselects all objects in the model. It returns zero if the selection
status is successfully set, otherwise it returns nonzero.
VBA Example
Sub ClearSelection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(ConcentricBraced, 3, 124, 3,
200)

'select all
ret = SapModel.SelectObj.All

'clear selection
ret = SapModel.SelectObj.ClearSelection

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Constraint
Syntax
SapObject.SapModel.SelectObj.Constraint
VB6 Procedure
Function Constraint(ByVal Name As String, Optional ByVal DeSelect As Boolean
= False) As Long
Parameters
Name
The name of an existing joint constraint.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all point objects to which the specified
constraint has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectConstraint()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim i As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'define a new constraint


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1")

'define new constraint assignments


For i = 4 To 16 Step 4
ret = SapModel.PointObj.SetConstraint(Format(i),
"Diaph1")
Next i

'select constraint
ret = SapModel.SelectObj.Constraint("Diaph1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
CoordinateRange
Syntax
SapObject.SapModel.SelectObj.CoordinateRange
VB6 Procedure
Function CoordinateRange(ByVal XMin As Double, ByVal XMax As Double,
ByVal YMin As Double, ByVal YMax As Double, ByVal ZMin As Double, ByVal
ZMax As Double, Optional ByVal DeSelect As Boolean = False, Optional ByVal
CSys As String = "Global", Optional ByVal IncludeIntersections As Boolean =
False, Optional ByVal Point As Boolean = True, Optional ByVal Line As Boolean
= True, Optional ByVal Area As Boolean = True, Optional ByVal Solid As
Boolean = True, Optional ByVal Link As Boolean = True) As Long
Parameters
XMin, XMax
The maximum and minimum X coordinates of the selection box in the specified
coordinate system.
YMin, YMax
The maximum and minimum Y coordinates of the selection box in the specified
coordinate system.
ZMin, ZMax
The maximum and minimum Z coordinates of the selection box in the specified
coordinate system.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
CSys
The name of the coordinate system in which XMin, XMax, YMin, YMax, ZMin and
ZMax are specified.
IncludeIntersections
When this item is True, objects that are inside the box or intersecting the sides
and edges of the box are selected or deselected.
When this item is False, only objects that are fully inside the box are selected or
deselected.
Point
Point objects that fall inside the box are only selected or deselected when this
item is True.
Line
Line objects that fall inside the box are only selected or deselected when this
item is True.
Area
Area objects that fall inside the box are only selected or deselected when this
item is True.
Solid
Solid objects that fall inside the box are only selected or deselected when this
item is True.
Link
Link objects that fall inside the box are only selected or deselected when this
item is True.
Remarks
This function selects or deselects objects inside the box defined by the XMin,
XMax, YMin, YMax, ZMin and ZMax coordinates.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectCoordinateRange()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select coordinate range


ret = SapModel.SelectObj.CoordinateRange(-100, 100, 0, 0,
100, 200, , , True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetSelected
Syntax
SapObject.SapModel.SelectObj.GetSelected
VB6 Procedure
Function GetSelected(ByRef NumberItems As Long, ByRef ObjectType() As
Long, ByRef ObjectName() As String) As Long
Parameters
NumberItems
The number of selected objects.
ObjectType
This is an array that includes the object type of each selected object.
1= Point object
2= Frame object
3= Cable object
4= Tendon object
5= Area object
6= Solid object
7= Link object
ObjectName
This is an array that includes the name of each selected object.
Remarks
This function retrieves a list of selected objects.
The function returns zero if the selection list is successfully retrieved, otherwise
it returns a nonzero value.
VBA Example
Sub GetSelectedObjects()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim ObjectType() As Long
Dim ObjectName() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set all point objects selected


ret = SapModel.PointObj.SetSelected("ALL", True, Group)

'set all frame objects selected


ret = SapModel.FrameObj.SetSelected("ALL", True, Group)

'get selected objects


ret = SapModel.SelectObj.GetSelected(NumberItems,
ObjectType, ObjectName)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
Group
Syntax
SapObject.SapModel.SelectObj.Group
VB6 Procedure
Function Group(ByVal Name As String, Optional ByVal DeSelect As Boolean =
False) As Long
Parameters
Name
The name of an existing group.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects in the specified group.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectGroup()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select group
ret = SapModel.SelectObj.Group("ALL")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
InvertSelection
Syntax
SapObject.SapModel.SelectObj.InvertSelection
VB6 Procedure
Function InvertSelection() As Long
Parameters
None
Remarks
This function deselects all selected objects and selects all unselected objects;
that is, it inverts the selection.
The function returns zero if the selection is successfully inverted, otherwise it
returns nonzero.
VBA Example
Sub InvertTheSelection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select objects
ret = SapModel.SelectObj.PlaneXY("2")

'invert the selection


ret = SapModel.SelectObj.InvertSelection

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
LinesParallelToCoordAxis
Syntax
SapObject.SapModel.SelectObj.LinesParallelToCoordAxis
VB6 Procedure
Function LinesParallelToCoordAxis(ByRef ParallelTo() As Boolean, Optional
ByVal CSys As String = "Global", Optional ByVal Tolerance As Double = 0.057,
Optional ByVal DeSelect As Boolean = False) As Long
Parameters
ParallelTo
This is an array of six booleans representing three coordinate axes and three
coordinate planes. Any combination of the six may be specified.
ParallelTo(0) = X axis
ParallelTo(1) = Y axis
ParallelTo(2) = Z axis
ParallelTo(3) = XY plane
ParallelTo(4) = XZ plane
ParallelTo(5) = YZ plane
CSys
The name of the coordinate system to which the ParallelTo items apply.
Tolerance
Line objects that are within this angle in degrees of being parallel to a specified
coordinate axis or plane are selected or deselected. [deg]
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects objects parallel to specified coordinate axes
or planes.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectParallelToAxes()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim ParallelTo() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select parallel to axes


ReDim ParallelTo(5)
ParallelTo(2) = True
ret =
SapModel.SelectObj.LinesParallelToCoordAxis(ParallelTo)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
LinesParallelToLine
LinesParallelToLine
Syntax
SapObject.SapMoel.SelectObj.LinesParallelToLine
VB6 Procedure
Function LinesParallelToLine(ByVal Name As String, Optional ByVal DeSelect
As Boolean = False) As Long
Parameters
Name
The name of a line object.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all line objects that are parallel to a specified
line object.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectParallelToLine()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select parallel to line


ret = SapModel.SelectObj.LinesParallelToLine("1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
LinesParallelToCoordAxis
PlaneXY
Syntax
SapObject.SapModel.SelectObj.PlaneXY
VB6 Procedure
Function PlaneXY(ByVal Name As String, Optional ByVal DeSelect As Boolean =
False) As Long
Parameters
Name
The name of a point object.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects that are in the same XY plane (in
the present coordinate system) as the specified point object.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectPlaneXY()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select in XY plane
ret = SapModel.SelectObj.PlaneXY("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PlaneXZ
PlaneYZ
GetPresentCoordSystem
SetPresentCoordSystem
PlaneXZ
Syntax
SapObject.SapModel.SelectObj.PlaneXZ
VB6 Procedure
Function PlaneXZ(ByVal Name As String, Optional ByVal DeSelect As Boolean =
False) As Long
Parameters
Name
The name of a point object.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects that are in the same XZ plane (in
the present coordinate system) as the specified point object.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectPlaneXZ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select in XZ plane
ret = SapModel.SelectObj.PlaneXZ("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PlaneXY
PlaneYZ
GetPresentCoordSystem
SetPresentCoordSystem
PlaneYZ
Syntax
SapObject.SapModel.SelectObj.PlaneYZ
VB6 Procedure
Function PlaneYZ(ByVal Name As String, Optional ByVal DeSelect As Boolean =
False) As Long
Parameters
Name
The name of a point object.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects that are in the same YZ plane (in
the present coordinate system) as the specified point object.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectPlaneYZ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select in YZ plane
ret = SapModel.SelectObj.PlaneYZ("3")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PlaneXY
PlaneXZ
GetPresentCoordSystem
SetPresentCoordSystem
PreviousSelection
Syntax
SapObject.SapModel.SelectObj.PreviousSelection
VB6 Procedure
Function PreviousSelection() As Long
Parameters
None
Remarks
This function restores the previous selection.
The function returns zero if the selection is successfully restored, otherwise it
returns nonzero.
VBA Example
Sub RestoreSelection()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select objects
ret = SapModel.SelectObj.PlaneXY("2")

'clear selection
ret = SapModel.SelectObj.ClearSelection

'get previous selection


ret = SapModel.SelectObj.PreviousSelection

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyArea
Syntax
SapObject.SapModel.SelectObj.PropertyArea
VB6 Procedure
Function PropertyArea(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing area section property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all area objects to which the specified section
has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectAreaProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(4, 48, 4, 48)

'select by area property


ret = SapModel.SelectObj.PropertyArea("ASEC1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyTendon
PropertySolid
PropertyLink
PropertyLinkFD
PropertyMaterial
PropertyCable
Syntax
SapObject.SapModel.SelectObj.PropertyCable
VB6 Procedure
Function PropertyCable(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing cable section property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all cable objects to which the specified section
has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectCableProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 7-001.sdb")

'select by cable property


ret = SapModel.SelectObj.PropertyCable("CAB1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyTendon
PropertyArea
PropertySolid
PropertyLink
PropertyLinkFD
PropertyMaterial
PropertyFrame
Syntax
SapObject.SapModel.SelectObj.PropertyFrame
VB6 Procedure
Function PropertyFrame(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing frame section property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all line objects to which the specified section
has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectFrameProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select by frame property


ret = SapModel.SelectObj.PropertyFrame("FSEC1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyCable
PropertyTendon
PropertyArea
PropertySolid
PropertyLink
PropertyLinkFD
PropertyMaterial
PropertyLink
Syntax
SapObject.SapModel.SelectObj.PropertyLink
VB6 Procedure
Function PropertyLink(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing link property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all link objects to which the specified section
property has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectLinkProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 6-003a.sdb")

'select by link property


ret = SapModel.SelectObj.PropertyLink("GAP1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyTendon
PropertyArea
PropertySolid
PropertyLinkFD
PropertyMaterial
PropertyLinkFD
Syntax
SapObject.SapModel.SelectObj.PropertyLinkFD
VB6 Procedure
Function PropertyLinkFD(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing frequency dependent link property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all link objects to which the specified
frequency dependent link property has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Similar to PropertyFrame
'select by frequency dependent link property
ret = SapModel.SelectObj.PropertyLinkFD("FD1")
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyTendon
PropertyArea
PropertySolid
PropertyLink
PropertyMaterial
PropertyMaterial
Syntax
SapObject.SapModel.SelectObj.PropertyMaterial
VB6 Procedure
Function PropertyMaterial(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing material property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all objects to which the specified material
property has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectByMaterial()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select by material property


ret = SapModel.SelectObj.PropertyMaterial("A992Fy50")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyTendon
PropertyArea
PropertySolid
PropertyLink
PropertyLinkFD
PropertySolid
Syntax
SapObject.SapModel.SelectObj.PropertySolid
VB6 Procedure
Function PropertySolid(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing solid property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all solid objects to which the specified property
has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Similar to PropertyFrame
'select by solid property
ret = SapModel.SelectObj.PropertySolid("SOLID1")
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyTendon
PropertyArea
PropertyLink
PropertyLinkFD
PropertyMaterial
PropertyTendon
Syntax
SapObject.SapModel.SelectObj.PropertyTendon
VB6 Procedure
Function PropertyTendon(ByVal Name As String, Optional ByVal DeSelect As
Boolean = False) As Long
Parameters
Name
The name of an existing tendon section property.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
Remarks
This function selects or deselects all tendon objects to which the specified
section has been assigned.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectTendonProperty()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open existing model


ret = SapModel.File.OpenFile("C:\SapAPI\Example 1-009a.sdb")

'select by tendon property


ret = SapModel.SelectObj.PropertyTendon("TEN1")

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
PropertyFrame
PropertyCable
PropertyArea
PropertySolid
PropertyLink
PropertyLinkFD
PropertyMaterial
SupportedPoints
Syntax
SapObject.SapModel.SelectObj.SupportedPoints
VB6 Procedure
Function SupportedPoints(ByRef DOF() As Boolean, Optional ByVal CSys As
String = "Local", Optional ByVal DeSelect As Boolean = False, Optional ByVal
SelectRestraints As Boolean = True, Optional ByVal SelectJointSprings As
Boolean = True, Optional ByVal SelectLineSprings As Boolean = True, Optional
ByVal SelectAreaSprings As Boolean = True, Optional ByVal SelectSolidSprings
As Boolean = True, Optional ByVal SelectOneJointLinks As Boolean = True) As
Long
Parameters
DOF
This is an array of six booleans for the six degrees of freedom of a point object.
DOF(0) = U1
DOF(1) = U2
DOF(2) = U3
DOF(3) = R1
DOF(4) = R2
DOF(5) = R3
CSys
The name of the coordinate system in which degrees of freedom (DOF) are
specified. This is either Local or the name of a defined coordinate system. Local
means the point local coordinate system.
DeSelect
The item is False if objects are to be selected and True if they are to be
deselected.
SelectRestraints
If this item is True then points with restraint assignments in one of the specified
degrees of freedom are selected or deselected.
SelectJointSprings
If this item is True then points with joint spring assignments in one of the
specified degrees of freedom are selected or deselected.
SelectLineSprings
If this item is True, points with a contribution from line spring assignments in one
of the specified degrees of freedom are selected or deselected.
SelectAreaSprings
If this item is True, points with a contribution from area spring assignments in
one of the specified degrees of freedom are selected or deselected.
SelectSolidSprings
If this item is True, points with a contribution from solid surface spring
assignments in one of the specified degrees of freedom are selected or
deselected.
SelectOneJointLinks
If this item is True, points with one joint link assignments in one of the specified
degrees of freedom are selected or deselected.
Remarks
This function selects or deselects point objects with support in the specified
degrees of freedom.
The function returns zero if the selection is successfully completed, otherwise it
returns nonzero.
VBA Example
Sub SelectSupportedPoints()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret as Long
Dim DOF() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'select supported points


Redim DOF(5)
DOF(2) = True
ret = SapModel.SelectObj.SupportedPoints(DOF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetDimensions
Syntax
SapObject.SapModel.Options.SetDimensions
VB6 Procedure
Function SetDimensions(Optional ByVal CuttingPlaneTol As Double = 0, Optional
ByVal WorldSpacing As Double = 0, Optional ByVal NudgeValue As Double = 0,
Optional ByVal PixelClickSize As Long = 0, Optional ByVal PixelSnapSize As
Long = 0, Optional ByVal ScrLinThk As Long = 0, Optional ByVal PrtLinThk As
Long = 0, Optional ByVal MaxFont As Long = 0, Optional ByVal MinFont As Long
= 0, Optional ByVal ZoomStep As Long = 0, Optional ByVal ShrinkFact As Long
= 0, Optional ByVal TextFileMaxChar As Long = 0) As Long
Parameters
CuttingPlaneTol
The tolerance for 2D view cutting planes. [L]
WorldSpacing
The plan fine grid spacing. [L]
NudgeValue
The plan nudge value. [L]
PixelClickSize
The screen selection tolerance in pixels.
PixelSnapSize
The screen snap tolerance in pixels.
ScrLinThk
The screen line thickness in pixels.
PrtLinThk
The printer line thickness in pixels.
MaxFont
The maximum graphic font size in points.
MinFont
The minimum graphic font size in points.
ZoomStep
The auto zoom step size in percent (0 < ZoomStep <= 100).
ShrinkFact
The shrink factor in percent (0 < ShrinkFact <= 100).
TextFileMaxChar
The maximum line length in the text file (ShrinkFact >= 80).
Remarks
This function sets program dimension and tolerance items. Inputting 0 for any
item means that the item will be ignored by the program; that is, its current value
will not be changed.
The function returns zero if the items are successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetDimensionItems()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set dimensions and tolerances


ret = SapModel.Options.SetDimensions(12, 2, 1, 4, , , , , ,
, , 120)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetDimensions
GetDimensions
Syntax
SapObject.SapModel.Options.GetDimensions
VB6 Procedure
Function GetDimensions(ByRef CuttingPlaneTol As Double, ByRef
WorldSpacing As Double, ByRef NudgeValue As Double, ByRef PixelClickSize
As Long, ByRef PixelSnapSize As Long, ByRef ScrLinThk As Long, ByRef
PrtLinThk As Long, ByRef MaxFont As Long, ByRef MinFont As Long, ByRef
ZoomStep As Long, ByRef ShrinkFact As Long, ByRef TextFileMaxChar As
Long) As Long
Parameters
CuttingPlaneTol
The tolerance for 2D view cutting planes. [L]
WorldSpacing
The plan fine grid spacing. [L]
NudgeValue
The plan nudge value. [L]
PixelClickSize
The screen selection tolerance in pixels.
PixelSnapSize
The screen snap tolerance in pixels.
ScrLinThk
The screen line thickness in pixels.
PrtLinThk
The printer line thickness in pixels.
MaxFont
The maximum graphic font size in points.
MinFont
The minimum graphic font size in points.
ZoomStep
The auto zoom step size in percent (0 < ZoomStep < = 100).
ShrinkFact
The shrink factor in percent (0 < ShrinkFact < = 100).
TextFileMaxChar
The maximum line length in the text file (ShrinkFact > = 80).
Remarks
This function retrieves the program dimension and tolerance items.
The function returns zero if the items are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetDimensionItems()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim CuttingPlaneTol As Double
Dim WorldSpacing As Double
Dim NudgeValue As Double
Dim PixelClickSize As Long
Dim PixelSnapSize As Long
Dim ScrLinThk As Long
Dim PrtLinThk As Long
Dim MaxFont As Long
Dim MinFont As Long
Dim ZoomStep As Long
Dim ShrinkFact As Long
Dim TextFileMaxChar As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get dimensions and tolerances


ret = SapModel.Options.GetDimensions(CuttingPlaneTol,
WorldSpacing, NudgeValue, PixelClickSize, PixelSnapSize,
ScrLinThk, PrtLinThk, MaxFont, MinFont, ZoomStep, ShrinkFact,
TextFileMaxChar)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetDimensions
RefreshView
Syntax
SapObject.SapModel.View.RefreshView
VB6 Procedure
Function RefreshView(Optional ByVal Window As Long = 0, Optional ByVal
Zoom As Boolean = True) As Long
Parameters
Window
This is 0 meaning all windows or an existing window number. It indicates the
window(s) to have its view refreshed.
Zoom
If this item is True, the window zoom is maintained when the view is refreshed. If
it is False, the zoom returns to a default zoom.
Remarks
This function refreshes the view for the specified window(s). It returns zero if the
window views are successfully refreshed, otherwise it returns a nonzero value.
See RefreshWindow and RefreshView for more information.
VBA Example
Sub RefreshAllViews()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add a frame object


ret = SapModel.FrameObj.AddByPoint("1", "6", Name)

'refresh view for all windows


ret = SapModel.View.RefreshView

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Modified optional argument Zoom to be ByVal in version 12.0.1.
See Also
RefreshWindow
RefreshWindow
Syntax
SapObject.SapModel.View.RefreshWindow
VB6 Procedure
Function RefreshWindow(Optional ByVal Window As Long = 0) As Long
Parameters
Window
This is 0 meaning all windows or an existing window number. It indicates the
window(s) to be refreshed.
Remarks
This function refreshes the specified window(s). It returns zero if the windows
are successfully refreshed, otherwise it returns a nonzero value.
See RefreshWindow and RefreshView for more information.
VBA Example
Sub RefreshAllWindows()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim i As Long
Dim Value() As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'add joint restraint


Redim Value(5)
For i = 0 to 5
Value(i) = True
Next i
ret = SapModel.PointObj.SetRestraint("1", Value)

'refresh all windows


ret = SapModel.View.RefreshWindow

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
RefreshView
GetSuperCutStressPoint
Syntax
SapObject.SapModel.BridgeAdvancedSuper.GetSuperCutStressPoint
VB6 Procedure
Function GetSuperCutStressPoint(ByVal Name As String, ByVal CutIndex As
Long, ByVal PointIndex As Long, ByRef X As Double, ByRef Y As Double,
ByRef MatProp As String, ByRef Note as String) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut.
PointIndex
The index number of the stress point in this section cut in this bridge object. This
must be from 0 to Count-1, where Count is the value returned by function
CountSuperCutStressPoint.
X, Y
The transverse and vertical coordinates of the stress point in the section,
measured from the bottom left corner of the section. X is positive to the right
when looking upstation. Y is positive upward. [L]
MatProp
The name of the material property at this stress point.
Note
A description of the stress point that may be used for identification. Points that
are pre-defined by the program will have prescribed notes.
Remarks
This function returns location and material information about a single stress
point at a superstructure section cut in a bridge object.
The function returns zero if the information is successfully retrieved, otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutStressPointInfo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountPoint As Long
Dim X As Double,
Dim Y As Double
Dim MatProp As String
Dim Note As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get section cut stress point count


ret =
SapModel.BridgeAdvancedSuper.CountSuperCutStressPoint("BOBJ1", 1,
CountPoint)

'get section cut stress point location information


ret =
SapModel.BridgeAdvancedSuper.GetSuperCutStressPoint("BOBJ1", 1, 1,
X, Y, MatProp, Note)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
CountSuperCutStressPoint
CountSuperCutStressPoint
Syntax
SapObject.SapModel.BridgeAdvancedSuper.CountSuperCutStressPoint
VB6 Procedure
Function CountSuperCutStressPoint(ByVal Name As String, ByVal CutIndex As
Long, ByRef Count As Long) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut.
Count
The number of stress points for this section cut in this bridge object. They will be
identified in subsequent API functions using the indices 0 to Count-1.
Remarks
This function returns the number of stress points at the specified superstructure
section cut.
The function returns zero if the count is successfully retrieved, otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutStressPointCount()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountPoint As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get section cut stress point count


ret =
SapModel.BridgeAdvancedSuper.CountSuperCutStressPoint("BOBJ1", 1,
CountPoint)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutLocation
Syntax
SapObject.SapModel.BridgeAdvancedSuper.GetSuperCutLocation
VB6 Procedure
Function GetSuperCutLocation(ByVal Name As String, ByVal CutIndex As Long,
ByRef Location As Long, ByRef Station As Double, ByRef XRefPt As Double,
ByRef YRefPt As Double, ByRef Skew As Double, ByRef Grade As Double,
ByRef SuperElev As Double) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut. Section
cuts will be in order of increasing Station and increasing SuperCutType.
Location
This is 1 or 2, indicating whether the CutIndex section cut occurs before or after
the associated station.
1 = Before the specified station.
2 = After the specified station.
Station
The station ordinate of the CutIndex section cut at the reference line of the
superstructure. [L]
XRefPt, YRefPt
The transverse and vertical coordinates in the section of the reference point that
corresponds to the layout line in the bridge object. XRefPt is positive to the right
when looking upstation. YRefPt is positive upward. Coordinates are measured
from the lower-left corner of the section bounding-box before skew, grade, and
superelevation are applied. The rotations of the section due to skew, grade, and
superelevation occur about the reference point. [L]
Skew
The skew angle, in degrees, of the section cut, measured from the horizontal
normal to the superstructure reference line, with positive being about the upward
vertical axis.
Grade
The grade, as a slope (abs(Grade) < 1.0), giving the vertical rise per distance
along the superstructure reference line.
SuperElev
The superelevation, as a slope (abs(SuperElev) < 1.0), giving the vertical rise
per distance along the transverse normal to the superstructure reference line.
Remarks
This function returns location and orientation information about a single
superstructure section cut in a bridge object.
The function returns zero if the information is successfully retrieved, otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutCount()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Location As Long
Dim Station As Double
Dim XRefPt As Double,
Dim YRefPt As Double
Dim Skew As Double
Dim Grade As Double
Dim SuperElev As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get section cut location information


ret =
SapModel.BridgeAdvancedSuper.GetSuperCutLocation("BOBJ1", 1,
Location, Station, RefPt, YRefPt Skew, Grade, SuperElev)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
CountSuperCut
Syntax
SapObject.SapModel.BridgeAdvancedSuper.CountSuperCut
VB6 Procedure
Function CountSuperCut(ByVal Name As String, ByRef Count As Long) As Long
Parameters
Name
The name of an existing bridge object.
Count
The number of section cuts in this bridge object. They will be identified in
subsequent API functions using the indices 0 to Count-1. There may be one or
two section cuts at each output station along the length of the superstructure.
Remarks
This function returns the number of superstructure section cuts that are
available for getting analysis results and performing design.
The function returns zero if the count is successfully retrieved, otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutCount()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim FileName As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCutWebStressPoint
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.CountSuperCutWebS
VB6 Procedure
Function CountSuperCutWebStressPoint(ByVal Name As String, ByVal CutIndex
As Long, ByVal WebIndex As Long, ByRef Count As Long) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut.
WebIndex
The index number of the web in this section cut in this bridge object. This must
be from 0 to Count-1, where Count is the value returned by function
GetSuperCutSectionValues.
Count
The number of stress points in this web for this section cut in this bridge object.
They will be identified in subsequent API functions using the indices 0 to Count-
1.
Remarks
This function returns the number of stress points at the specified web of the
specified superstructure section cut.
The function returns zero if the count is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutStressPointCount()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountWeb As Long
Dim CountPoint As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get web count at first section cut (0)


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 0, 1, CountWeb)

'get stress point count at first web (0)


ret =
SapModel.BridgeAdvancedSuper.CountSuperCutWebStressPoint("BOBJ1",
0, 0, CountPoint)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutSectionValues
GetSuperCutSectionPropsAtY
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionP
VB6 Procedure
Function GetSuperCutSectionPropsAtY (ByVal Name As String, ByVal CutIndex
As Long, ByVal Y as Double, ByVal AboveY as Boolean, ByRef Ycg as Double,
ByRef Area as Double, ByRef Inertia as Double) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
Y
The Y coordinate in the section local coordinate system above or below which
the section properties are calculated.
AboveY
Boolean indicating whether properties are to be computed for the region above
(if true) or below (if false) the specified coordinate Y.
Ycg
Y coordinate of the centroid of the region above/below specified coordinate Y.
[L]
Area
Area of the region above/below specified coordinate Y. [L2]
Inertia
Moment of inertia of the region above/below specified coordinate Y, taken about
a horizontal axis at Ycg. [L4]
Remarks
This function returns section properties for the region above or below a given Y
coordinate value at a single superstructure section cut in a bridge object. These
properties are calculated for the section before skew, grade, and superelevation
are applied. Coordinate values are measured from the lower-left corner of the
section bounding-box. X is positive to the right when looking upstation, and Y is
positive upward.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutSectionValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Y As Double
Dim Ycg As Double
Dim Area As Double
Dim Inertia As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get section properties for region above Y = 10 at first cut


(0)
ret = SapModel.BridgeAdvancedSuper.BASConcBox.
GetSuperCutSectionPropsAtY ("BOBJ1", 0, Y, True, Ycg, Area,
Inertia)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.0.0.
See Also
CountSuperCut
GetSuperCutSectionValues
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionV
VB6 Procedure
Function GetSuperCutSectionValues (ByVal Name As String, ByVal CutIndex As
Long, ByVal Item as Long, ByRef Value as Double) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
Item
This is an integer from 1 to 12, inclusive, indicating the type of property value to
be gotten:
1 = Number of girders or webs
2 = Design area of top slab, ASlabTop
3 = Design area of bottom slab, ASlabBot
4 = Width of top slab, BSlabTop
5 = Width of bottom slab, BSlabBot
6 = X coordinate of top slab centroid, XSlabTop
7 = X coordinate of bottom slab centroid, XSlabBot
8 = Y coordinate of top slab centroid, YSlabTop
9 = Y coordinate of bottom slab centroid, YSlabBot
10 = Area inside torsion circuit, ATorsion
11 = Length of torsion circuit, LTorsion
12 = Number of tendons
13 = Top outside width of torsion circuit, BTorsionTop
14 = Bottom outside width of torsion circuit, BTorsionBot
15 = Left outside length of torsion circuit (along slope), HTorsionLeft
16 = Right outside length of torsion circuit (along slope), HTorsionRight
Value
The value of the requested item:
1 = Number of girders or webs
Value >= 0, integral.
2 = Design area of top slab, ASlabTop
Value > 0. [L2]
3 = Design area of bottom slab, ASlabBot
Value >= 0. [L2]
4 = Width of top slab, BSlabTop
Value > 0. [L]
5 = Width of bottom slab, BSlabBot
Value >= 0. [L]
6 = X coordinate of top slab centroid, XSlabTop
Any value is valid. [L]
7 = X coordinate of bottom slab centroid, XSlabBot
Any value is valid. [L]
8 = Y coordinate of top slab centroid, YSlabTop
Value >= 0. [L]
9 = Y coordinate of bottom slab centroid, YSlabBot
Value <= 0. [L]
10 = Area inside torsion circuit, ATorsion
Value >= 0. [L2]
11 = Length of torsion circuit, LTorsion
Value >= 0. [L]
12 = Number of tendons
Value >= 0.
13 = Top outside width of torsion circuit, BTorsionTop
Value > 0. [L]
14 = Bottom outside width of torsion circuit, BTorsionBot
Value > 0. [L]
15 = Left outside length of torsion circuit (along slope), HTorsionLeft
Value > 0. [L]
16 = Right outside length of torsion circuit (along slope), HTorsionRight
Value > 0. [L]
Remarks
This function returns an individual section property at a single superstructure
section cut in a bridge object. These properties are calculated for the section
before skew, grade, and superelevation are applied. Coordinate values are
measured from the lower-left corner of the section bounding-box. X is positive to
the right when looking upstation, and Y is positive upward.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutSectionValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get section cut section top-slab area in Value


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 1, 2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutSlabCoordsAtX
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSlabCoo
VB6 Procedure
Function GetSuperCutSlabCoordsAtX(ByVal Name As String, ByVal CutIndex As
Long, ByVal X As Double, ByRef Status As Long, ByRef y1 As Double, ByRef y2
As Double, ByRef y3 As Double, ByRef y4 As Double) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut. Section
cuts will be in order of increasing Station and increasing SuperCutType.
X
The X coordinate in the section local coordinate system at which a vertical line is
passed through the section and the slab coordinates are returned.
Status
This is 0, 1, or 2.
0 = No portion of the section is cut.
1 = Only the section is cut; no interior cell is cut.
2 = The section and an interior cell are cut.
y1
The topmost Y coordinate where the vertical line cuts the section. This item is
returned as zero when Status < 1.
y2
The bottommost Y coordinate where the vertical line cuts the section. This item
is returned as zero when Status < 1.
y3
The topmost Y coordinate where the vertical line cuts an interior cell. This item
is returned as zero when Status < 2.
y4
The bottommost Y coordinate where the vertical line cuts an interior cell. This
item is returned as zero when Status < 2.
Remarks
This function returns information about the box girder slab thicknesses at a
given horizontal location across the box girder section.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutSlabCoordsAtX()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Status As Long
Dim y1 As Double
Dim y2 As Double
Dim y3 As Double
Dim y4 As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get slab thickness information at X = 60


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSlabCoordsAtX("BO
1, 60, Status, y1, y2, y3, y4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSuperCutTendonNames
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutTendonN
VB6 Procedure
Function GetSuperCutTendonNames(ByVal Name As String, ByVal CutIndex As
Long, ByVal TendonIndex As Long, ByRef BridgeTendon As String, ByRef
TendonObj as String) As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
TendonIndex
The index number of a tendon in this section cut of this bridge object. This must
be from 0 to CountTendon-1, where CountTendon is the number of tendons
returned by function GetSuperCutSectionValues using Item = 12.
BridgeTendon
The name of the tendon inside of the bridge object corresponding to
TendonIndex.
TendonObj
The name of the tendon object created by the program from the bridge object
tendon corresponding to TendonIndex.
Remarks
This function returns the name of a single tendon object, giving access to tendon
assignments, tendon section, and material property.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutTendonNames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountTendon As Long
Dim BridgeTendon As String
Dim TendonObj As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get tendon count at section cut 1


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 12, 1, CountTendon)

'get tendon object name for first tendon (0)


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutTendonNames("BOBJ
1, 0, BridgeTendon, TendonObj)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutSectionValues
GetSuperCutTendonValues
GetSuperCutTendonValues
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutTendonV
VB6 Procedure
Function GetSuperCutTendonValues(ByVal Name As String, ByVal CutIndex As
Long, ByVal TendonIndex As Long, ByVal Item as Long, ByRef Value as Double)
As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
TendonIndex
The index number of a tendon in this section cut of this bridge object. This must
be from 0 to CountTendon-1, where CountTendon is the number of tendons
returned by the function GetSuperCutSectionValues using Item = 12.
Item
This is an integer from 1 to 4, inclusive, indicating the type of property value to
be gotten:
1 = X coordinate of tendon centroid, Xcg
2 = Y coordinate of tendon centroid, Ycg
3 = Duct diameter for tendon
4 = Bonding type for tendon
5 = Tendon slope
Value
The value of the requested item:
1 = X coordinate of tendon centroid, Xcg
Any value OK. [L]
2 = Y coordinate of tendon centroid, Ycg
Any value OK. [L]
3 = Duct diameter for tendon
Value >= 0. [L]
4 = Bonding type for tendon
1 = Bonded
2 = Unbonded
5 = Tendon slope
Any value OK. [L/L]
Remarks
This function returns an individual section property for a single tendon at a single
superstructure section cut in a bridge object. These properties are calculated for
the section before skew, grade, and superelevation are applied. Coordinate
values are measured from the lower-left corner of the section bounding-box. X is
positive to the right when looking upstation, and Y is positive upward.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutTendonValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountTendon As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get tendon count at section cut 1


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 12, 1, CountTendon)

'get Y coordinate of centroid for first tendon (0)


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutTendonValues("BOB
1, 0, 2, Value)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutSectionValues
GetSuperCutTendonNames
GetSuperCutWebCoordsAtY
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutWebCoo
VB6 Procedure
Function GetSuperCutWebCoordsAtY(ByVal Name As String, ByVal CutIndex
As Long, ByVal Y As Double, ByRef NumberWebs As Long, ByRef WebIsCut()
As Boolean, ByRef WebLeft() As Double, ByRef WebRight() As Double) As
Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
Y
The Y coordinate in the section local coordinate system at which the web
coordinates are returned.
NumberWebs
The number of webs in the section.
WebIsCut
This is a array of booleans indicating if each web is cut by a horizontal line at the
specified Y coordinate.
WebLeft
This is a array of X coordinates of the left side of each web. If the web is not cut
by a horizontal line at the specified Y coordinate, this value is returned as zero.
WebRight
This is a array of X coordinates of the right side of each web. If the web is not
cut by a horizontal line at the specified Y coordinate, this value is returned as
zero.
Remarks
This function returns information about the box girder web thicknesses at a given
elevation in the box girder section.
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutWebCoordsAtY()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberWebs As Long
Dim WebIsCut() As Boolean
Dim WebLeft() As Double
Dim WebRight() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get web information


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutWebCoordsAtY("BOB
1, 44, NumberWebs, WebIsCut, WebLeft, WebRight)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
GetSuperCutWebStressPoint
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutWebStre
VB6 Procedure
Function GetSuperCutWebStressPoint(ByVal Name As String, ByVal CutIndex
As Long, ByVal WebIndex As Long, ByVal PointIndex As Long, ByRef X As
Double, ByRef Y As Double, ByRef MatProp As String, ByRef Note as String)
As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by function CountSuperCut.
WebIndex
The index number of the web in this section cut in this bridge object. This must
be from 0 to Count-1, where Count is the value returned by function
GetSuperCutSectionValues.
PointIndex
The index number of the stress point in this web of this section cut in this bridge
object. This must be from 0 to Count-1, where Count is the value returned by
function CountSuperCutWebStressPoint.
X, Y
The transverse and vertical coordinates of the stress point in the section,
measured from the bottom left corner of the section. X is positive to the right
when looking upstation. Y is positive upward. [L]
MatProp
The name of the material property at this stress point.
Note
A description of the stress point that may be used for identification. Points that
are pre-defined by the program will have prescribed notes.
Remarks
This function returns location and material information about a single stress
point in a web at a superstructure section cut in a bridge object. The function
returns zero if the information is successfully retrieved; otherwise it returns a
nonzero value.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutStressPointInfo()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountWeb As Long
Dim CountPoint As Long
Dim X As Double,
Dim Y As Double
Dim MatProp As String
Dim Note As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get web count at first section cut (0)


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 0, 1, CountWeb)

'get stress point count at first web (0)


ret =
SapModel.BridgeAdvancedSuper.CountSuperCutWebStressPoint("BOBJ1",
0, 0, CountPoint)

'get web stress point location information


ret =
SapModel.BridgeAdvancedSuper.GetSuperCutWebStressPoint("BOBJ1", 0,
0, 0, X, Y, MatProp, Note)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.0.0.
See Also
CountSuperCut
GetSuperCutSectionValues
CountSuperCutWebStressPoint
GetSuperCutWebValues
Syntax
SapObject.SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutWebValu
VB6 Procedure
Function GetSuperCutWebValues(ByVal Name As String, ByVal CutIndex As
Long, ByVal WebIndex As Long, ByVal Item as Long, ByRef Value as Double)
As Long
Parameters
Name
The name of an existing bridge object.
CutIndex
The index number of the section cut in this bridge object. This must be from 0 to
Count-1, where Count is the value returned by the function CountSuperCut.
Section cuts will be in order of increasing Station and increasing SuperCutType.
WebIndex
The index number of a web in this section cut of this bridge object. This must be
from 0 to CountWeb-1, where CountWeb is the number of webs returned by
thenfunction GetSuperCutSectionValues using Item = 1. Webs count from left to
right when looking upstation.
Item
This is an integer from 1 to 6, inclusive, indicating the type of property value to
be gotten:
1 = Angle from vertical (Y) axis, clockwise is positive
2 = Minimum horizontal (X) web thickness
3 = Minimum top slab thickness above cell to left of web
4 = Minimum bottom slab thickness above cell to left of web
5 = Top width of cell to left of web measured from centerline of girders
on each side of cell
6 = Bottom width of cell to left of web measured from centerline of
girders on each side of cell.
Value
The value of the requested item:
1 = Angle from vertical (Y) axis, clockwise is positive
Abs(Value) < 90. [deg]
2 = Minimum horizontal (X) web thickness
Value > 0. [L]
3 = Minimum top slab thickness
Value < 0. [L]
4 = Minimum bottom slab thickness
Value > 0. [L]
5 = Top width of cell
Value >= 0. [L]
6 = Bottom width of cell
Value >= 0. [L]
Remarks
This function returns an individual section property for a single web at a single
superstructure section cut in a bridge object. These properties are calculated for
the section before skew, grade, and superelevation are applied. Coordinate
values are measured from the lower-left corner of the section bounding-box. X is
positive to the right when looking upstation, and Y is positive upward
The function returns zero if the information is successfully retrieved; otherwise it
returns a nonzero value. An error is returned for items 3, 4, 5 and 6 if the
WebIndex is specified as 0.
If the bridge object is not currently linked to existing objects in the model, an error
is returned.
VBA Example
This example assumes that a file MyBridge.sdb exists and has a linked bridge
object named BOBJ1 in it.
Sub GetBridgeSuperCutWebValues()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Count As Long
Dim CountWeb As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'open an existing file


FileName = "C:\SapAPI\MyBridge.sdb"
ret = SapModel.File.OpenFile(FileName)

'get section cut count


ret = SapModel.BridgeAdvancedSuper.CountSuperCut("BOBJ1",
Count)

'get web count at section cut 1


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutSectionValues
("BOBJ1", 1, 1, CountWeb)

'get minimum thickness for first web (0)


ret =
SapModel.BridgeAdvancedSuper.BASConcBox.GetSuperCutWebValues("BOBJ1"
1, 0, 2, Value)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
See Also
CountSuperCut
GetSuperCutSectionValues
Example 1
Remarks
This example is written for Visual Basic for Applications (VBA). It can be run
from a program such as Microsoft Excel. It is based on the SAP2000
verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand-calculated values.
Example

1. Create a new VBA project.


2. Add a reference to "C:Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000v19.TLB" to the VBA project. Modify the
path as appropriate for CSiBridge or if you have installed the program in a
different location. If the TLB is missing from the installed program directory,
an error occurred during installation. Please uninstall the program, restart
your computer, and re-install with full administrative rights.
3. Add a new module to the VBA project and paste in the following code.
Please pay attention to the comments in this code block; they contain
important information about running the script.:
Sub VerificationExample1001()

Dim ret As Long

'set the following flag to True to attach to an existing


instance of the program
'otherwise a new instance of the program will be started
Dim AttachToInstance As Boolean
AttachToInstance = False

'set the following flag to True to manually specify the


path to SAP2000.exe
'this allows for a connection to a version of SAP2000
other than the latest installation
'otherwise the latest installed version of SAP2000 will be
launched
Dim SpecifyPath As Boolean
SpecifyPath = False

'if the above flag is set to True, specify the path to


SAP2000 below
Dim ProgramPath As String
'ProgramPath = "C:\Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000.exe"

'full path to the model


'set it to the desired path of your model
Dim ModelDirectory As String
ModelDirectory = "C:\CSiAPIexample"
If Len(Dir(ModelDirectory, vbDirectory)) = 0 Then
MkDir ModelDirectory
End If

Dim ModelName As String


ModelName = "API_1-001.sdb"
Dim ModelPath As String
ModelPath = ModelDirectory & Application.PathSeparator &
ModelName

'create API helper object


Dim myHelper As cHelper
Set myHelper = New Helper

'dimension the SapObject as cOAPI type


Dim mySapObject As cOAPI
Set mySapObject = Nothing

If AttachToInstance Then
'attach to a running instance of SAP2000
'get the active SapObject
Set mySapObject = GetObject(,
"CSI.SAP2000.API.SapObject")
Else
If SpecifyPath Then
'create an instance of the SapObject from the
specified path
Set mySapObject = myHelper.CreateObject(ProgramPath)
Else
'create an instance of the SapObject from the latest
installed SAP2000
Set mySapObject =
myHelper.CreateObjectProgID("CSI.SAP2000.API.SapObject")
End If
'start SAP2000 application
mySapObject.ApplicationStart
End If

'Get a reference to cSapModel to access all OAPI classes


and functions
Dim mySapModel As cSapModel
Set mySapModel = mySapObject.SapModel
'initialize model
ret = mySapModel.InitializeNewModel

'create new blank model


ret = mySapModel.File.NewBlank

'define material property


ret = mySapModel.PropMaterial.SetMaterial("CONC",
eMatType_Concrete)

'assign isotropic mechanical properties to material


ret = mySapModel.PropMaterial.SetMPIsotropic("CONC", 3600,
0.2, 0.0000055)

'define rectangular frame section property


ret = mySapModel.PropFrame.SetRectangle("R1", "CONC", 12,
12)

'define frame section property modifiers


Dim i As Long
Dim ModValue() As Double
ReDim ModValue(7)
For i = 0 To 7
ModValue(i) = 1
Next i
ModValue(0) = 1000
ModValue(1) = 0
ModValue(2) = 0
ret = mySapModel.PropFrame.SetModifiers("R1", ModValue)

'switch to k-ft units


ret = mySapModel.SetPresentUnits(eUnits_kip_ft_F)

'add frame object by coordinates


Dim FrameName(2) As String
ret = mySapModel.FrameObj.AddByCoord(0, 0, 0, 0, 0, 10,
FrameName(0), "R1", "1")
ret = mySapModel.FrameObj.AddByCoord(0, 0, 10, 8, 0, 16,
FrameName(1), "R1", "2")
ret = mySapModel.FrameObj.AddByCoord(-4, 0, 10, 0, 0, 10,
FrameName(2), "R1", "3")
'assign point object restraint at base
Dim PointName() As String
ReDim PointName(1)
Dim Restraint() As Boolean
ReDim Restraint(5)
For i = 0 To 3
Restraint(i) = True
Next i

For i = 4 To 5
Restraint(i) = False
Next i
ret = mySapModel.FrameObj.GetPoints(FrameName(0),
PointName(0), PointName(1))
ret = mySapModel.PointObj.SetRestraint(PointName(0),
Restraint)

'assign point object restraint at top


For i = 0 To 1
Restraint(i) = True
Next i
For i = 2 To 5
Restraint(i) = False
Next i
ret = mySapModel.FrameObj.GetPoints(FrameName(1),
PointName(0), PointName(1))
ret = mySapModel.PointObj.SetRestraint(PointName(1),
Restraint)

'refresh view, update (initialize) zoom


ret = mySapModel.View.RefreshView(0, False)

'add load patterns


ret = mySapModel.LoadPatterns.Add("1",
eLoadPatternType_Other, 1)
ret = mySapModel.LoadPatterns.Add("2",
eLoadPatternType_Other)
ret = mySapModel.LoadPatterns.Add("3",
eLoadPatternType_Other)
ret = mySapModel.LoadPatterns.Add("4",
eLoadPatternType_Other)
ret = mySapModel.LoadPatterns.Add("5",
eLoadPatternType_Other)
ret = mySapModel.LoadPatterns.Add("6",
eLoadPatternType_Other)
ret = mySapModel.LoadPatterns.Add("7",
eLoadPatternType_Other)

'assign loading for load pattern 2


ret = mySapModel.FrameObj.GetPoints(FrameName(2),
PointName(0), PointName(1))
Dim PointLoadValue() As Double
ReDim PointLoadValue(5)
PointLoadValue(2) = -10
ret = mySapModel.PointObj.SetLoadForce(PointName(0), "2",
PointLoadValue)
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(2),
"2", 1, 10, 0, 1, 1.8, 1.8)

'assign loading for load pattern 3


ret = mySapModel.FrameObj.GetPoints(FrameName(2),
PointName(0), PointName(1))
ReDim PointLoadValue(5)
PointLoadValue(2) = -17.2
PointLoadValue(4) = -54.4
ret = mySapModel.PointObj.SetLoadForce(PointName(1), "3",
PointLoadValue)

'assign loading for load pattern 4


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"4", 1, 11, 0, 1, 2, 2)

'assign loading for load pattern 5


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(0),
"5", 1, 2, 0, 1, 2, 2, "Local")
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"5", 1, 2, 0, 1, -2, -2, "Local")

'assign loading for load pattern 6


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(0),
"6", 1, 2, 0, 1, 0.9984, 0.3744, "Local")
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"6", 1, 2, 0, 1, -0.3744, 0, "Local")

'assign loading for load pattern 7


ret = mySapModel.FrameObj.SetLoadPoint(FrameName(1), "7",
1, 2, 0.5, -15, "Local")

'switch to k-in units


ret = mySapModel.SetPresentUnits(eUnits_kip_in_F)

'save model
ret = mySapModel.File.Save(ModelPath)

'run model (this will create the analysis model)


ret = mySapModel.Analyze.RunAnalysis

'initialize for results


Dim SapResult(6) As Double
ret = mySapModel.FrameObj.GetPoints(FrameName(1),
PointName(0), PointName(1))

'get results for load patterns 1 through 7


Dim NumberResults As Long
Dim Obj() As String
Dim Elm() As String
Dim LoadCase() As String
Dim StepType() As String
Dim StepNum() As Double
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

For i = 0 To 6
ret =
mySapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
ret =
mySapModel.Results.Setup.SetCaseSelectedForOutput(Format(i +
1))
If i <= 3 Then
ret = mySapModel.Results.JointDispl(PointName(1),
eItemTypeElm_ObjectElm, NumberResults, Obj, Elm, LoadCase,
StepType, StepNum, U1, U2, U3, R1, R2, R3)
SapResult(i) = U3(0)
Else
ret = mySapModel.Results.JointDispl(PointName(0),
eItemTypeElm_ObjectElm, NumberResults, Obj, Elm, LoadCase,
StepType, StepNum, U1, U2, U3, R1, R2, R3)
SapResult(i) = U1(0)
End If
Next i

'close application
mySapObject.ApplicationExit False
Set mySapModel = Nothing
Set mySapObject = Nothing

'fill result strings


Dim SapResultString(6) As String
For i = 0 To 6
SapResultString(i) = Format(SapResult(i), "0.00000")
If Left(SapResultString(i), 1) <> "-" Then
SapResultString(i) = " " & SapResultString(i)
End If
Next i

'fill independent results (hand calculated)


Dim IndResult(6) As Double
Dim IndResultString(6) As String
IndResult(0) = -0.02639
IndResult(1) = 0.06296
IndResult(2) = 0.06296
IndResult(3) = -0.2963
IndResult(4) = 0.3125
IndResult(5) = 0.11556
IndResult(6) = 0.00651
For i = 0 To 6
IndResultString(i) = Format(IndResult(i), "0.00000")
If Left(IndResultString(i), 1) <> "-" Then
IndResultString(i) = " " & IndResultString(i)
End If
Next i

'fill percent difference


Dim PercentDiff(6) As Double
Dim PercentDiffString(6) As String
For i = 0 To 6
PercentDiff(i) = (SapResult(i) / IndResult(i)) - 1
PercentDiffString(i) = Format(PercentDiff(i), "0%")
If Left(PercentDiffString(i), 1) <> "-" Then
PercentDiffString(i) = " " & PercentDiffString(i)
End If
Next i

'display message box comparing results


Dim msg As String
msg = ""
msg = msg & "LC Sap2000 Independent %Diff" & vbCr &
vbLf
For i = 0 To 5
msg = msg & Format(i + 1) & " " & SapResultString(i) &
" " & IndResultString(i) & " " & PercentDiffString(i) & vbCr &
vbLf
Next i
msg = msg & Format(i + 1) & " " & SapResultString(i) & " "
& IndResultString(i) & " " & PercentDiffString(i)
MsgBox msg

End Sub
Release Notes
Initial release in version 15.0.1.
Example 2 (VB.NET 2012)
Remarks
This example is written for Visual Basic 2012. It is based on the Sap2000
verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand-calculated values.
Example

1. Create a new Visual Basic 2012 project, of type "Console Application".


2. Add a reference to "C Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000v19.DLL" to the project. Modify the path
as appropriate for CSiBridge or if you have installed the program in a
different location.
3. Copy the code below into a Module. Please pay attention to the comments
in this code block; they contain important information about running the
script.
Imports SAP2000v19

Module Module1

Sub Main()

'set the following flag to True to attach to an existing


instance of the program
'otherwise a new instance of the program will be started
Dim AttachToInstance As Boolean
AttachToInstance = False

'set the following flag to True to manually specify the


path to SAP2000.exe
'this allows for a connection to a version of SAP2000
other than the latest installation
'otherwise the latest installed version of SAP2000 will be
launched
Dim SpecifyPath As Boolean
SpecifyPath = False

'if the above flag is set to True, specify the path to


SAP2000 below
Dim ProgramPath As String
'ProgramPath = "C:\Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000.exe"

'full path to the model


'set it to the desired path of your model
Dim ModelDirectory As String = "C:\CSiAPIexample"
Try
System.IO.Directory.CreateDirectory(ModelDirectory)
Catch ex As Exception
MsgBox("Could not create directory: " +
ModelDirectory)
End Try

Dim ModelName As String = "API_1-001.sdb"


Dim ModelPath As String = ModelDirectory +
System.IO.Path.DirectorySeparatorChar + ModelName

'dimension the SapObject as cOAPI type


Dim mySapObject As cOAPI
mySapObject = Nothing

'Use ret to check if functions return successfully (ret =


0) or fail (ret = nonzero)
Dim ret As Integer
ret = -1

If AttachToInstance Then
'attach to a running instance of SAP2000
Try
'get the active SapObject
mySapObject =
DirectCast(System.Runtime.InteropServices.Marshal.GetActiveObject("C
cOAPI)
Catch ex As Exception
MsgBox("No running instance of the program found
or failed to attach.")
Return
End Try
Else
'create API helper object
Dim myHelper As cHelper
Try
myHelper = New Helper
Catch ex As Exception
MsgBox("Cannot create an instance of the Helper
object")
End Try

If SpecifyPath Then
Try
'create an instance of the SapObject from the
specified path
mySapObject =
myHelper.CreateObject(ProgramPath)
Catch ex As Exception
MsgBox("Cannot start a new instance of the
program from " + ProgramPath)
Return
End Try
Else
Try
'create an instance of the SapObject from the
latest installed SAP2000
mySapObject =
myHelper.CreateObjectProgID("CSI.SAP2000.API.SapObject")
Catch ex As Exception
MsgBox("Cannot start a new instance of the
program.")
Return
End Try
End If

'start SAP2000 application


ret = mySapObject.ApplicationStart()
End If

'Get a reference to cSapModel to access all API classes


and functions
Dim mySapModel As cSapModel
mySapModel = mySapObject.SapModel

'initialize model
ret = mySapModel.InitializeNewModel()

'create new blank model


ret = mySapModel.File.NewBlank()

'define material property


ret = mySapModel.PropMaterial.SetMaterial("CONC",
eMatType.Concrete)

'assign isotropic mechanical properties to material


ret = mySapModel.PropMaterial.SetMPIsotropic("CONC", 3600,
0.2, 0.0000055)

'define rectangular frame section property


ret = mySapModel.PropFrame.SetRectangle("R1", "CONC", 12,
12)

'define frame section property modifiers


Dim ModValue(7) As Double
For i = 0 To 7
ModValue(i) = 1
Next i
ModValue(0) = 1000
ModValue(1) = 0
ModValue(2) = 0
ret = mySapModel.PropFrame.SetModifiers("R1", ModValue)

'switch to k-ft units


ret = mySapModel.SetPresentUnits(eUnits.kip_ft_F)

'add frame object by coordinates


Dim FrameName(2) As String
ret = mySapModel.FrameObj.AddByCoord(0, 0, 0, 0, 0, 10,
FrameName(0), "R1", "1")
ret = mySapModel.FrameObj.AddByCoord(0, 0, 10, 8, 0, 16,
FrameName(1), "R1", "2")
ret = mySapModel.FrameObj.AddByCoord(-4, 0, 10, 0, 0, 10,
FrameName(2), "R1", "3")

'assign point object restraint at base


Dim PointName(1) As String
Dim Restraint(5) As Boolean
For i = 0 To 3
Restraint(i) = True
Next i
For i = 4 To 5
Restraint(i) = False
Next i
ret = mySapModel.FrameObj.GetPoints(FrameName(0),
PointName(0), PointName(1))
ret = mySapModel.PointObj.SetRestraint(PointName(0),
Restraint)
'assign point object restraint at top
For i = 0 To 1
Restraint(i) = True
Next i
For i = 2 To 5
Restraint(i) = False
Next i
ret = mySapModel.FrameObj.GetPoints(FrameName(1),
PointName(0), PointName(1))
ret = mySapModel.PointObj.SetRestraint(PointName(1),
Restraint)

'refresh view, update (initialize) zoom


ret = mySapModel.View.RefreshView(0, False)

'add load patterns


ret = mySapModel.LoadPatterns.Add("1",
eLoadPatternType.Other, 1)
ret = mySapModel.LoadPatterns.Add("2",
eLoadPatternType.Other)
ret = mySapModel.LoadPatterns.Add("3",
eLoadPatternType.Other)
ret = mySapModel.LoadPatterns.Add("4",
eLoadPatternType.Other)
ret = mySapModel.LoadPatterns.Add("5",
eLoadPatternType.Other)
ret = mySapModel.LoadPatterns.Add("6",
eLoadPatternType.Other)
ret = mySapModel.LoadPatterns.Add("7",
eLoadPatternType.Other)

'assign loading for load pattern 2


ret = mySapModel.FrameObj.GetPoints(FrameName(2),
PointName(0), PointName(1))
Dim PointLoadValue(5) As Double
PointLoadValue(2) = -10
ret = mySapModel.PointObj.SetLoadForce(PointName(0), "2",
PointLoadValue)
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(2),
"2", 1, 10, 0, 1, 1.8, 1.8)

'assign loading for load pattern 3


ret = mySapModel.FrameObj.GetPoints(FrameName(2),
PointName(0), PointName(1))
ReDim PointLoadValue(5)
PointLoadValue(2) = -17.2
PointLoadValue(4) = -54.4
ret = mySapModel.PointObj.SetLoadForce(PointName(1), "3",
PointLoadValue)

'assign loading for load pattern 4


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"4", 1, 11, 0, 1, 2, 2)

'assign loading for load pattern 5


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(0),
"5", 1, 2, 0, 1, 2, 2, "Local")
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"5", 1, 2, 0, 1, -2, -2, "Local")

'assign loading for load pattern 6


ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(0),
"6", 1, 2, 0, 1, 0.9984, 0.3744, "Local")
ret = mySapModel.FrameObj.SetLoadDistributed(FrameName(1),
"6", 1, 2, 0, 1, -0.3744, 0, "Local")

'assign loading for load pattern 7


ret = mySapModel.FrameObj.SetLoadPoint(FrameName(1), "7",
1, 2, 0.5, -15, "Local")

'switch to k-in units


ret = mySapModel.SetPresentUnits(eUnits.kip_in_F)

'save model
ret = mySapModel.File.Save(ModelPath)

'run model (this will create the analysis model)


ret = mySapModel.Analyze.RunAnalysis

'initialize for results


Dim SapResult(6) As Double
ret = mySapModel.FrameObj.GetPoints(FrameName(1),
PointName(0), PointName(1))

'get results for load patterns 1 through 7


Dim NumberResults As Integer = 0
Dim Obj(0) As String
Dim Elm(0) As String
Dim LoadCase(0) As String
Dim StepType(0) As String
Dim StepNum(0) As Double
Dim U1(0) As Double
Dim U2(0) As Double
Dim U3(0) As Double
Dim R1(0) As Double
Dim R2(0) As Double
Dim R3(0) As Double
For i = 0 To 6
ret =
mySapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
ret =
mySapModel.Results.Setup.SetCaseSelectedForOutput(Format(i + 1))
If i <= 3 Then
ret = mySapModel.Results.JointDispl(PointName(1),
eItemTypeElm.ObjectElm, NumberResults, Obj, Elm, LoadCase,
StepType, StepNum, U1, U2, U3, R1, R2, R3)
SapResult(i) = U3(0)
Else
ret = mySapModel.Results.JointDispl(PointName(0),
eItemTypeElm.ObjectElm, NumberResults, Obj, Elm, LoadCase,
StepType, StepNum, U1, U2, U3, R1, R2, R3)
SapResult(i) = U1(0)
End If
Next i

'close the application


mySapObject.ApplicationExit(False)
mySapModel = Nothing
mySapObject = Nothing

'fill result strings


Dim SapResultString(6) As String
For i = 0 To 6
SapResultString(i) = Format(SapResult(i), "0.00000")
If Microsoft.VisualBasic.Left(SapResultString(i), 1)
<> "-" Then
SapResultString(i) = " " & SapResultString(i)
End If
Next i
'fill independent results (hand calculated)
Dim IndResult(6) As Double
Dim IndResultString(6) As String
IndResult(0) = -0.02639
IndResult(1) = 0.06296
IndResult(2) = 0.06296
IndResult(3) = -0.2963
IndResult(4) = 0.3125
IndResult(5) = 0.11556
IndResult(6) = 0.00651
For i = 0 To 6
IndResultString(i) = Format(IndResult(i), "0.00000")
If Microsoft.VisualBasic.Left(IndResultString(i), 1)
<> "-" Then
IndResultString(i) = " " & IndResultString(i)
End If
Next i

'fill percent difference


Dim PercentDiff(6) As Double
Dim PercentDiffString(6) As String
For i As Integer = 0 To 6
PercentDiff(i) = (SapResult(i) / IndResult(i)) - 1
PercentDiffString(i) = Format(PercentDiff(i), "0%")
If Microsoft.VisualBasic.Left(PercentDiffString(i), 1)
<> "-" Then
PercentDiffString(i) = " " & PercentDiffString(i)
End If
Next i

'display message box comparing results


Dim msg As String = ""
msg = msg & "LC Sap2000 Independent %Diff" & vbCr &
vbLf
For i As Integer = 0 To 6
msg = msg & Format(i + 1) & " " &
SapResultString(i) & " " & IndResultString(i) & " " &
PercentDiffString(i) & If(i < 6, vbCr & vbLf, "")
Next i
MsgBox(msg)

End Sub
End Module
Release Notes
Initial release in version 15.0.1
Example 3 (Visual C# 2012)
Remarks
This example is written for Visual C# 2012. It is based on the Sap2000
verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand calculated values.
Example

1. Create a new Visual C# 2012 project, of type "Console Application".


2. Add a reference to "C Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000v19.DLL" to the project. Modify the path
as appropriate for CSiBridge or if you have installed the program in a
different location.
3. Copy the code below into a Module. Please pay attention to the comments
in this code block; they contain important information about running the
script.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAP2000v19;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{

//set the following flag to true to attach to an


existing instance of the program
//otherwise a new instance of the program will be
started
bool AttachToInstance;
AttachToInstance = false;

//set the following flag to true to manually specify


the path to SAP2000.exe
//this allows for a connection to a version of SAP2000
other than the latest installation
//otherwise the latest installed version of SAP2000
will be launched
bool SpecifyPath;
SpecifyPath = false;

//if the above flag is set to true, specify the path


to SAP2000 below
string ProgramPath;
ProgramPath = "C:\\Program Files (x86)\\Computers and
Structures\\SAP2000 19\\SAP2000.exe";

//full path to the model


//set it to the desired path of your model
string ModelDirectory = "C:\\CSiAPIexample";
try
{
System.IO.Directory.CreateDirectory(ModelDirectory);
}
catch (Exception ex)
{
Console.WriteLine("Could not create directory: " +
ModelDirectory);
}
string ModelName = "API_1-001.sdb";
string ModelPath = ModelDirectory +
System.IO.Path.DirectorySeparatorChar + ModelName;

//dimension the SapObject as cOAPI type


cOAPI mySapObject = null;

//Use ret to check if functions return successfully


(ret = 0) or fail (ret = nonzero)
int ret = 0;

if (AttachToInstance)
{
//attach to a running instance of SAP2000
try
{
//get the active SapObject
mySapObject =
(cOAPI)System.Runtime.InteropServices.Marshal.GetActiveObject("CSI.S
}
catch (Exception ex)
{
Console.WriteLine("No running instance of the
program found or failed to attach.");
return;
}
}
else
{
//create API helper object
cHelper myHelper;
try
{
myHelper = new Helper();
}
catch (Exception ex)
{
Console.WriteLine("Cannot create an instance
of the Helper object");
return;
}

if (SpecifyPath)
{
//'create an instance of the SapObject from
the specified path
try
{
//create SapObject
mySapObject =
myHelper.CreateObject(ProgramPath);
}
catch (Exception ex)
{
Console.WriteLine("Cannot start a new
instance of the program from " + ProgramPath);
return;
}
}
else
{
//'create an instance of the SapObject from
the latest installed SAP2000
try
{
//create SapObject
mySapObject =
myHelper.CreateObjectProgID("CSI.SAP2000.API.SapObject");
}
catch (Exception ex)
{
Console.WriteLine("Cannot start a new
instance of the program.");
return;
}
}
//start SAP2000 application
ret = mySapObject.ApplicationStart();
}

//create SapModel object


cSapModel mySapModel;
mySapModel = mySapObject.SapModel;

//initialize model
ret =
mySapModel.InitializeNewModel((eUnits.kip_in_F));

//create new blank model


ret = mySapModel.File.NewBlank();

//define material property


ret = mySapModel.PropMaterial.SetMaterial("CONC",
eMatType.Concrete, -1, "", "");

//assign isotropic mechanical properties to material


ret = mySapModel.PropMaterial.SetMPIsotropic("CONC",
3600, 0.2, 0.0000055, 0);

//define rectangular frame section property


ret = mySapModel.PropFrame.SetRectangle("R1", "CONC",
12, 12, -1, "", "");

//define frame section property modifiers


double[] ModValue = new double[8];
int i;
for (i = 0; i <= 7; i++)
{
ModValue[i] = 1;
}
ModValue[0] = 1000;
ModValue[1] = 0;
ModValue[2] = 0;
ret = mySapModel.PropFrame.SetModifiers("R1", ref
ModValue);

//switch to k-ft units


ret = mySapModel.SetPresentUnits(eUnits.kip_ft_F);

//add frame object by coordinates


string[] FrameName = new string[3];
string temp_string1 = FrameName[0];
string temp_string2 = FrameName[0];
ret = mySapModel.FrameObj.AddByCoord(0, 0, 0, 0, 0,
10, ref temp_string1, "R1", "1", "Global");
FrameName[0] = temp_string1;
ret = mySapModel.FrameObj.AddByCoord(0, 0, 10, 8, 0,
16, ref temp_string1, "R1", "2", "Global");
FrameName[1] = temp_string1;
ret = mySapModel.FrameObj.AddByCoord(-4, 0, 10, 0, 0,
10, ref temp_string1, "R1", "3", "Global");
FrameName[2] = temp_string1;

//assign point object restraint at base


string[] PointName = new string[2];
bool[] Restraint = new bool[6];
for (i = 0; i <= 3; i++)
{
Restraint[i] = true;
}

for (i = 4; i <= 5; i++)


{
Restraint[i] = false;
}

ret = mySapModel.FrameObj.GetPoints(FrameName[0], ref


temp_string1, ref temp_string2);
PointName[0] = temp_string1;
PointName[1] = temp_string2;
ret = mySapModel.PointObj.SetRestraint(PointName[0],
ref Restraint, 0);

//assign point object restraint at top


for (i = 0; i <= 1; i++)
{
Restraint[i] = true;
}
for (i = 2; i <= 5; i++)
{
Restraint[i] = false;
}
ret = mySapModel.FrameObj.GetPoints(FrameName[1], ref
temp_string1, ref temp_string2);
PointName[0] = temp_string1;
PointName[1] = temp_string2;
ret = mySapModel.PointObj.SetRestraint(PointName[1],
ref Restraint, 0);

//refresh view, update (initialize) zoom


bool temp_bool = false;
ret = mySapModel.View.RefreshView(0, temp_bool);

//add load patterns


temp_bool = true;
ret = mySapModel.LoadPatterns.Add("1",
eLoadPatternType.Other, 1, temp_bool);
ret = mySapModel.LoadPatterns.Add("2",
eLoadPatternType.Other, 0, temp_bool);
ret = mySapModel.LoadPatterns.Add("3",
eLoadPatternType.Other, 0, temp_bool);
ret = mySapModel.LoadPatterns.Add("4",
eLoadPatternType.Other, 0, temp_bool);
ret = mySapModel.LoadPatterns.Add("5",
eLoadPatternType.Other, 0, temp_bool);
ret = mySapModel.LoadPatterns.Add("6",
eLoadPatternType.Other, 0, temp_bool);
ret = mySapModel.LoadPatterns.Add("7",
eLoadPatternType.Other, 0, temp_bool);

//assign loading for load pattern 2


ret = mySapModel.FrameObj.GetPoints(FrameName[2], ref
temp_string1, ref temp_string2);
PointName[0] = temp_string1;
PointName[1] = temp_string2;
double[] PointLoadValue = new double[6];
PointLoadValue[2] = -10;
ret = mySapModel.PointObj.SetLoadForce(PointName[0],
"2", ref PointLoadValue, false, "Global", 0);
ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[2], "2", 1, 10,
0, 1, 1.8, 1.8, "Global", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);

//assign loading for load pattern 3


ret = mySapModel.FrameObj.GetPoints(FrameName[2], ref
temp_string1, ref temp_string2);
PointName[0] = temp_string1;
PointName[1] = temp_string2;
PointLoadValue = new double[6];
PointLoadValue[2] = -17.2;
PointLoadValue[4] = -54.4;
ret = mySapModel.PointObj.SetLoadForce(PointName[1],
"3", ref PointLoadValue, false, "Global", 0);

//assign loading for load pattern 4


ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[1], "4", 1, 11,
0, 1, 2, 2, "Global", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);

//assign loading for load pattern 5


ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[0], "5", 1, 2, 0,
1, 2, 2, "Local", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);
ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[1], "5", 1, 2, 0,
1, -2, -2, "Local", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);

//assign loading for load pattern 6


ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[0], "6", 1, 2, 0,
1, 0.9984, 0.3744, "Local", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);
ret =
mySapModel.FrameObj.SetLoadDistributed(FrameName[1], "6", 1, 2, 0,
1, -0.3744, 0, "Local", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);
//assign loading for load pattern 7
ret = mySapModel.FrameObj.SetLoadPoint(FrameName[1],
"7", 1, 2, 0.5, -15, "Local", System.Convert.ToBoolean(-1),
System.Convert.ToBoolean(-1), 0);

//switch to k-in units


ret = mySapModel.SetPresentUnits(eUnits.kip_in_F);

//save model
ret = mySapModel.File.Save(ModelPath);

//run model (this will create the analysis model)


ret = mySapModel.Analyze.RunAnalysis();

//initialize for SAP2000 results


double[] SapResult = new double[7];
ret = mySapModel.FrameObj.GetPoints(FrameName[1], ref
temp_string1, ref temp_string2);
PointName[0] = temp_string1;
PointName[1] = temp_string2;

//get SAP2000 results for load patterns 1 through


7
int NumberResults = 0;
string[] Obj = new string[1];
string[] Elm = new string[1];
string[] LoadCase = new string[1];
string[] StepType = new string[1];
double[] StepNum = new double[1];
double[] U1 = new double[1];
double[] U2 = new double[1];
double[] U3 = new double[1];
double[] R1 = new double[1];
double[] R2 = new double[1];
double[] R3 = new double[1];
for (i = 0; i <= 6; i++)
{
ret =
mySapModel.Results.Setup.DeselectAllCasesAndCombosForOutput();
ret =
mySapModel.Results.Setup.SetCaseSelectedForOutput(System.Convert.ToS
+ 1), System.Convert.ToBoolean(-1));
if (i <= 3)
{
ret =
mySapModel.Results.JointDispl(PointName[1],
eItemTypeElm.ObjectElm, ref NumberResults, ref Obj, ref Elm, ref
LoadCase, ref StepType, ref StepNum, ref U1, ref U2, ref U3, ref
R1, ref R2, ref R3);
U3.CopyTo(U3, 0);
SapResult[i] = U3[0];
}
else
{
ret =
mySapModel.Results.JointDispl(PointName[0],
eItemTypeElm.ObjectElm, ref NumberResults, ref Obj, ref Elm, ref
LoadCase, ref StepType, ref StepNum, ref U1, ref U2, ref U3, ref
R1, ref R2, ref R3);
U1.CopyTo(U1, 0);
SapResult[i] = U1[0];
}
}

//close SAP2000
mySapObject.ApplicationExit(false);
mySapModel = null;
mySapObject = null;

//fill SAP2000 result strings


string[] SapResultString = new string[7];
for (i = 0; i <= 6; i++)
{
SapResultString[i] = string.Format("{0:0.00000}",
SapResult[i]);
ret = (string.Compare(SapResultString[i], 1, "-",
1, 1, true));
if (ret != 0)
{
SapResultString[i] = " " + SapResultString[i];
}
}

//fill independent results


double[] IndResult = new double[7];
string[] IndResultString = new string[7];
IndResult[0] = -0.02639;
IndResult[1] = 0.06296;
IndResult[2] = 0.06296;
IndResult[3] = -0.2963;
IndResult[4] = 0.3125;
IndResult[5] = 0.11556;
IndResult[6] = 0.00651;
for (i = 0; i <= 6; i++)
{
IndResultString[i] = string.Format("{0:0.00000}",
IndResult[i]);
ret = (string.Compare(IndResultString[i], 1, "-",
1, 1, true));
if (ret != 0)
{
IndResultString[i] = " " + IndResultString[i];
}
}

//fill percent difference


double[] PercentDiff = new double[7];
string[] PercentDiffString = new string[7];
for (i = 0; i <= 6; i++)
{
PercentDiff[i] = (SapResult[i] / IndResult[i]) -
1;
PercentDiffString[i] = string.Format("{0:0%}",
PercentDiff[i]);
ret = (string.Compare(PercentDiffString[i], 1, "-
", 1, 1, true));
if (ret != 0)
{
PercentDiffString[i] = " " +
PercentDiffString[i];
}
}

//display message box comparing results


string msg = "";
msg = msg + "LC Sap2000 Independent %Diff\r\n";
for (i = 0; i <= 5; i++)
{
msg = msg + string.Format("{0:0}", i + 1) + " "
+ SapResultString[i] + " " + IndResultString[i] + " " +
PercentDiffString[i] + "\r\n";
}

msg = msg + string.Format("{0:0}", i + 1) + " " +


SapResultString[i] + " " + IndResultString[i] + " " +
PercentDiffString[i];
Console.WriteLine(msg);
Console.ReadKey();

}
}
}
Release Notes
Initial release in version 15.0.1
Example 4 (Intel Visual Fortran)
Remarks
This example is written for Intel Visual Fortran with Microsoft Visual Studio
Integration. It is based on the SAP2000 verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand-calculated values.
Example

1. Create an empty Intel Fortran project.


2. Using the Intel Fortran Module Wizard (under Tools menu), browse for
"C:\Program Files (x86)\Computers and Structures\Sap2000
19\SAP2000v19.TLB". Modify the path as appropriate for CSiBridge or if
you have installed the program in a different location. If the TLB is missing
from the installed program directory, an error occurred during installation.
Please uninstall the program, restart your computer, and re-install with full
administrative rights.
3. Once you have selected SAP2000v19.TLB, click "Next", then select all the
members to generate Sap2000v19.f90. The generated module contains
explicit interaces to all objects and member functions of the SAP2000 API.
4. Add an empty source file by right clicking on the Source Files folder in
Solution Explorer and by selecting "Add>New Item>Fortran Free-form File
(.f90)".Source.
5. Open the empty source file and paste in the following code. Please pay
attention to the comments in this code block; they contain important
information about running the script.
program APIExample

use Sap2000 ! gives access to SAP2000 API calls

implicit none

!parameters
integer(kind=4), parameter :: nDimCON = 1 ! array dimension

!local variables
integer(kind=INT_PTR_KIND()) :: pHelper ! pointer to OAPI
helper object
integer(kind=INT_PTR_KIND()) :: pSapObject ! pointer to a
Sap object
integer(kind=INT_PTR_KIND()) :: pSapModel ! pointer to a
model object
integer(kind=INT_PTR_KIND()) :: pFile ! pointer to a file
object
integer(kind=INT_PTR_KIND()) :: pPropMaterial ! pointer to
a material property object
integer(kind=INT_PTR_KIND()) :: pPropFrame ! pointer to a
model object
integer(kind=INT_PTR_KIND()) :: pFrameObj ! pointer to a
frame object
integer(kind=INT_PTR_KIND()) :: pView ! pointer to a view
object
integer(kind=INT_PTR_KIND()) :: pPointObj ! pointer to a
point object
integer(kind=INT_PTR_KIND()) :: pLoadPatterns ! pointer to
a load patterns object
integer(kind=INT_PTR_KIND()) :: pAnalyze ! pointer to an
analyze object
integer(kind=INT_PTR_KIND()) :: pAnalysisResults ! pointer
to a analysis results object
integer(kind=INT_PTR_KIND()) :: pAnalysisResultsSetup !
pointer to a setup object
integer(kind=4) :: iStatus ! error code returned from COM
subsystem

integer(kind=4) :: iRet ! error code returned from SAP2000


API calls
integer(kind=4) :: iCol
integer(kind=4) :: iUnits
integer(kind=4) :: iColor
integer(kind=4) :: iWindow
integer(kind=4) :: iItemType
integer(kind=4) :: iTypleLoadPat
integer(kind=4) :: iMyType
integer(kind=4) :: iDir
integer(kind=4) :: iNumberResults

real(kind=8) :: dE
real(kind=8) :: dU
real(kind=8) :: dA
real(kind=8) :: dTemp
real(kind=8) :: dT3
real(kind=8) :: dT2
real(kind=8) :: dModValue

real(kind=8) :: dXi
real(kind=8) :: dYi
real(kind=8) :: dZi
real(kind=8) :: dXj
real(kind=8) :: dYj
real(kind=8) :: dZj
real(kind=8) :: dSelfWTMultiplier

real(kind=8) :: dDist1
real(kind=8) :: dDist2
real(kind=8) :: dVal1
real(kind=8) :: dVal2

real(kind=8) :: dSapResultsRA1(7)
real(kind=8) :: dIndResultsRA1(7)

logical(kind=2) :: bAttachToInstance
logical(kind=2) :: bVisible
logical(kind=2) :: bFileSave
logical(kind=2) :: bZoom
logical(kind=2) :: bRestrained
logical(kind=2) :: bAddLoadCase
logical(kind=2) :: bReplace
logical(kind=2) :: bRelDist
logical(kind=2) :: bSelected

character(len=256) :: cProgramPath
character(len=256) :: cModelPath
character(len=256) :: cNotes
character(len=256) :: cGUID
character(len=256) :: cCsys
character(len=256) :: cLoadPat
character(len=256) :: cFrameName(3)
character(len=256) :: cPointName(2)

! pointers to SafeArrays
type(SA_BOUNDS) :: saBounds ! bounds object defining for
SafeArray
integer(kind=INT_PTR_KIND()) :: pModValueSA ! property
modifiers
integer(kind=INT_PTR_KIND()) :: pRestraintSA ! restraints
integer(kind=INT_PTR_KIND()) :: pPointLoadValueSA ! load
values
integer(kind=INT_PTR_KIND()) :: pObjSA ! object names
integer(kind=INT_PTR_KIND()) :: pElmSA ! element names
integer(kind=INT_PTR_KIND()) :: pLCaseSA ! load case names
integer(kind=INT_PTR_KIND()) :: pStepTypeSA ! step type
names
integer(kind=INT_PTR_KIND()) :: pStepNumSA ! step numbers
integer(kind=INT_PTR_KIND()) :: pU1SA ! displacements along
u1
integer(kind=INT_PTR_KIND()) :: pU2SA ! displacements along
u2
integer(kind=INT_PTR_KIND()) :: pU3SA ! displacements along
u3
integer(kind=INT_PTR_KIND()) :: pR1SA ! displacements along
r1
integer(kind=INT_PTR_KIND()) :: pR2SA ! displacements along
r2
integer(kind=INT_PTR_KIND()) :: pR3SA ! displacements along
r3

!set the following flag to true to attach to an existing


instance of the program
!otherwise a new instance of the program will be started
bAttachToInstance = .false. ! .true. !

!full path to the program executable


!set it to the installation folder
cProgramPath = 'C:\Program Files (x86)\Computers and
Structures\SAP2000 19\sap2000.exe'

!full path to the model


!set it to an already existing folder
cModelPath = 'C:\API\API_1-001.sdb'

!initialize COM
call COMInitialize(iStatus)

if (bAttachToInstance) then
!attach to a running instance of Sap2000
call
COMGetActiveObjectByProgID("CSI.SAP2000.API.SapObject",
pSapObject, iStatus)

call COMQueryInterface(pSapObject, IID_cOAPI,


pSapObject, iStatus)
else
!create a new instance of Sap2000
!create helper object
call COMCreateObjectByGUID(CLSID_Helper, CLSCTX_ALL,
IID_cHelper, pHelper, iStatus)

!create Sap2000 object


iStatus = $cHelper_CreateObject(pHelper, cProgramPath,
pSapObject)

!start Sap2000 application


iUnits = eUnits_kip_in_F
bVisible = .TRUE.
iStatus = $cOAPI_ApplicationStart(pSapObject, iUnits,
bVisible, '', iRet)
end if

!create SapModel object


iStatus = $cOAPI_GetSapModel(pSapObject, pSapModel)

!initialize model
iUnits = eUnits_kip_in_F
iStatus = $cSapModel_InitializeNewModel(pSapModel, iUnits,
iRet)

!create new blank model


iStatus = $cSapModel_GetFile(pSapModel, pFile)
iStatus = $cFile_NewBlank(pFile, iRet)

!define material property


iStatus = $cSapModel_GetPropMaterial(pSapModel,
pPropMaterial)

iColor = -1
cNotes = ''
cGUID = ''
iStatus = $cPropMaterial_SetMaterial(pPropMaterial, 'CONC',
eMatType_Concrete, iColor, cNotes, cGUID, iRet)

!assign isotropic mechanical properties to material


dE = 3600.
dU = 0.2
dA = 0.0000055
dTemp = 0.
iStatus = $cPropMaterial_SetMPIsotropic(pPropMaterial,
'CONC', dE, dU, dA, dTemp, iRet)

!define rectangular frame section property


iStatus = $cSapModel_GetPropFrame(pSapModel, pPropFrame)

dT3 = 12.
dT2 = 12.
iColor = -1
cNotes = ''
cGUID = ''
iStatus = $cPropFrame_SetRectangle(pPropFrame, 'R1',
'CONC', dT3, dT2, iColor, cNotes, cGUID, iRet)

!define frame section property modifiers


saBounds%lbound = 0
saBounds%extent = 8
pModValueSA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
dModValue = 1.
do iCol = 0, 7
iRet = SafeArrayPutElement(pModValueSA, iCol,
loc(dModValue))
end do
dModValue = 1000.
iRet = SafeArrayPutElement(pModValueSA, 0, loc(dModValue))
dModValue = 0.
iRet = SafeArrayPutElement(pModValueSA, 1, loc(dModValue))
iRet = SafeArrayPutElement(pModValueSA, 2, loc(dModValue))

iStatus = $cPropFrame_SetModifiers(pPropFrame, 'R1',


pModValueSA, iRet)
iRet = SafeArrayDestroy(pModValueSA)

!switch to k-ft units


iStatus = $cSapModel_SetPresentUnits(pSapModel,
eUnits_kip_ft_F, iRet)

!add frame object by coordinates


cCsys = 'Global'

dXi = 0.; dYi = 0.; dZi = 0.; dXj = 0.; dYj = 0.; dZj = 10.
iStatus = $cSapModel_GetFrameObj(pSapModel, pFrameObj)
iStatus = $cFrameObj_AddByCoord(pFrameObj, dXi, dYi, dZi,
dXj, dYj, dZj, cFrameName(1), 'R1', '1', cCsys, iRet)
dXi = 0.; dYi = 0.; dZi = 10.; dXj = 8.; dYj = 0.; dZj =
16.
iStatus = $cFrameObj_AddByCoord(pFrameObj, dXi, dYi, dZi,
dXj, dYj, dZj, cFrameName(2), 'R1', '2', cCsys, iRet)

dXi = -4.; dYi = 0.; dZi = 10.; dXj = 0.; dYj = 0.; dZj =
10.
iStatus = $cFrameObj_AddByCoord(pFrameObj, dXi, dYi, dZi,
dXj, dYj, dZj, cFrameName(3), 'R1', '3', cCsys, iRet)

!assign point object restraint at base


saBounds%lbound = 0
saBounds%extent = 6
pRestraintSA = SafeArrayCreate(VT_BOOL, nDimCON, saBounds)
bRestrained = .TRUE.
do iCol = 0, 3
iRet = SafeArrayPutElement(pRestraintSA, iCol,
loc(bRestrained))
end do
bRestrained = .FALSE.
do iCol = 4, 5
iRet = SafeArrayPutElement(pRestraintSA, iCol,
loc(bRestrained))
end do

iStatus = $cFrameObj_GetPoints(pFrameObj, cFrameName(1),


cPointName(1), cPointName(2), iRet)
iStatus = $cSapModel_GetPointObj(pSapModel, pPointObj)
iItemType = eItemType_Objects
iStatus = $cPointObj_SetRestraint(pPointObj, cPointName(1),
pRestraintSA, iItemType, iRet)

!assign point object restraint at top


bRestrained = .TRUE.
do iCol = 0, 1
iRet = SafeArrayPutElement(pRestraintSA, iCol,
loc(bRestrained))
end do
bRestrained = .FALSE.
do iCol = 2, 5
iRet = SafeArrayPutElement(pRestraintSA, iCol,
loc(bRestrained))
end do

iStatus = $cFrameObj_GetPoints(pFrameObj, cFrameName(2),


cPointName(1), cPointName(2), iRet)
iItemType = eItemType_Objects
iStatus = $cPointObj_SetRestraint(pPointObj, cPointName(2),
pRestraintSA, iItemType, iRet)
iRet = SafeArrayDestroy(pRestraintSA)

!refresh view, update (initialize) zoom


iStatus = $cSapModel_GetView(pSapModel, pView)
bZoom = .FALSE.
iWindow = 0
iStatus = $cView_RefreshView(pView, iWindow, bZoom, iRet)

!add load patterns


iStatus = $cSapModel_GetLoadPatterns(pSapModel,
pLoadPatterns)
iTypleLoadPat = eLoadPatternType_Other
dSelfWTMultiplier = 1.
bAddLoadCase = .TRUE.
iStatus = $cLoadPatterns_Add(pLoadPatterns, '1',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)

dSelfWTMultiplier = 0.
iStatus = $cLoadPatterns_Add(pLoadPatterns, '2',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)
iStatus = $cLoadPatterns_Add(pLoadPatterns, '3',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)
iStatus = $cLoadPatterns_Add(pLoadPatterns, '4',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)
iStatus = $cLoadPatterns_Add(pLoadPatterns, '5',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)
iStatus = $cLoadPatterns_Add(pLoadPatterns, '6',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)
iStatus = $cLoadPatterns_Add(pLoadPatterns, '7',
iTypleLoadPat, dSelfWTMultiplier, bAddLoadCase, iRet)

!assign loading for load pattern 2


iStatus = $cSapModel_GetFrameObj(pSapModel, pFrameObj)
iStatus = $cFrameObj_GetPoints(pFrameObj, cFrameName(3),
cPointName(1), cPointName(2), iRet)
saBounds%lbound = 0
saBounds%extent = 6
pPointLoadValueSA = SafeArrayCreate(VT_R8, nDimCON,
saBounds)
dModValue = 0.
do iCol = saBounds%lbound, saBounds%extent
iRet = SafeArrayPutElement(pPointLoadValueSA, iCol,
loc(dModValue))
end do
dModValue = -10.
iRet = SafeArrayPutElement(pPointLoadValueSA, 2,
loc(dModValue))

bReplace = .FALSE.
cCsys = 'Global'
iItemType = eItemType_Objects
iStatus = $cPointObj_SetLoadForce(pPointObj, cPointName(1),
'2', pPointLoadValueSA, bReplace, cCsys, iItemType, iRet)

iMyType = 1
iDir = 10
dDist1 = 0.
dDist2 = 1.
dVal1 = 1.8
dVal2 = 1.8
cCsys = 'Global'
bRelDist = .TRUE.
bReplace = .TRUE.
iItemType = eItemType_Objects
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(3), '2', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)

!assign loading for load pattern 3


iStatus = $cFrameObj_GetPoints(pFrameObj, cFrameName(3),
cPointName(1), cPointName(2), iRet)

dModValue = 0.
do iCol = saBounds%lbound, saBounds%extent
iRet = SafeArrayPutElement(pPointLoadValueSA, iCol,
loc(dModValue))
end do
dModValue = -17.2
iRet = SafeArrayPutElement(pPointLoadValueSA, 2,
loc(dModValue))
dModValue = -54.4
iRet = SafeArrayPutElement(pPointLoadValueSA, 4,
loc(dModValue))

bReplace = .FALSE.
cCsys = 'Global'
iItemType = eItemType_Objects
iStatus = $cPointObj_SetLoadForce(pPointObj, cPointName(2),
'3', pPointLoadValueSA, bReplace, cCsys, iItemType, iRet)
iRet = SafeArrayDestroy(pPointLoadValueSA)

!assign loading for load pattern 4


iMyType = 1
iDir = 11
dDist1 = 0.
dDist2 = 1.
dVal1 = 2.
dVal2 = 2.
cCsys = 'Global'
bRelDist = .TRUE.
bReplace = .TRUE.
iItemType = eItemType_Objects
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(2), '4', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)

!assign loading for load pattern 5


iMyType = 1
iDir = 2
dDist1 = 0.
dDist2 = 1.
dVal1 = 2.
dVal2 = 2.
cCsys = 'Local'
bRelDist = .TRUE.
bReplace = .TRUE.
iItemType = eItemType_Objects
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(1), '5', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)
dVal1 = -2.
dVal2 = -2.
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(2), '5', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)

!assign loading for load pattern 6


iMyType = 1
iDir = 2
dDist1 = 0.
dDist2 = 1.
dVal1 = 0.9984
dVal2 = 0.3744
cCsys = 'Local'
bRelDist = .TRUE.
bReplace = .TRUE.
iItemType = eItemType_Objects
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(1), '6', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)

dVal1 = -0.3744
dVal2 = 0.
iStatus = $cFrameObj_SetLoadDistributed(pFrameObj,
cFrameName(2), '6', iMyType, iDir, dDist1, dDist2, dVal1,
dVal2, cCsys, bRelDist, bReplace, iItemType, iRet)

!assign loading for load pattern 7


iMyType = 1
iDir = 2
dDist1 = 0.5
dVal1 = -15.
cCsys = 'Local'
bRelDist = .TRUE.
bReplace = .TRUE.
iItemType = eItemType_Objects
iStatus = $cFrameObj_SetLoadPoint(pFrameObj, cFrameName(2),
'7', iMyType, iDir, dDist1, dVal1, cCsys, bRelDist, bReplace,
iItemType, iRet)

!switch to k-in units


iStatus = $cSapModel_SetPresentUnits(pSapModel,
eUnits_kip_in_F, iRet)
!save model
iStatus = $cFile_Save(pFile, cModelPath, iRet)

!run model (this will create the analysis model)


iStatus = $cSapModel_GetAnalyze(pSapModel, pAnalyze)
iStatus = $cAnalyze_RunAnalysis(pAnalyze, iRet)

!initialize for Sap2000 results


iStatus = $cFrameObj_GetPoints(pFrameObj, cFrameName(2),
cPointName(1), cPointName(2), iRet)

!get Sap2000 results for load patterns 1 through 7


saBounds%lbound = 0
saBounds%extent = 0
pObjSA = SafeArrayCreate(VT_BSTR, nDimCON, saBounds)
pElmSA = SafeArrayCreate(VT_BSTR, nDimCON, saBounds)
pLCaseSA = SafeArrayCreate(VT_BSTR, nDimCON, saBounds)
pStepTypeSA = SafeArrayCreate(VT_BSTR, nDimCON, saBounds)
pStepNumSA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pU1SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pU2SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pU3SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pR1SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pR2SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)
pR3SA = SafeArrayCreate(VT_R8, nDimCON, saBounds)

dSapResultsRA1(:) = 0.

iItemType = eItemTypeElm_ObjectElm
bSelected = .TRUE.
iStatus = $cSapModel_GetResults(pSapModel,
pAnalysisResults)
do iCol = 0, 6
iStatus = $cAnalysisResults_GetSetup(pAnalysisResults,
pAnalysisResultsSetup)
write (cLoadPat, '(I1)') iCol+1
iStatus =
$cAnalysisResultsSetup_DeselectAllCasesAndCombosForOutput(pAnaly
iRet)
iStatus =
$cAnalysisResultsSetup_SetCaseSelectedForOutput(pAnalysisResults
cLoadPat, bSelected, iRet)

if (iCol <= 3) then


iStatus =
$cAnalysisResults_JointDispl(pAnalysisResults, cPointName(2),
iItemType, iNumberResults, pObjSA, pElmSA, pLCaseSA,
pStepTypeSA, pStepNumSA, pU1SA, pU2SA, pU3SA, pR1SA, pR2SA,
pR3SA, iRet)
iRet = SafeArrayGetElement(pU3SA, 0, loc(dModValue))

else
iStatus =
$cAnalysisResults_JointDispl(pAnalysisResults, cPointName(1),
iItemType, iNumberResults, pObjSA, pElmSA, pLCaseSA,
pStepTypeSA, pStepNumSA, pU1SA, pU2SA, pU3SA, pR1SA, pR2SA,
pR3SA, iRet)
iRet = SafeArrayGetElement(pU1SA, 0, loc(dModValue))
end if
dSapResultsRA1(iCol+1) = dModValue
end do

!close Sap2000 application


bFileSave = .FALSE.
iStatus = $cOAPI_ApplicationExit(pSapObject, bFileSave,
iRet)

!release Sap2000 object


iStatus = cOMReleaseObject(pSapObject)

!uninitialize COM
call COMUninitialize()

!deallocate SafeArrays
iRet = SafeArrayDestroy(pObjSA)
iRet = SafeArrayDestroy(pElmSA)
iRet = SafeArrayDestroy(pLCaseSA)
iRet = SafeArrayDestroy(pStepTypeSA)
iRet = SafeArrayDestroy(pStepNumSA)
iRet = SafeArrayDestroy(pU1SA)
iRet = SafeArrayDestroy(pU3SA)
iRet = SafeArrayDestroy(pR1SA)
iRet = SafeArrayDestroy(pR2SA)
iRet = SafeArrayDestroy(pR3SA)
!fill independent results
dIndResultsRA1(1) = -0.02639
dIndResultsRA1(2) = 0.06296
dIndResultsRA1(3) = 0.06296
dIndResultsRA1(4) = -0.29630
dIndResultsRA1(5) = 0.31250
dIndResultsRA1(6) = 0.11556
dIndResultsRA1(7) = 0.00651

!display results
print *, 'LC Sap2000 Independent %Diff'
print *, '-- -------- ----------- -----'
do iCol = 1, 7
print 1, iCol, dSapResultsRA1(iCol), dIndResultsRA1(iCol),
(dSapResultsRA1(iCol) / dIndResultsRA1(iCol)) - 1.
end do

1 format ( i3, f10.5, f13.5, f7.2)


pause

end program APIExample


Release Notes
Initial release in version 15.0.1.
Example 5 (Microsoft Visual C++ 2005)
Remarks
This example is written for Microsoft Visual C++ 2012. It is based on the
SAP2000 verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand calculated values.
Example

1. Create a Visual C++ Win32 project using the template Win32 Console
Application.
2. In Win32 Application Wizard, add common header files for ATL under
Application Settings tab.
3. Copy the "SAP2000v19.tlb" file from the SAP2000 installation folder to your
project directory. It should be copied to the same level as you client
application's project file.
4. Open the "stdafx.h" file generated by the wizard by double clicking on it and
add the following line to the end of the document:

#include <atlsafe.h>

5. Open the .cpp file generated by the wizard by double-clicking on it and


paste in the following code. Please pay attention to the comments in this
code block, they contain important information about running the script.
#include "stdafx.h"
#include <sstream>
#include <iomanip>
#include <math.h>

#import "SAP2000v19.tlb"

using namespace std;

bool CheckHRESULT(HRESULT hRes, const wchar_t *msg)


{
if(FAILED(hRes)) {
MessageBox(0, msg, L"ERROR!", MB_SETFOREGROUND);
return (false);
}

return (true);
}

int _tmain(int argc, _TCHAR* argv[])


{
// set the following flag to true to attach to an existing
instance of the program
// otherwise a new instance of the program will be started
bool bAttachToInstance;
bAttachToInstance = false;

// set the following flag to true to manually specify the


path to ETABS.exe
// this allows for a connection to a version of ETABS other
than the latest installation
// otherwise the latest installed version of ETABS will be
launched
bool bSpecifyPath;
bSpecifyPath = false;

// if the above flag is set to true, specify the path to


SAP2000 below
const wchar_t* ProgramPath;
ProgramPath = L"C:\\Program Files (x86)\\Computers and
Structures\\SAP2000 19\\SAP2000.exe";

// full path to the model


// set it to an already existing folder
const wchar_t* ModelPath = L"C:\\CSiAPIexample\\API_1-
001.sdb";

// use res to check if functions return successfully (res =


0) or fail (res = nonzero)
HRESULT hRes = -1;
int res = -1;

// initialize COM
hRes = CoInitialize(NULL);
if(!CheckHRESULT(hRes, L"Error initializing COM
subsystem!")) return (hRes);

try {
CComPtr<SAP2000v19::cOAPI> pSapObject;

if (bAttachToInstance) {
// attach to a running instance of SAP2000
CLSID clsid;
CLSIDFromProgID(L"CSI.SAP2000.API.SapObject",
&clsid);
// get the active SapObject
CComPtr<IUnknown> pUnk;
hRes = GetActiveObject(clsid, NULL,
(IUnknown**)&pUnk);
if(!CheckHRESULT(hRes, L"Cannot get active
SapObject!")) return (hRes);
hRes = pUnk-
>QueryInterface(__uuidof(SAP2000v19::cOAPI), (void **)
&pSapObject);
if(!CheckHRESULT(hRes, L"Cannot attach to
SapObject!")) return (hRes);

} else {
// start a new instance of SAP2000
// create Helper
CComPtr<SAP2000v19::cHelper> pHelper;
hRes =
pHelper.CoCreateInstance(L"SAP2000v19.Helper", NULL,
CLSCTX_INPROC_SERVER);
if(!CheckHRESULT(hRes, L"Cannot instantiate
helper!")) return (hRes);

if (bSpecifyPath) {
// create an instance of the SapObject
from the specified path
pSapObject = pHelper-
>CreateObject(ProgramPath);
hRes = ((pSapObject) ? S_OK : S_FALSE);
if(!CheckHRESULT(hRes, L"Cannot
instantiate SapObject!")) return (hRes);
} else {
// create an instance of the SapObject
from the latest installed SAP2000
pSapObject = pHelper-
>CreateObjectProgID(L"CSI.SAP2000.API.SapObject");
hRes = ((pSapObject) ? S_OK : S_FALSE);
if(!CheckHRESULT(hRes, L"Cannot
instantiate SapObject!")) return (hRes);
}
// start SAP2000 application
res = pSapObject-
>ApplicationStart(SAP2000v19::eUnits_kip_in_F, VARIANT_TRUE, L"");
if(!CheckHRESULT(hRes,
L"SapObject.ApplicationStart failed!")) return (hRes);
}

// create SapModel object


CComPtr<SAP2000v19::cSapModel> pSapModel = pSapObject-
>SapModel;

// initialize model
res = pSapModel-
>InitializeNewModel(SAP2000v19::eUnits_kip_in_F);

// create new blank model


CComPtr<SAP2000v19::cFile> pFile = pSapModel->File;
res = pFile->NewBlank();

// define material property


CComPtr<SAP2000v19::cPropMaterial> pPropMaterial =
pSapModel->PropMaterial;
_bstr_t bstrPropMaterial = "CONC";
res = pPropMaterial->SetMaterial(bstrPropMaterial,
SAP2000v19::eMatType_Concrete, -1, L"", L"");

// assign isotropic mechanical properties to material


res = pPropMaterial->SetMPIsotropic(bstrPropMaterial,
3600, 0.2, 0.0000055, 0.0);

// define rectangular frame section property


CComPtr<SAP2000v19::cPropFrame> pPropFrame = pSapModel-
>PropFrame;

_bstr_t bstrPropFrame("R1");
res = pPropFrame->SetRectangle(bstrPropFrame,
bstrPropMaterial, 12, 12, -1, L"", L"");

// define frame section property modifiers


CComSafeArray<double> saMod(8); // CComSafeArray is a
wrapper for the SAFEARRAY structure.
for (int i = 0; i < 8; i++)
saMod[i] = 1.;
saMod[0] = 1000.;
saMod[1] = 0.;
saMod[2] = 0.;
LPSAFEARRAY psaMod = saMod.Detach();
res = pPropFrame->SetModifiers(bstrPropFrame,
&psaMod);
saMod.Attach(psaMod);

// switch to k-ft units


res = pSapModel-
>SetPresentUnits(SAP2000v19::eUnits_kip_ft_F);

// add frame object by coordinates


BSTR name1 = ::SysAllocString(L"");
BSTR name2 = ::SysAllocString(L"");
BSTR name3 = ::SysAllocString(L"");
_bstr_t FrameName0("1");
_bstr_t FrameName1("2");
_bstr_t FrameName2("3");
_bstr_t bstrCoordSys("Global");
CComPtr<SAP2000v19::cFrameObj> pFrameObj = pSapModel-
>FrameObj;
res = pFrameObj->AddByCoord(0, 0, 0, 0, 0, 10, &name1,
bstrPropFrame, FrameName0, bstrCoordSys);
res = pFrameObj->AddByCoord(0, 0, 10, 8, 0, 16,
&name2, bstrPropFrame, FrameName1, bstrCoordSys);
res = pFrameObj->AddByCoord(-4, 0, 10, 0, 0, 10,
&name3, bstrPropFrame, FrameName2, bstrCoordSys);

// assign point object restraint at base


BSTR PointName;
BSTR PointName0 = ::SysAllocString(L"");
BSTR PointName1 = ::SysAllocString(L"");
CComSafeArray<VARIANT_BOOL, VT_BOOL> saRest(6);
for (int i = 0; i < 4; i++)
saRest[i] = VARIANT_TRUE;
for (int i = 4; i < 6; i++)
saRest[i] = VARIANT_FALSE;
res = pFrameObj->GetPoints(FrameName0, &PointName0,
&PointName1);

CComPtr<SAP2000v19::cPointObj> pPointObj = pSapModel-


>PointObj;
LPSAFEARRAY psaRest = saRest.Detach();
res = pPointObj->SetRestraint(PointName0, &psaRest,
SAP2000v19::eItemType_Objects);
saRest.Attach(psaRest);

// assign point object restraint at top


for (int i = 0; i < 2; i++)
saRest[i] = VARIANT_TRUE;
for (int i = 2; i < 6; i++)
saRest[i] = VARIANT_FALSE;
res = pFrameObj->GetPoints(FrameName1, &PointName0,
&PointName1);
psaRest = saRest.Detach();
res = pPointObj->SetRestraint(PointName1, &psaRest,
SAP2000v19::eItemType_Objects);
saRest.Attach(psaRest);

// refresh view, update (initialize) zoom


long window = 0;
VARIANT_BOOL zoom = VARIANT_FALSE;
CComPtr<SAP2000v19::cView> pView = pSapModel->View;
res = pView->RefreshView(window, zoom);

// add load patterns


double SelfWTMultiplier = 1.0;
VARIANT_BOOL AddLoadCase = VARIANT_TRUE;
CComPtr<SAP2000v19::cLoadPatterns> pLoadPatterns =
pSapModel->LoadPatterns;

res = pLoadPatterns->Add("1",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
SelfWTMultiplier = 0.;
res = pLoadPatterns->Add("2",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
res = pLoadPatterns->Add("3",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
res = pLoadPatterns->Add("4",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
res = pLoadPatterns->Add("5",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
res = pLoadPatterns->Add("6",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);
res = pLoadPatterns->Add("7",
SAP2000v19::eLoadPatternType_Other, SelfWTMultiplier,
AddLoadCase);

// assign loading for load pattern 2


res = pFrameObj->GetPoints(FrameName2, &PointName0,
&PointName1);

CComSafeArray<double> saPLoad(6);
for (int i = 0; i < 6; i++)
saPLoad[i] = 0.;
saPLoad[2] = -10.;

bstrCoordSys = L"Global";
LPSAFEARRAY psaPLoad = saPLoad.Detach();
res = pPointObj->SetLoadForce(PointName0, "2",
&psaPLoad, VARIANT_FALSE, bstrCoordSys,
SAP2000v19::eItemType_Objects);
saPLoad.Attach(psaPLoad);
res = pFrameObj->SetLoadDistributed(FrameName2, "2",
1, 10, 0., 1., 1.8, 1.8, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);

// assign loading for load pattern 3


res = pFrameObj->GetPoints(FrameName2, &PointName0,
&PointName1);
for (int i = 0; i < 6; i++)
saPLoad[i] = 0.;
saPLoad[2] = -17.2;
saPLoad[4] = -54.4;

psaPLoad = saPLoad.Detach();
res = pPointObj->SetLoadForce(PointName1, "3",
&psaPLoad, VARIANT_FALSE, bstrCoordSys,
SAP2000v19::eItemType_Objects);
saPLoad.Attach(psaPLoad);

// assign loading for load pattern 4


res = pFrameObj->SetLoadDistributed(FrameName1, "4",
1, 10, 0, 1, 1.8, 1.8, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);

// assign loading for load pattern 5


bstrCoordSys = L"Local";
res = pFrameObj->SetLoadDistributed(FrameName0, "5",
1, 2, 0, 1, 2, 2, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);
res = pFrameObj->SetLoadDistributed(FrameName1, "5",
1, 2, 0, 1, -2, -2, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);

// assign loading for load pattern 6


res = pFrameObj->SetLoadDistributed(FrameName0, "6",
1, 2, 0, 1, 0.9984, 0.3744, bstrCoordSys, VARIANT_TRUE,
VARIANT_TRUE, SAP2000v19::eItemType_Objects);
res = pFrameObj->SetLoadDistributed(FrameName1, "6",
1, 2, 0, 1, -0.3744, 0, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);

// assign loading for load pattern 7


res = pFrameObj->SetLoadPoint(FrameName1, "7", 1, 2,
0.5, -15, bstrCoordSys, VARIANT_TRUE, VARIANT_TRUE,
SAP2000v19::eItemType_Objects);

// switch to k-in units


res = pSapModel-
>SetPresentUnits(SAP2000v19::eUnits_kip_in_F);

// save model
_bstr_t bstrFileName(ModelPath);
res = pFile->Save(bstrFileName);

// run model (this will create the analysis model)


CComPtr<SAP2000v19::cAnalyze> pAnalyze = pSapModel-
>Analyze;
res = pAnalyze->RunAnalysis();

// initialize for Sap2000 results


long NumberResults = 0;
double SapResult[7];
for (int i = 0; i < 7; i++)
SapResult[i] = 0.;
CComSafeArray<BSTR> saResObj(1);
CComSafeArray<BSTR> saResElm(1);
CComSafeArray<BSTR> saResLoadCase(1);
CComSafeArray<BSTR> saResStepType(1);
CComSafeArray<double> saResStepNum(1);
CComSafeArray<double> saResU1(1);
CComSafeArray<double> saResU2(1);
CComSafeArray<double> saResU3(1);
CComSafeArray<double> saResR1(1);
CComSafeArray<double> saResR2(1);
CComSafeArray<double> saResR3(1);

res = pFrameObj->GetPoints(FrameName1, &PointName0,


&PointName1);

// get Sap2000 results for load cases 1 through 7


CComPtr<SAP2000v19::cAnalysisResults> pResults =
pSapModel->Results;
CComPtr<SAP2000v19::cAnalysisResultsSetup>
pResultsSetup = pResults->Setup;

for (int i = 0; i < 7; i++) {


res = pResultsSetup-
>DeselectAllCasesAndCombosForOutput();

_bstr_t bstrLoadPattern =
std::to_string(i+1).c_str();
res = pResultsSetup-
>SetCaseSelectedForOutput(bstrLoadPattern, VARIANT_TRUE);

PointName = (i <= 3) ? PointName1 : PointName0;

// result arrays get reallocated inside the


response call so we have to detach first
LPSAFEARRAY psaResObj = saResObj.Detach();
LPSAFEARRAY psaResElm = saResElm.Detach();
LPSAFEARRAY psaResLoadCase =
saResLoadCase.Detach();
LPSAFEARRAY psaResStepType =
saResStepType.Detach();
LPSAFEARRAY psaResStepNum =
saResStepNum.Detach();
LPSAFEARRAY psaResU1 = saResU1.Detach();
LPSAFEARRAY psaResU2 = saResU2.Detach();
LPSAFEARRAY psaResU3 = saResU3.Detach();
LPSAFEARRAY psaResR1 = saResR1.Detach();
LPSAFEARRAY psaResR2 = saResR2.Detach();
LPSAFEARRAY psaResR3 = saResR3.Detach();

res = pResults->JointDispl(PointName,
SAP2000v19::eItemTypeElm_ObjectElm, &NumberResults,
&psaResObj, &psaResElm, &psaResLoadCase,
&psaResStepType, &psaResStepNum,
&psaResU1, &psaResU2, &psaResU3, &psaResR1,
&psaResR2, &psaResR3);

//re-attach to the result arrays


saResObj.Attach(psaResObj);
saResElm.Attach(psaResElm);
saResLoadCase.Attach(psaResLoadCase);
saResStepType.Attach(psaResStepType);
saResStepNum.Attach(psaResStepNum);
saResU1.Attach(psaResU1);
saResU2.Attach(psaResU2);
saResU3.Attach(psaResU3);
saResR1.Attach(psaResR1);
saResR2.Attach(psaResR2);
saResR3.Attach(psaResR3);

if (i <= 3)
SapResult[i] = saResU3[0];
else
SapResult[i] = saResU1[0];
}

// close Sap2000 application


res = pSapObject->ApplicationExit(VARIANT_FALSE);

// fill independent results (hand calculated)


double IndResult[7];
IndResult[0] = -0.02639;
IndResult[1] = 0.06296;
IndResult[2] = 0.06296;
IndResult[3] = -0.2963;
IndResult[4] = 0.3125;
IndResult[5] = 0.11556;
IndResult[6] = 0.00651;

// fill percent difference


double PercentDiff[7];
for (int i = 0; i < 7; i++)
PercentDiff[i] = fabs((SapResult[i] /
IndResult[i]) - 1);

// print results
stringstream sMsg;
sMsg << fixed << setfill(' ');
sMsg << "LC Sap2000 Independent % Diff" << endl;
for (int i = 0; i < 7; i++)
sMsg << setprecision(5) << showpoint <<
setiosflags(ios::left)
<< setw(2) << i + 1 << " "
<< setw(11) << IndResult[i] << " "
<< setw(11) << SapResult[i] << " "
<< setprecision(0) << noshowpoint <<
setiosflags(ios::right)
<< setw(5) << PercentDiff[i] << '%' << endl;
MessageBoxA(0, sMsg.str().c_str(), " Results",
MB_SETFOREGROUND);

}
catch( _com_error& ex ) {
CheckHRESULT(ex.Error(), ex.ErrorMessage());
res = -1;
}

CoUninitialize();

// we're done!
return (res);
}
Example 6
Remarks
This example is written for MATLAB R2015a. It is based on the Sap2000
verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand calculated values.
Example

1. You will need to have MATLAB installed on your computer. MATLAB is a


product of MathWorks and can be purchased at www.mathworks.com. Free
trials are also available.
2. Create a MATLAB .m file and paste in the following code:

%% clean-up the workspace & command window


clear;
clc;

%% set the following flag to true to manually specify the path


to SAP2000.exe
%% this allows for a connection to a version of SAP2000 other
than the latest installation
%% otherwise the latest installed version of SAP2000 will be
launched
SpecifyPath = false;

%% if the above flag is set to true, specify the path to ETABS


below
ProgramPath = 'C:\Program Files\Computers and
Structures\SAP2000 19\SAP2000.exe';

%% full path to API dll


%% set it to the installation folder
APIDLLPath = 'C:\Program Files\Computers and
Structures\SAP2000 19\SAP2000v19.dll';

%% full path to the model


%% set it to the desired path of your model
ModelDirectory = 'C:\CSiAPIexample';
if ~exist(ModelDirectory, 'dir')
mkdir(ModelDirectory);
end
ModelName = 'API_1-001.sdb';
ModelPath = strcat(ModelDirectory, filesep, ModelName);

%% create API helper object


a = NET.addAssembly(APIDLLPath);
helper = SAP2000v19.Helper;
helper = NET.explicitCast(helper,'SAP2000v19.cHelper');
if SpecifyPath
%% create an instance of the SapObject from the specified
path
SapObject = helper.CreateObject(ProgramPath);
else
%% create an instance of the SapObject from the latest
installed ETABS
SapObject =
helper.CreateObjectProgID('CSI.SAP2000.API.SapObject');
end

SapObject = NET.explicitCast(SapObject,'SAP2000v19.cOAPI');
helper = 0;

%% start Sap2000 application


SapObject.ApplicationStart;

%% create SapModel object


SapModel =
NET.explicitCast(SapObject.SapModel,'SAP2000v19.cSapModel');

%% initialize model
ret = SapModel.InitializeNewModel;

%% create new blank model


File = NET.explicitCast(SapModel.File,'SAP2000v19.cFile');
ret = File.NewBlank;

%% define material property


PropMaterial =
NET.explicitCast(SapModel.PropMaterial,'SAP2000v19.cPropMaterial
ret = PropMaterial.SetMaterial('CONC',
SAP2000v19.eMatType.Concrete);

%% assign isotropic mechanical properties to material


ret = PropMaterial.SetMPIsotropic('CONC', 3600, 0.2,
0.0000055);

%% define rectangular frame section property


PropFrame =
NET.explicitCast(SapModel.PropFrame,'SAP2000v19.cPropFrame');
ret = PropFrame.SetRectangle('R1', 'CONC', 12, 12);
%% define frame section property modifiers
ModValue = NET.createArray('System.Double',8);
for i = 1 : 8
ModValue(i) = 1;
end
ModValue(1) = 1000;
ModValue(2) = 0;
ModValue(3) = 0;
ret = PropFrame.SetModifiers('R1', ModValue);

%% switch to k-ft units


ret = SapModel.SetPresentUnits(SAP2000v19.eUnits.kip_ft_F);

%% add frame object by coordinates


FrameObj =
NET.explicitCast(SapModel.FrameObj,'SAP2000v19.cFrameObj');
FrameName1 = System.String(' ');
FrameName2 = System.String(' ');
FrameName3 = System.String(' ');
[ret, FrameName1] = FrameObj.AddByCoord(0, 0, 0, 0, 0, 10,
FrameName1, 'R1', '1', 'Global');
[ret, FrameName2] = FrameObj.AddByCoord(0, 0, 10, 8, 0, 16,
FrameName2, 'R1', '2', 'Global');
[ret, FrameName3] = FrameObj.AddByCoord(-4, 0, 10, 0, 0, 10,
FrameName3, 'R1', '3', 'Global');

%% assign point object restraint at base


PointObj =
NET.explicitCast(SapModel.PointObj,'SAP2000v19.cPointObj');
PointName1 = System.String(' ');
PointName2 = System.String(' ');
Restraint = NET.createArray('System.Boolean',6);
for i = 1 : 4
Restraint(i) = true();
end
for i = 5 : 6
Restraint(i) = false();
end
[ret, PointName1, PointName2] = FrameObj.GetPoints(FrameName1,
PointName1, PointName2);
ret = PointObj.SetRestraint(PointName1, Restraint);
%% assign point object restraint at top
for i = 1 : 2
Restraint(i) = true();
end
for i = 3 : 6
Restraint(i) = false();
end
[ret, PointName1, PointName2] = FrameObj.GetPoints(FrameName2,
PointName1, PointName2);
ret = PointObj.SetRestraint(PointName2, Restraint);

%% refresh view, update (initialize) zoom


View = NET.explicitCast(SapModel.View,'SAP2000v19.cView');
ret = View.RefreshView(0, false());

%% add load patterns


LoadPatterns =
NET.explicitCast(SapModel.LoadPatterns,'SAP2000v19.cLoadPatterns
ret = LoadPatterns.Add('1', SAP2000v19.eLoadPatternType.Other,
1, true());
ret = LoadPatterns.Add('2', SAP2000v19.eLoadPatternType.Other,
0, true());
ret = LoadPatterns.Add('3', SAP2000v19.eLoadPatternType.Other,
0, true());
ret = LoadPatterns.Add('4', SAP2000v19.eLoadPatternType.Other,
0, true());
ret = LoadPatterns.Add('5', SAP2000v19.eLoadPatternType.Other,
0, true());
ret = LoadPatterns.Add('6', SAP2000v19.eLoadPatternType.Other,
0, true());
ret = LoadPatterns.Add('7', SAP2000v19.eLoadPatternType.Other,
0, true());

%% assign loading for load pattern 2


[ret, PointName1, PointName2] = FrameObj.GetPoints(FrameName3,
PointName1, PointName2);
PointLoadValue = NET.createArray('System.Double',6);
for i = 1 : 6
PointLoadValue(i) = 0.0;
end
PointLoadValue(3) = -10;
ret = PointObj.SetLoadForce(PointName1, '2', PointLoadValue);
ret = FrameObj.SetLoadDistributed(FrameName3, '2', 1, 10, 0,
1, 1.8, 1.8);

%% assign loading for load pattern 3


[ret, PointName1, PointName2] = FrameObj.GetPoints(FrameName3,
PointName1, PointName2);
for i = 1 : 6
PointLoadValue(i) = 0.0;
end
PointLoadValue(3) = -17.2;
PointLoadValue(5) = -54.4;
ret = PointObj.SetLoadForce(PointName2, '3', PointLoadValue);

%% assign loading for load pattern 4


ret = FrameObj.SetLoadDistributed(FrameName2, '4', 1, 11, 0,
1, 2, 2);

%% assign loading for load pattern 5


ret = FrameObj.SetLoadDistributed(FrameName1, '5', 1, 2, 0, 1,
2, 2, 'Local');
ret = FrameObj.SetLoadDistributed(FrameName2, '5', 1, 2, 0, 1,
-2, -2, 'Local');

%% assign loading for load pattern 6


ret = FrameObj.SetLoadDistributed(FrameName1, '6', 1, 2, 0, 1,
0.9984, 0.3744, 'Local');
ret = FrameObj.SetLoadDistributed(FrameName2, '6', 1, 2, 0, 1,
-0.3744, 0, 'Local');

%% assign loading for load pattern 7


ret = FrameObj.SetLoadPoint(FrameName2, '7', 1, 2, 0.5, -15,
'Local');

%% switch to k-in units


ret = SapModel.SetPresentUnits(SAP2000v19.eUnits.kip_in_F);

%% save model
ret = File.Save(ModelPath);

%% run model (this will create the analysis model)


Analyze =
NET.explicitCast(SapModel.Analyze,'SAP2000v19.cAnalyze');
ret = Analyze.RunAnalysis();
%% initialize for Sap2000 results
SapResult = zeros(7,1,'double');
[ret, PointName1, PointName2] = FrameObj.GetPoints(FrameName2,
PointName1, PointName2);

%% get Sap2000 results for load cases 1 through 7


AnalysisResults =
NET.explicitCast(SapModel.Results,'SAP2000v19.cAnalysisResults')
AnalysisResultsSetup =
NET.explicitCast(AnalysisResults.Setup,'SAP2000v19.cAnalysisResu
for i = 1 : 7
NumberResults = 0;
Obj = NET.createArray('System.String',2);
Elm = NET.createArray('System.String',2);
ACase = NET.createArray('System.String',2);
StepType = NET.createArray('System.String',2);
StepNum = NET.createArray('System.Double',2);
U1 = NET.createArray('System.Double',2);
U2 = NET.createArray('System.Double',2);
U3 = NET.createArray('System.Double',2);
R1 = NET.createArray('System.Double',2);
R2 = NET.createArray('System.Double',2);
R3 = NET.createArray('System.Double',2);

ret =
AnalysisResultsSetup.DeselectAllCasesAndCombosForOutput;
ret =
AnalysisResultsSetup.SetCaseSelectedForOutput(int2str(i));
if i <= 4
[ret, NumberResults, Obj, Elm, ACase, StepType,
StepNum, U1, U2, U3, R1, R2, R3] =
AnalysisResults.JointDispl(PointName2,
SAP2000v19.eItemTypeElm.ObjectElm, NumberResults, Obj, Elm,
ACase, StepType, StepNum, U1, U2, U3, R1, R2, R3);
SapResult(i) = U3(1);
else
[ret, NumberResults, Obj, Elm, ACase, StepType,
StepNum, U1, U2, U3, R1, R2, R3] =
AnalysisResults.JointDispl(PointName1,
SAP2000v19.eItemTypeElm.ObjectElm, NumberResults, Obj, Elm,
ACase, StepType, StepNum, U1, U2, U3, R1, R2, R3);
SapResult(i) = U1(1);
end
end

%% close Sap2000
ret = SapObject.ApplicationExit(false());
File = 0;
PropMaterial = 0;
PropFrame = 0;
FrameObj = 0;
PointObj = 0;
View = 0;
LoadPatterns = 0;
Analyze = 0;
AnalysisResults = 0;
AnalysisResultsSetup = 0;
SapModel = 0;
SapObject = 0;

%% fill independent results


IndResult = zeros(7,1,'double');
IndResult(1) = -0.02639;
IndResult(2) = 0.06296;
IndResult(3) = 0.06296;
IndResult(4) = -0.2963;
IndResult(5) = 0.3125;
IndResult(6) = 0.11556;
IndResult(7) = 0.00651;

%% fill percent difference


PercentDiff = zeros(7,1,'double');
for i = 1 : 7
PercentDiff(i) = (SapResult(i) / IndResult(i)) - 1;
end

%% display results
SapResult
IndResult
PercentDiff
Release Notes
Initial release in version 15.0.1

Example 6 (MATLAB) has been updated to take advantage of MATLABs .NET


interface. MATLAB users who were experiencing intermittent crashes when trying to
retrieve analysis results through the API should update their client applications using
the new example code as a template.
Example 7
Remarks
This example was created using Python 3.4.3. It is based on the Sap2000
verification problem Example 1-001.
This example creates the example verification problem from scratch, runs the
analysis, extracts results, and compares the results with hand calculated values.
Example
1. Download and install Python 3.4.3 or higher for Windows. Python is freely
available at python.org.
2. Install the Python library "comtypes". If you are using Python 3.4 or higher, the
easiest way to do this is by opening a command prompt with administrative
privileges and entering the command:
C:\>python -m pip install comtypes

Please note that your computer will need to be connected to the internet for the
above command to work.
3. Create a Python .py file using IDLE or any text editor and paste in the
following code. Please pay attention to the comments in this code block; they
contain important information about running the script.

import os
import sys
import comtypes.client

#set the following flag to True to attach to an existing


instance of the program
#otherwise a new instance of the program will be started
AttachToInstance = False

#set the following flag to True to manually specify the path


to SAP2000.exe
#this allows for a connection to a version of SAP2000 other
than the latest installation
#otherwise the latest installed version of SAP2000 will be
launched
SpecifyPath = False

#if the above flag is set to True, specify the path to SAP2000
below
ProgramPath = 'C:\Program Files (x86)\Computers and
Structures\SAP2000 19\SAP2000.exe'

#full path to the model


#set it to the desired path of your model
APIPath = 'C:\CSiAPIexample'
if not os.path.exists(APIPath):
try:
os.makedirs(APIPath)
except OSError:
pass
ModelPath = APIPath + os.sep + 'API_1-001.sdb'

if AttachToInstance:
#attach to a running instance of SAP2000
try:
#get the active SapObject
mySapObject =
comtypes.client.GetActiveObject("CSI.SAP2000.API.SapObject")
except (OSError, comtypes.COMError):
print("No running instance of the program found or
failed to attach.")
sys.exit(-1)
else:
#create API helper object
helper = comtypes.client.CreateObject('SAP2000v19.Helper')
helper =
helper.QueryInterface(comtypes.gen.SAP2000v19.cHelper)
if SpecifyPath:
try:
#'create an instance of the SAPObject from the
specified path
mySapObject = helper.CreateObject(ProgramPath)
except (OSError, comtypes.COMError):
print("Cannot start a new instance of the program
from " + ProgramPath)
sys.exit(-1)
else:
try:
#create an instance of the SAPObject from the
latest installed SAP2000
mySapObject =
helper.CreateObjectProgID("CSI.SAP2000.API.SapObject")
except (OSError, comtypes.COMError):
print("Cannot start a new instance of the
program.")
sys.exit(-1)

#start SAP2000 application


mySapObject.ApplicationStart()
#create SapModel object
SapModel = mySapObject.SapModel

#initialize model
SapModel.InitializeNewModel()

#create new blank model


ret = SapModel.File.NewBlank()

#define material property


MATERIAL_CONCRETE = 2
ret = SapModel.PropMaterial.SetMaterial('CONC',
MATERIAL_CONCRETE)

#assign isotropic mechanical properties to material


ret = SapModel.PropMaterial.SetMPIsotropic('CONC', 3600, 0.2,
0.0000055)

#define rectangular frame section property


ret = SapModel.PropFrame.SetRectangle('R1', 'CONC', 12, 12)

#define frame section property modifiers


ModValue = [1000, 0, 0, 1, 1, 1, 1, 1]
ret = SapModel.PropFrame.SetModifiers('R1', ModValue)

#switch to k-ft units


kip_ft_F = 4
ret = SapModel.SetPresentUnits(kip_ft_F)

#add frame object by coordinates


FrameName1 = ' '
FrameName2 = ' '
FrameName3 = ' '
[FrameName1, ret] = SapModel.FrameObj.AddByCoord(0, 0, 0, 0,
0, 10, FrameName1, 'R1', '1', 'Global')
[FrameName2, ret] = SapModel.FrameObj.AddByCoord(0, 0, 10, 8,
0, 16, FrameName2, 'R1', '2', 'Global')
[FrameName3, ret] = SapModel.FrameObj.AddByCoord(-4, 0, 10, 0,
0, 10, FrameName3, 'R1', '3', 'Global')

#assign point object restraint at base


PointName1 = ' '
PointName2 = ' '
Restraint = [True, True, True, True, False, False]
[PointName1, PointName2, ret] =
SapModel.FrameObj.GetPoints(FrameName1, PointName1,
PointName2)
ret = SapModel.PointObj.SetRestraint(PointName1, Restraint)

#assign point object restraint at top


Restraint = [True, True, False, False, False, False]
[PointName1, PointName2, ret] =
SapModel.FrameObj.GetPoints(FrameName2, PointName1,
PointName2)
ret = SapModel.PointObj.SetRestraint(PointName2, Restraint)

#refresh view, update (initialize) zoom


ret = SapModel.View.RefreshView(0, False)

#add load patterns


LTYPE_OTHER = 8
ret = SapModel.LoadPatterns.Add('1', LTYPE_OTHER, 1, True)
ret = SapModel.LoadPatterns.Add('2', LTYPE_OTHER, 0, True)
ret = SapModel.LoadPatterns.Add('3', LTYPE_OTHER, 0, True)
ret = SapModel.LoadPatterns.Add('4', LTYPE_OTHER, 0, True)
ret = SapModel.LoadPatterns.Add('5', LTYPE_OTHER, 0, True)
ret = SapModel.LoadPatterns.Add('6', LTYPE_OTHER, 0, True)
ret = SapModel.LoadPatterns.Add('7', LTYPE_OTHER, 0, True)

#assign loading for load pattern 2


[PointName1, PointName2, ret] =
SapModel.FrameObj.GetPoints(FrameName3, PointName1,
PointName2)
PointLoadValue = [0,0,-10,0,0,0]
ret = SapModel.PointObj.SetLoadForce(PointName1, '2',
PointLoadValue)
ret = SapModel.FrameObj.SetLoadDistributed(FrameName3, '2', 1,
10, 0, 1, 1.8, 1.8)

#assign loading for load pattern 3


[PointName1, PointName2, ret] =
SapModel.FrameObj.GetPoints(FrameName3, PointName1,
PointName2)
PointLoadValue = [0,0,-17.2,0,-54.4,0]
ret = SapModel.PointObj.SetLoadForce(PointName2, '3',
PointLoadValue)

#assign loading for load pattern 4


ret = SapModel.FrameObj.SetLoadDistributed(FrameName2, '4', 1,
11, 0, 1, 2, 2)

#assign loading for load pattern 5


ret = SapModel.FrameObj.SetLoadDistributed(FrameName1, '5', 1,
2, 0, 1, 2, 2, 'Local')
ret = SapModel.FrameObj.SetLoadDistributed(FrameName2, '5', 1,
2, 0, 1, -2, -2, 'Local')

#assign loading for load pattern 6


ret = SapModel.FrameObj.SetLoadDistributed(FrameName1, '6', 1,
2, 0, 1, 0.9984, 0.3744, 'Local')
ret = SapModel.FrameObj.SetLoadDistributed(FrameName2, '6', 1,
2, 0, 1, -0.3744, 0, 'Local')

#assign loading for load pattern 7


ret = SapModel.FrameObj.SetLoadPoint(FrameName2, '7', 1, 2,
0.5, -15, 'Local')

#switch to k-in units


kip_in_F = 3
ret = SapModel.SetPresentUnits(kip_in_F)

#save model
ret = SapModel.File.Save(ModelPath)

#run model (this will create the analysis model)


ret = SapModel.Analyze.RunAnalysis()

#initialize for Sap2000 results


SapResult= [0,0,0,0,0,0,0]
[PointName1, PointName2, ret] =
SapModel.FrameObj.GetPoints(FrameName2, PointName1,
PointName2)

#get Sap2000 results for load cases 1 through 7


for i in range(0,7):
NumberResults = 0
Obj = []
Elm = []
ACase = []
StepType = []
StepNum = []
U1 = []
U2 = []
U3 = []
R1 = []
R2 = []
R3 = []
ObjectElm = 0;
ret =
SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput()
ret =
SapModel.Results.Setup.SetCaseSelectedForOutput(str(i+1))
if i <= 3:
[NumberResults, Obj, Elm, ACase, StepType, StepNum,
U1, U2, U3, R1, R2, R3, ret] =
SapModel.Results.JointDispl(PointName2, ObjectElm,
NumberResults, Obj, Elm, ACase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)
SapResult[i] = U3[0]
else:
[NumberResults, Obj, Elm, ACase, StepType, StepNum,
U1, U2, U3, R1, R2, R3, ret] =
SapModel.Results.JointDispl(PointName1, ObjectElm,
NumberResults, Obj, Elm, ACase, StepType, StepNum, U1, U2, U3,
R1, R2, R3)
SapResult[i] = U1[0]

#close Sap2000
ret = mySapObject.ApplicationExit(False)
SapModel = None
mySapObject = None

#fill independent results


IndResult= [0,0,0,0,0,0,0]
IndResult[0] = -0.02639
IndResult[1] = 0.06296
IndResult[2] = 0.06296
IndResult[3] = -0.2963
IndResult[4] = 0.3125
IndResult[5] = 0.11556
IndResult[6] = 0.00651
#fill percent difference
PercentDiff = [0,0,0,0,0,0,0]
for i in range(0,7):
PercentDiff[i] = (SapResult[i] / IndResult[i]) - 1

#display results
for i in range(0,7):
print()
print(SapResult[i])
print(IndResult[i])
print(PercentDiff[i])
Release Notes
Initial release in version 15.0.1
AddQuick (Note: Newer function available)

Syntax
SapObject.SapModel.PropMaterial.AddQuick
VB6 Procedure
Function AddQuick(ByVal Name As String, ByVal MatType As eMatType,
Optional ByVal SteelType As eMatTypeSteel =
MATERIAL_STEEL_SUBTYPE_ASTM_A992_Fy50, Optional ByVal
ConcreteType As eMatTypeConcrete =
MATERIAL_CONCRETE_SUBTYPE_FC4000_NORMALWEIGHT, Optional
ByVal AluminumType As eMatTypeAluminum =
MATERIAL_ALUMINUM_SUBTYPE_6061_T6, Optional ByVal
ColdFormedType As eMatTypeColdFormed =
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50, Optional ByVal
RebarType As eMatTypeRebar =
MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr60, Optional ByVal TendonType
As eMatTypeTendon = MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270,
Optional ByVal UserName As String = "") As Long
Parameters
Name
This item is returned by the program. It is the name that the program ultimately
assigns for the material property. If no UserName is specified, the program
assigns a default name to the material property. If a UserName is specified and
that name is not used for another material property, the UserName is assigned
to the material property.
MatType
This is one of the following items in the eMatType enumeration.
MATERIAL_STEEL = 1
MATERIAL_CONCRETE = 2
MATERIAL_NODESIGN = 3
MATERIAL_ALUMINUM = 4
MATERIAL_COLDFORMED = 5
MATERIAL_REBAR = 6
MATERIAL_TENDON = 7
SteelType
This is one of the following items in the eMatTypeSteel enumeration.
MATERIAL_STEEL_SUBTYPE_ASTM_A36 = 1
MATERIAL_STEEL_SUBTYPE_ASTM_A53GrB = 2
MATERIAL_STEEL_SUBTYPE_ASTM_A500GrB_Fy42 = 3
MATERIAL_STEEL_SUBTYPE_ASTM_A500GrB_Fy46 = 4
MATERIAL_STEEL_SUBTYPE_ASTM_A572Gr50 = 5
MATERIAL_STEEL_SUBTYPE_ASTM_A913Gr50 = 6
MATERIAL_STEEL_SUBTYPE_ASTM_A992_Fy50 = 7
MATERIAL_STEEL_SUBTYPE_CHINESE_Q235 = 8
MATERIAL_STEEL_SUBTYPE_CHINESE_Q345 = 9
MATERIAL_STEEL_SUBTYPE_INDIAN_Fe250 = 10
MATERIAL_STEEL_SUBTYPE_INDIAN_Fe345 = 11
MATERIAL_STEEL_SUBTYPE_EN100252_S235 = 12
MATERIAL_STEEL_SUBTYPE_EN100252_S275 = 13
MATERIAL_STEEL_SUBTYPE_EN100252_S355 = 14
MATERIAL_STEEL_SUBTYPE_EN100252_S450 = 15

This item is applicable only when MatType = MATERIAL_STEEL.


ConcreteType
This is one of the following items in the eMatTypeConcrete enumeration.
MATERIAL_CONCRETE_SUBTYPE_FC3000_NORMALWEIGHT = 1
MATERIAL_CONCRETE_SUBTYPE_FC4000_NORMALWEIGHT = 2
MATERIAL_CONCRETE_SUBTYPE_FC5000_NORMALWEIGHT = 3
MATERIAL_CONCRETE_SUBTYPE_FC6000_NORMALWEIGHT = 4
MATERIAL_CONCRETE_SUBTYPE_FC3000_LIGHTWEIGHT = 5
MATERIAL_CONCRETE_SUBTYPE_FC4000_LIGHTWEIGHT = 6
MATERIAL_CONCRETE_SUBTYPE_FC5000_LIGHTWEIGHT = 7
MATERIAL_CONCRETE_SUBTYPE_FC6000_LIGHTWEIGHT = 8
MATERIAL_CONCRETE_SUBTYPE_CHINESE_C20_NORMALWEIGHT = 9
MATERIAL_CONCRETE_SUBTYPE_CHINESE_C30_NORMALWEIGHT = 10
MATERIAL_CONCRETE_SUBTYPE_CHINESE_C40_NORMALWEIGHT = 11
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M15_NORMALWEIGHT = 12
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M20_NORMALWEIGHT = 13
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M25_NORMALWEIGHT = 14
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M30_NORMALWEIGHT = 15
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M35_NORMALWEIGHT = 16
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M40_NORMALWEIGHT = 17
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M45_NORMALWEIGHT = 18
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M50_NORMALWEIGHT = 19
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M55_NORMALWEIGHT = 20
MATERIAL_CONCRETE_SUBTYPE_INDIAN_M60_NORMALWEIGHT = 21
MATERIAL_CONCRETE_SUBTYPE_EN_C12_NORMALWEIGHT = 22
MATERIAL_CONCRETE_SUBTYPE_EN_C16_NORMALWEIGHT = 23
MATERIAL_CONCRETE_SUBTYPE_EN_C20_NORMALWEIGHT = 24
MATERIAL_CONCRETE_SUBTYPE_EN_C25_NORMALWEIGHT = 25
MATERIAL_CONCRETE_SUBTYPE_EN_C30_NORMALWEIGHT = 26
MATERIAL_CONCRETE_SUBTYPE_EN_C35_NORMALWEIGHT = 27
MATERIAL_CONCRETE_SUBTYPE_EN_C40_NORMALWEIGHT = 28
MATERIAL_CONCRETE_SUBTYPE_EN_C45_NORMALWEIGHT = 29
MATERIAL_CONCRETE_SUBTYPE_EN_C50_NORMALWEIGHT = 30
MATERIAL_CONCRETE_SUBTYPE_EN_C55_NORMALWEIGHT = 31
MATERIAL_CONCRETE_SUBTYPE_EN_C60_NORMALWEIGHT = 32
MATERIAL_CONCRETE_SUBTYPE_EN_C70_NORMALWEIGHT = 33
MATERIAL_CONCRETE_SUBTYPE_EN_C80_NORMALWEIGHT = 34
MATERIAL_CONCRETE_SUBTYPE_EN_C90_NORMALWEIGHT = 35

This item is applicable only when MatType = MATERIAL_CONCRETE.


AluminumType
This is one of the following items in the eMatTypeAluminum enumeration.
MATERIAL_ALUMINUM_SUBTYPE_6061_T6 = 1
MATERIAL_ALUMINUM_SUBTYPE_6063_T6 = 2
MATERIAL_ALUMINUM_SUBTYPE_5052_H34 = 3

This item is applicable only when MatType = MATERIAL_ALUMINUM.


ColdFormedType
This is one of the following items in the eMatTypeColdFormed enumeration.
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr33 = 1
MATERIAL_COLDFORMED_SUBTYPE_ASTM_A653SQGr50 = 2

This item is applicable only when MatType = MATERIAL_COLDFORMED.


RebarType
This is one of the following items in the eMatTypeRebar enumeration.
MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr40 = 1
MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr60 = 2
MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr75 = 3
MATERIAL_REBAR_SUBTYPE_ASTM_A706 = 4
MATERIAL_REBAR_SUBTYPE_CHINESE_HPB235 = 5
MATERIAL_REBAR_SUBTYPE_CHINESE_HRB335 = 6
MATERIAL_REBAR_SUBTYPE_CHINESE_HRB400 = 7
MATERIAL_REBAR_SUBTYPE_INDIAN_Mild250 = 8
MATERIAL_REBAR_SUBTYPE_INDIAN_HYSD415 = 9
MATERIAL_REBAR_SUBTYPE_INDIAN_HYSD500 = 10
MATERIAL_REBAR_SUBTYPE_INDIAN_HYSD550 = 11

This item is applicable only when MatType = MATERIAL_REBAR.


TendonType
This is one of the following items in the eMatTypeTendon enumeration.
MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr250 = 1
MATERIAL_TENDON_SUBTYPE_ASTM_A416Gr270 = 2

This item is applicable only when MatType = MATERIAL_TENDON.


UserName
This is an optional user specified name for the material property. If a UserName
is specified and that name is already used for another material property, the
program ignores the UserName.
Remarks
This function adds a new material property to the model using built-in default
values.
The function returns zero if the property is successfully added; otherwise it
returns nonzero.
VBA Example
Sub AddMaterialQuick()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add ASTM A706 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A706)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Added Steel Material Types for Indian and European codes, Concrete Material
Types for Indian and European codes, and Rebar for the Indian code in
SAP2000 Version 15.0.0 and CSiBridge Version 15.1.0.
The function is obsolete and has been superceded by AddMaterial as of version
15.2.0. This function is maintained for backward compatibility. New function
added.
See Also
AssembledJointMass
Syntax
SapObject.SapModel.Results.AssembledJointMass
VB6 Procedure
Function AssembledJointMass(ByVal Name As String, ByVal ItemTypeElm As
eItemTypeElm, ByRef PointElm() As String, ByRef U1() As Double, ByRef U2()
As Double, ByRef U3() As Double, ByRef R1() As Double, ByRef R2() As
Double, ByRef R3() As Double) As Long
Parameters
Name
The name of an existing point element or group of objects, depending on the
value of the ItemTypeElm item.
ItemTypeElm
This is one of the following items in the eItemTypeElm enumeration:
ObjectElm = 0
Element = 1
GroupElm = 2
SelectionElm = 3

If this item is ObjectElm, the result request is for the point element corresponding
to the point object specified by the Name item.
If this item is Element, the result request is for the point element specified by the
Name item.
If this item is GroupElm, the result request is for all point elements directly or
indirectly specified in the group specified by the Name item.
If this item is SelectionElm, the result request is for all point elements directly or
indirectly selected and the Name item is ignored.
See Item Type for Elements for more information.
NumberResults
The total number of results returned by the program.
PointElm
This is an array that includes the point element name associated with each
result.
U1, U2, U3
These are one dimensional arrays that include the translational mass in the point
element local 1, 2 and 3 axes directions, respectively, for each result. [M]
R1, R2, R3
These are one dimensional arrays that include the rotational mass moment of
inertia about the point element local 1, 2 and 3 axes, respectively, for each
result. [ML2]
Remarks
This function reports the assembled joint masses for the specified point
elements.
The function returns zero if the masses are successfully recovered, otherwise it
returns a nonzero value.
See Analysis Results Remarks for more information.
VBA Example
Sub GetAssembledJointMass()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberResults As Long
Dim PointElm() As String
Dim U1() As Double
Dim U2() As Double
Dim U3() As Double
Dim R1() As Double
Dim R2() As Double
Dim R3() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'get assembled joint mass for all point elements


ret = SapModel.Results.AssembledJointMass("ALL", GroupElm,
NumberResults, PointElm, U1, U2, U3, R1, R2, R3)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
GetAPI4F2008 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetAPI4F2008
VB6 Procedure
Function GetAPI4F2008(ByVal Name As String, ByRef ExposureFrom As Long,
ByRef DirAngle As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef WindSpeed As Double, ByRef SSLFactor As
Double, ) As Long
Parameters
Name
The name of an existing Wind-type load case with an API 4F 2008 auto wind
assignment.
ExposureFrom
This is 2, 3 or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
Remarks
This function retrieves auto wind loading parameters for API 4F 2008.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub GetWindAPI4F2008()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim SSLFactor As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2008("WIND", 3,
0, False, 0, 0, 93, 1.1)

'get API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.GetAPI4F2008("WIND",
ExposureFrom, DirAngle, UserZ, TopZ, BottomZ, WindSpeed,
SSLFactor)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00
The function is obsolete and has been superceded by GetAPI4F2008_1 as of
version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
SetAPI4F2008
GetCurved
Syntax
SapObject.SapModel.FrameObj.GetCurved
VB6 Procedure
Function GetCurved(ByRef NumberItems As Long, ByRef MyType() As Long,
ByRef gx() As Double, ByRef gy() As Double, ByRef gz() As Double, ByRef
PointName() As String, ByRef Radius() As Double, ByRef NumSegs() As Long)
As Long
Parameters
NumberItems
The number of curved frame objects returned.
MyType
This is an array that includes a numeric value indicating the curved frame type.
The type is 1, 2, 3, 4, or 5.
1= Circular Arc Specified by a Third Point Name
2= Circular Arc Specified by Third Point Coordinates
3= Circular Arc Specified by Planar Point Coordinates and Radius
4= Parabolic Arc Specified by a Third Point Name
5= Parabolic Arc Specified by Third Point Coordinates

MyTypes 1, 2, 4, and 5 all define the curve by three points. The three points are
the two end point of the frame object and a third point defined by naming an
existing point object or specifying point coordinates.
MyType 3 defines a circular curved frame by it end points, the coordinates of
another point that lies in the plane of the curve but not necessarily on the curved
frame, and a curve radius.
gx, gy, gz
These are arrays that include the point coordinates in the global coordinate
system. [L]
For MyType 1 and 4 these items do not apply.
For MyType 2 and 5 these are the coordinates of the third point on the curved
frame.
For MyType 3 these are the coordinates of the planar point that lies in the plane
of the curved frame.
PointName
This is an array that includes the name of the point object that is the third point
on the curved frame. This item applies for MyType 1 and 4. It does not apply for
MyType 2, 3 and 5.
Radius
This is an array of the radii of the circular curved frame. This item only applies
for MyType 3. [L]
NumSegs
This is an array that includes the number of segments into which the program
internally divides the curved frame.
Remarks
This function retrieves definition data for all curved frame objects and returns
the data in arrays.
The function returns zero if the curved frame object data is successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetCurvedFrames()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim NumberItems As Long
Dim MyType() As Long
Dim gx() As Double
Dim gy() As Double
Dim gz() As Double
Dim PointName() As String
Dim Radius() As Double
Dim NumSegs() As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'set frames curved


ret = SapModel.FrameObj.SetCurved("13", 1, 0, 0, 0, "1", 0,
16)
ret = SapModel.FrameObj.SetCurved("14", 2, -200, 0, 176, "",
0, 16)
ret = SapModel.FrameObj.SetCurved("15", 3, 0, 0, 0, "", 100,
16)
ret = SapModel.FrameObj.SetCurved("16", 4, 0, 0, 0, "3", 0,
16)
ret = SapModel.FrameObj.SetCurved("17", 5, 0, 0, 176, "", 0,
16)

'get curved frame data


ret = SapModel.FrameObj.GetCurved(NumberItems, MyType, gx,
gy, gz, PointName, Radius, NumSegs)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetStraight
SetCurved
GetType
GetEurocode12005 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetEurocode12005
VB6 Procedure
Function GetEurocode12005(ByVal Name As String, ByRef ExposureFrom As
Long, ByRef DirAngle As Double, ByRef Cpw As Double, ByRef Cpl As Double,
ByRef UserZ As Boolean, ByRef TopZ As Double, ByRef BottomZ As Double,
ByRef WindSpeed As Double, ByRef Terrain As Long, ByRef Orography As
Double, ByRef k1 As Double, ByRef CsCd As Double, ByRef UserExposure As
Boolean) As Long
Parameters
Name
The name of an existing Wind-type load pattern with a Eurocode 1 2005 auto
wind assignment.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The basic wind speed, vb, in meters per second.
Terrain
This is 0, 1, 2, 3 or 4, indicating the terrain category.
0= 0
1= I
2= II
3= III
4= IV
Orography
The orography factor, Co.
k1
The turbulence factor, k1.
CsCd
The structural factor, CsCd.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function retrieves auto wind loading parameters for Eurocode 1 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub GetWindEurocode12005()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ExposureFrom As Long
Dim DirAngle As Double
Dim Cpw As Double
Dim Cpl As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim WindSpeed As Double
Dim Terrain As Long
Dim Orography As Double
Dim k1 As Double
Dim CsCd As Double
Dim UserExposure As Boolean

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetEurocode12005("WIND", 1, 0, 0.8,
0.5, False, 0, 0, 35, 2, 1, 1, 1)

'get Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.GetEurocode12005("WIND",
ExposureFrom, DirAngle, Cpw, Cpl, UserZ, TopZ, BottomZ, WindSpeed,
Terrain, Orography, k1, CsCd, UserExposure)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by GetEurocode12005_1
as of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
SetEurocode12005
GetEurocode82004 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.GetEurocode82004
VB6 Procedure
Function GetEurocode82004(ByVal Name As String, ByRef DirFlag As Long,
ByRef Eccen As Double, ByRef PeriodFlag As Long, ByRef CT As Double,
ByRef UserT As Double, ByRef UserZ As Boolean, ByRef TopZ As Double,
ByRef BottomZ As Double, ByRef EURO2004GroundType As Long, ByRef
EURO2004SpectrumType As Long, ByRef EURO2004ag As Double, ByRef
EURO2004Beta As Double, ByRef EURO2004q As Double, ByRef
EURO2004Lambda As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern with a Eurocode 8 2004 auto
seismic load assignment.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified Ct factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1= A
2= B
3= C
4= D
5=E
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004ag
The design ground acceleration in g, ag.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
EURO2004Lambda
The correction factor, Lambda.
Remarks
This function retrieves auto seismic loading parameters for the Eurocode 8
2004 code.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetSeismicParametersEurocode82004()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim DirFlag As Long
Dim Eccen As Double
Dim PeriodFlag As Long
Dim CT As Double
Dim UserT As Double
Dim UserZ As Boolean
Dim TopZ As Double
Dim BottomZ As Double
Dim EURO2004GroundType As Long
Dim EURO2004SpectrumType As Long
Dim EURO2004ag As Double
Dim EURO2004Beta As Double
Dim EURO2004q As Double
Dim EURO2004Lambda As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetEurocode82004("EQX", 2, 0.1,
2, 0.075, 0, False, 0, 0, 2, 1, 0.4, 0.2, 2, 1)

'get Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.GetEurocode82004("EQX", DirFlag,
Eccen, PeriodFlag, CT, UserT, UserZ, TopZ, BottomZ,
EURO2004GroundType, EURO2004SpectrumType, EURO2004ag,
EURO2004Beta, EURO2004q, EURO2004Lambda)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by GetEurocode82004_1 as
of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
SetEurocode82004
GetEurocode82004 (Note: Newer function available)

Syntax
SapObject.SapModel.Func.FuncRS.GetEurocode82004
VB6 Procedure
Function GetEurocode82004(ByVal Name As String, ByRef
EURO2004GroundType As Long, ByRef EURO2004SpectrumType As Long,
ByRef EURO2004ag As Double, ByRef EURO2004Beta As Double, ByRef
EURO2004q As Double, ByRef DampRatio As Double) As Long
Parameters
Name
The name of a Eurocode 8 2004 response spectrum function.
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1= A
2= B
3= C
4= D
5= E
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004ag
The design ground acceleration in g, ag.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function retrieves the definition of a Eurocode 8 2004 response spectrum
function.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetRSFuncEurocode82004()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim EURO2004GroundType As Long
Dim EURO2004SpectrumType As Long
Dim EURO2004ag As Double
Dim EURO2004Beta As Double
Dim EURO2004q As Double
Dim DampRatio As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.SetEurocode82004("RS-1", 2, 1,
0.4, 0.2, 2, 0.04)

'get Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.GetEurocode82004("RS-1",
EURO2004GroundType, EURO2004SpectrumType, EURO2004ag,
EURO2004Beta, EURO2004q, DampRatio)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by GetEurocode82004_1 as
of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
SetEurocode82004
GetExposure
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.GetExposure
VB6 Procedure
Function GetExposure(ByVal Name As String, ByRef Num As Long, ByRef
Diaph() As String, ByRef x() As Double, ByRef y() As Double, ByRef MyWidth()
As Double, ByRef Height() As Double) As Long
Parameters
Name
The name of an existing Wind-type load pattern that has an auto wind load
assigned.
Num
The number of diaphragms at which exposure data is reported.
Diaph
This is an array that includes the names of the diaphragms that have eccentricity
overrides.
x
This is an array that includes the global X-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
y
This is an array that includes the global Y-coordinate of the point where the wind
force load is applied to the diaphragm. [L]
MyWidth
This is an array that includes the exposure width for the wind load applied to the
specified diaphragm. [L]
Height
This is an array that includes the exposure height for the wind load applied to the
specified diaphragm. [L]
Remarks
This function retrieves exposure parameters for auto wind loads determined
from extents of rigid diaphragms. This function does not apply for User-type auto
wind loads.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetWindExposure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Num As Long
Dim Diaph() As String
Dim x() As Double
Dim y() As Double
Dim MyWidth() As Double
Dim Height() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
'add new load pattern
ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True)

'assign user exposure data


ret = SapModel.LoadPatterns.AutoWind.SetExposure("WIND",
"Diaph2", 0, 0, 900, 125)

'get exposure data


ret = SapModel.LoadPatterns.AutoWind.GetExposure("WIND",
Num, Diaph, x, y, MyWidth, Height)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetExposure
GetSpecialRigidDiaphragmList
GetFireproofing
Syntax
SapObject.SapModel.FrameObj.GetFireproofing
VB6 Procedure
Function GetFireproofing(ByVal Name As String, ByRef MyType As Long, ByRef
Thickness As Double, ByRef Perimeter As Double, ByRef Density As Double,
ByRef tf As Boolean) As Long
Parameters
Name
The name of an existing frame object.
MyType
This is 1, 2 or 3, indicating the type of fireproofing assigned.
1 = Sprayed on - program calculate section perimeter
2 = Sprayed on - user provides section perimeter
3 = Concrete encased
Thickness
When MyType = 1 or MyType = 2 this is the thickness of the sprayed on
fireproofing. When MyType = 3 this is the concrete cover dimension. [L]
Perimeter
This item applies only when MyType = 2. It is the length of fireproofing applied
measured around the perimeter of the frame object cross-section. [L]
Density
This is the weight per unit volume of the fireproofing material. [F/L3]
tf
This item applies only when MyType = 1 or MyType = 3. If this item is True, the
fireproofing is assumed to be applied to the top flange of the section. If it is
False, the program assumes no fireproofing is applied to the section top flange.
This flag applies for I, channel and double channel sections.
Remarks
This function retrieves the fireproofing assignments to frame objects.
The function returns zero if the fireproofing assignments are successfully
retrieved, otherwise it returns a nonzero value.
VBA Example
Sub GetFireproofing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim Thickness As Double
Dim Perimeter As Double
Dim Density As Double
Dim tf As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign fireproofing
ret = SapModel.FrameObj.SetFireproofing("ALL", 1, 2, 0,
8.68E-06, False, Group)

'get fireproofing
ret = SapModel.FrameObj.GetFireproofing("3", MyType,
Thickness, Perimeter, Density, tf)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
See Also
SetFireproofing
DeleteFireproofing
GetFromFile (Note: Newer function available)

Syntax
SapObject.SapModel.Func.FuncTH.GetFromFile
VB6 Procedure
Function GetFromFile(ByVal Name As String, ByRef FileName As String, ByRef
HeadLines As Long, ByRef PreChars As Long, ByRef PointsPerLine As Long,
ByRef ValueType As Long, ByRef FreeFormat As Boolean, ByRef NumberFixed
As Long) As Long
Parameters
Name
The name of a defined time history function specified to be from a text file.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item applies only when the FreeFormat item is False. It is the number of
characters per item.
Remarks
This function retrieves the definition of a time history function from file.
The function returns zero if the function definition is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetTHFuncFromFile()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim HeadLines As Long
Dim PreChars As Long
Dim PointsPerLine As Long
Dim ValueType As Long
Dim FreeFormat As Boolean
Dim NumberFixed As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add TH function from file


ret = SapModel.Func.FuncTH.SetFromFile("TH-1",
"C:\SapAPI\FuncTH.txt", 3, 0, 3, 2, True)

'get TH function from file


ret = SapModel.Func.FuncTH.GetFromFile("TH-1", FileName,
HeadLines, PreChars, PointsPerLine, ValueType, FreeFormat,
NumberFixed)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncTH.txt used in the VBA
Example.
Time History Function
Time (sec) and Acceleration (g) values
3 points per line
0.00000 .01080 .04200 .00100 .09700 .01590
.16100 -.00010 .22100 .01890 .26300 .00010
.29100 .00590 .33200 -.00120 .37400 .02000
.42900 -.02370 .47100 .00760 .58100 .04250
.62300 .00940 .66500 .01380 .72000 -.00880
.72010 -.02560 .78900 -.03870 .78910 -.05680
.87200 -.02320 .87210 -.03430 .94100 -.04020
.94110 -.06030 .99700 -.07890 1.06600 -.06660
1.06610 -.03810 1.09400 -.04290 1.16800 .08970
1.31500 -.16960 1.38400 -.08280 1.41200 -.08280
1.44000 -.09450 1.48100 -.08850 1.50900 -.10800
1.53700 -.12800 1.62800 .11440 1.70300 .23550
1.80000 .14280 1.85500 .17770 1.92400 -.26100
2.00700 -.31940 2.21500 .29520 2.27000 .26340
2.32000 -.29840 2.39500 .00540 2.45000 .28650
2.51900 -.04690 2.57500 .15160 2.65200 .20770
2.70800 .10870 2.76900 -.03250 2.89300 .10330
2.97600 -.08030 3.06800 .05200 3.12900 -.15470
3.21200 .00650 3.25300 -.20600 3.38600 .19270
3.41900 -.09370 3.53000 .17080 3.59900 -.03590
3.66800 .03650 3.73800 -.07360 3.83500 .03110
3.90400 -.18330 4.01400 .02270 4.05600 -.04350
4.10600 .02160 4.22200 -.19720 4.31400 -.17620
4.41600 .14600 4.47100 -.00470 4.61800 .25720
4.66500 -.20450 4.75600 .06080 4.83100 -.27330
4.97000 .17790 5.03900 .03010 5.10800 .21830
5.19900 .02670 5.23300 .12520 5.30200 .12900
5.33000 .10890 5.34300 -.02390 5.45400 .17230
5.51000 -.10210 5.60600 .01410 5.69000 -.19490
5.77300 -.02420 5.80000 -.00500 5.80900 -.02750
5.86900 -.05730 5.88300 -.03270 5.92500 .02160
5.98000 .01080 6.01300 .02350 6.08500 -.06650
6.13200 .00140 6.17400 .04930 6.18800 .01490
6.18810 -.02000 6.22900 -.03810 6.27900 .02070
6.32600 -.00580 6.36800 -.06030 6.38200 -.01620
6.40900 .02000 6.45900 -.01760 6.47800 -.00330
6.52000 .00430 6.53400 -.00400 6.56200 -.00990
6.57500 -.00170 6.60300 -.01700 6.64500 .03730
6.68600 .04570 6.71400 .03850 6.72800 .00090
6.76900 -.02880 6.76910 .00160 6.81100 .01130
6.85200 .00220 6.90800 .00920 6.99100 -.09960
7.07400 .03600 7.12100 .00780 7.14300 -.02770
7.14900 .00260 7.17100 .02720 7.22600 .05760
7.29500 -.04920 7.37000 .02970 7.40600 .01090
7.42500 .01860 7.46100 -.02530 7.52500 -.03470
7.57200 .00360 7.60000 -.06280 7.64100 -.02800
7.66900 -.01960 7.69100 .00680 7.75200 -.00540
7.79400 -.06030 7.83500 -.03570 7.87700 -.07160
7.96000 -.01400 7.98700 -.00560 8.00100 .02220
8.07000 .04680 8.12600 .02600 8.12610 -.03350
8.19500 -.01280 8.22300 .06610 8.27800 .03050
8.33400 .02460 8.40300 .03470 8.45800 -.03690
8.53300 -.03440 8.59600 -.01040 8.63800 -.02600
8.73500 .15340 8.81800 -.00280 8.86000 .02330
8.88200 -.02610 8.91500 -.00220 8.95600 -.18490
9.05300 .12600 9.09500 .03200 9.12300 .09550
9.15000 .12460 9.25300 -.03280 9.28900 -.04510
9.42700 .13010 9.44100 -.16570 9.51000 .04190
9.63500 -.09360 9.70400 .08160 9.81500 -.08810
9.89800 .00640 9.93900 -.00060 9.99500 .05860
10.02200 -.07130 10.05000 -.04480 10.05010 -.02210
10.10500 .00930 10.10510 .00240 10.18800 .05100
10.27200 -.12430 10.38200 .05870 10.42400 .01330
10.45200 .03860 10.46500 .11640 10.50700 -.03740
10.53400 -.05720 10.64500 .03080 10.70100 .02230
10.71400 .05150 10.77000 .09030 10.83900 -.01940
10.92200 .04710 10.92210 -.06770 10.96400 -.07940
10.99100 -.01200 11.07400 .06080 11.08800 -.02690
11.11600 -.04160 11.20700 .02930 11.20710 .05520
11.22700 .07560 11.26800 .04310 11.32400 .02080
11.43400 .11800 11.57300 -.09990 11.65600 -.12470
11.72500 -.20940 11.72510 -.14180 11.78000 -.11630
11.80800 0.00000 11.87700 .07620 11.91900 .05700
11.98800 .13540 12.04300 .06730 12.11300 .08650
Release Notes
Initial release in version 11.02.
The function is obsolete and has been superceded by GetFromFile_1 as of
version 14.12. This function is maintained for backward compatibility. New
function added.
See Also
SetFromFile
GetMassSource
Syntax
SapObject.SapModel.PropMaterial.GetMassSource
VB6 Procedure
Function GetMassSource(ByRef MyOption As Long, ByRef NumberLoads As
Long, ByRef LoadPat() As String, ByRef sf() As Double) As Long
Parameters
MyOption
This is 1, 2 or 3, indicating the mass source option.
1 = From element self mass and additional masses
2 = From loads
3 = From element self mass and additional masses and loads
NumberLoads
The number of load patterns from which mass is obtained. This item applies only
when MyOption is 2 or 3.
LoadPat
This is an array of the names of the load patterns from which mass is obtained.
This item applies only when MyOption is 2 or 3.
sf
This is an array of load patterns multipliers used to calculate the mass. This item
applies only when MyOption is 2 or 3.
Remarks
This function retrieves the mass source for the model.
The function returns zero if the mass source is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub RetrieveMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadPat() As String
Dim MySF() As Double
Dim MyOption As Long
Dim NumberLoads As Long
Dim LoadPat() As String
Dim sf() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("SDL", LTYPE_SUPERDEAD)

'add new load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set mass source


ReDim MyLoadPat(2)
ReDim MySF(2)
MyLoadPat(0) = "DEAD"
MyLoadPat(1) = "SDL"
MyLoadPat(2) = "LIVE"
MySF(0) = 1
MySF(1) = 0.2
MySF(2) = 0.25
ret = SapModel.PropMaterial.SetMassSource(3, 3, MyLoadPat,
MySF)

'get mass source


ret = SapModel.PropMaterial.GetMassSource(MyOption,
NumberLoads, LoadPat, sf)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
SetMassSource
GetModalComb (Note: Newer function available)

Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.GetModalComb
VB6 Procedure
Function GetModalComb(ByVal Name As String, ByRef MyType As Long, ByRef
F1 As Double, ByRef F2 As Double, ByRef td As Double) As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, 3, 4, 5 or 6, indicating the modal combination option.
1= CQC
2= SRSS
3= ABS
4= GMC
5= 10 percent
6= Double sum
F1
This item applies only when MyType = 4. It is the GMC f1 factor. [cyc/s]
F2
This item applies only when MyType = 4. It is the GMC f2 factor. [cyc/s]
td
This item applies only when MyType = 6. It is the factor td. [s]
Remarks
This function retrieves the modal combination option assigned to the specified
load case.
The function returns zero if the option is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseResponseSpectrumModalComb()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim MyType As Long
Dim F1 As Double
Dim F2 As Double
Dim td As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'get modal combination option


ret =
SapModel.LoadCases.ResponseSpectrum.GetModalComb("LCASE1", MyType,
F1, F2, td)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
The function is obsolete and has been superceded by GetModalComb_1 as of
version 14.00. This function is maintained for backward compatibility. New
function added
See Also
SetModalComb
GetOSteel (Note: Newer function available)

Syntax
SapObject.SapModel.PropMaterial.GetOSteel
VB6 Procedure
Function GetOSteel(ByVal Name As String, ByRef Fy As Double, ByRef Fu As
Double, ByRef eFy As Double, ByRef eFu As Double, ByRef SSType As Long,
ByRef SSHysType As Long, ByRef StrainAtHardening As Double, ByRef
StrainAtMaxStress As Double, ByRef StrainAtRupture As Double, Optional
ByVal Temp As Double = 0) As Long
Parameters
Name
The name of an existing steel material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
eFy
The expected yield stress. [F/L2]
eFu
The expected tensile stress. [F/L2]
SSType
This is 0 or 1. indicating the stress-strain curve type.
0 = User defined
1 = Parametric - Simple
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
StrainAtHardening
This item applies only to parametric stress-strain curves. It is the strain at the
onset of strain hardening.
StrainAtMaxStress
This item applies only to parametric stress-strain curves. It is the strain at
maximum stress.
StrainAtRupture
This item applies only to parametric stress-strain curves. It is the strain at
rupture.
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for steel materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not steel.
VBA Example
Sub GetMatPropSteelData()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim eFy As Double
Dim eFu As Double
Dim SSType As Long
Dim SSHysType As Long
Dim StrainAtHardening As Double
Dim StrainAtMaxStress As Double
Dim StrainAtRupture As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Steel",
MATERIAL_STEEL)

'assign other properties


ret = SapModel.PropMaterial.SetOSteel("Steel", 55, 68, 60,
70, 1, 2, 0.02, 0.1, 0.2)

'get other properties


ret = SapModel.PropMaterial.GetOSteel("Steel", Fy, Fu, eFy,
eFu, SSType, SSHysType, StrainAtHardening, StrainAtMaxStress,
StrainAtRupture)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
This function is obsolete and has been superceded by GetOSteel_1 as of
version 12.00. This function is maintained for backwards compatibility.
See Also
SetOSteel
GetOTendon (Note: Newer function available)

Syntax
SapObject.SapModel.PropMaterial.GetOTendon
VB6 Procedure
Function GetOTendon(ByVal Name As String, ByRef Fy As Double, ByRef Fu
As Double, ByRef SSType As Long, ByRef SSHysType As Long, Optional ByVal
Temp As Double = 0) As Long
Parameters
Name
The name of an existing tendon material property.
Fy
The minimum yield stress. [F/L2]
Fu
The minimum tensile stress. [F/L2]
SSType
This is 0, 1 or 2, indicating the stress-strain curve type.
0 = User defined
1 = Parametric 250 ksi strand
2 = Parametric 270 ksi strand
SSHysType
This is 0, 1 or 2, indicating the stress-strain hysteresis type.
0 = Elastic
1 = Kinematic
2 = Takeda
Temp
This item applies only if the specified material has properties that are
temperature dependent. That is, it applies only if properties are specified for the
material at more than one temperature.
This item is the temperature at which the specified data is to be retrieved. The
temperature must have been defined previously for the material.
Remarks
This function retrieves the other material property data for tendon materials.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value. The function returns an error if the specified material is
not tendon.
VBA Example
Sub GetMatPropTendonData()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Fy As Double
Dim Fu As Double
Dim SSType As Long
Dim SSHysType As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'initialize new material property


ret = SapModel.PropMaterial.SetMaterial("Tendon",
MATERIAL_TENDON)

'assign other properties


ret = SapModel.PropMaterial.SetOTendon("Tendon", 230, 255,
1, 1)

'get other properties


ret = SapModel.PropMaterial.GetOTendon("Tendon", Fy, Fu,
SSType, SSHysType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
This function is obsolete and has been superceded by GetOTendon_1 as of
version 12.00. This function is maintained for backwards compatibility.
See Also
SetOTendon
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI318_05_IBC2003.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Nonsway moment factor, Dns Major
10 = Nonsway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemACI318_05_IBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-05/IBC2003")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.ACI318_05_IBC2003.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_02.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemACI_318_02()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-02")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.ACI_318_02.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_99.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = No-nsway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemACI_318_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-99")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.ACI_318_99.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_01.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, km Major
8 = Moment coefficient, km Minor
9 = Nonsway moment factor, Db Major
10 = Nonsway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor

Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, km Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, km Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemAS_3600_01()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-01")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.AS_3600_01.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.BS8110_89.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemBS8110_89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 89")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.BS8110_89.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2002.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 18, inclusive, indicating the overwrite item
considered.
1 = Seismic design grade
2 = Dual system SMF
3 = MMF
4 = SMF
5 = AFMF
6 = Column location
7 = Transfer beam of column
8 = Corner column seismic modification
9 = Beam gravity neg moment red factor
10 = Unbraced length ratio, Major
11 = Unbraced length ratio, Minor
12 = Effective length factor, K Major
13 = Effective length factor, K Minor
14 = Torsion modification factor
15 = Torsion design factor, Zeta
16 = Concrete cover for closed stirrup
17 = Effective length factor for gravity, K Major
18 = Effective length factor for gravity, K Minor
Value
The value of the considered overwrite item.
1 = Seismic design grade
0 = As specified in preferences
1 = Seismic Super I
2 = Seismic Class I
3 = Seismic Class II
4 = Seismic Class III
5 = Seismic Class IV
6 = NonSeismic

2 = Dual system SMF


Value >= 0; 0 means use program determined value.

3 = MMF
Value >= 0; 0 means use program determined value.
4 = SMF
Value >= 0; 0 means use program determined value.

5 = AFMF
Value >= 0; 0 means use program determined value.

6 = Column Location
1 = Center Column
2 = Side Column
3 = Corner Column
4 = End Column
5 = Individual Column

7 = Transfer beam or column


0 = Program Determined
1 = No
2 = Yes

8 = Corner column seismic modification


0 = Program Determined
1 = No
2 = Yes

9 = Beam gravity neg moment red factor


Value >= 0; 0 means use program determined value.

10 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

11 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

12 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

13 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

14 = Torsion modification factor


Value >= 0; 0 means use program determined value.

15 = Torsion design factor, Zeta


Value >= 0; 0 means use program determined value.

16 = Concrete cover for closed stirrup


Value >= 0; 0 means use program determined value.

17 = Effective length factor for gravity, K Major


Value >= 0; 0 means use program default value.
18 = Effective length factor for gravity, K Minor
Value >= 0; 0 means use program default value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Chinese 2002")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.Chinese_2002.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 17 and 18 in Version 14.0.0.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_94.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Db Major
10 = Non-sway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Nominal
3 = Ordinary

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemCSA_A23_3_94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA-A23.3-94")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.CSA_A23_3_94.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.EUROCODE_2_1992.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemEUROCODE_2_1992()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("EUROCODE 2-1992")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.EUROCODE_2_1992.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2004.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemHong_Kong_CP_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2004")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2004.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Italian_DM_14_2_92.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Amplification Coefficient, Omega Major
8 = Amplification Coefficient, Omega Minor
9 = Moment coefficient, c Major
10 = Moment coefficient, c Minor
11 = Moment coefficient, c_sway Major
12 = Moment coefficient, c_sway Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Braced

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.
7 = Amplification coefficient, Omega Major
Value >= 0; 0 means use program determined value.

8 = Amplification coefficient, Omega Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, c Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, c Minor


Value >= 0; 0 means use program determined value.

11 = Moment coefficient, c_sway Major


Value >= 0; 0 means use program determined value.

12 = Moment coefficient, c_sway Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemItalian_DM_14_2_92()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Italian DM 14-2-92")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Italian_DM_14_2_92.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Mexican_RCDF_2001.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, k Major
6 = Effective length factor, k Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Fab Major
10 = Non-sway moment factor, Fab Minor
11 = Sway moment factor, Fas Major
12 = Sway moment factor, Fas Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway ordinary
3 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, k Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, k Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Fab Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Fab Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Fas Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Fas Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemMexican_RCDF_2001()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Mexican RCDF 2001")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret =
SapModel.DesignConcrete.Mexican_RCDF_2001.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.NZS_3101_95.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Db Major
10 = Non-sway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Limited
3 = Elastic
4 = Ordinary

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemNZS_3101_95 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("NZS 3101-95")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.NZS_3101_95.GetOverwrite("8",
1, Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.UBC97.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a concrete frame design procedure.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a concrete design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignOverwriteItemUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("UBC97")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start concrete design


ret = SapModel.DesignConcrete.StartDesign

'get overwrite item


ret = SapModel.DesignConcrete.UBC97.GetOverwrite("8", 1,
Value, ProgDet)
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD01.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Yield stress, Fy
26 = Compressive stress, Fa
27 = Tensile stress, Ft
28 = Major bending stress, Fb3
29 = Minor bending stress, Fb2
30 = Major shear stress, Fv2
31 = Minor shear stress, Fv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]
26 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

27 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

28 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

29 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC_ASD01()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD01")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.AISC_ASD01.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD99.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 37, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Non-sway moment factor, B1 Major
26 = Non-sway moment factor, B1 Minor
27 = Sway moment factor, B2 Major
28 = Sway moment factor, B2 Minor
29 = Yield stress, Fy
30 = Expected to specified Fy ratio, Ry
31 = Compressive capacity, phi*Pnc
32 = Tensile capacity, phi*Pnt
33 = Major bending capacity, phi*Mn3
34 = Minor bending capacity, phi*Mn2
35 = Major shear capacity, phi*Vn2
36 = Minor shear capacity, phi*Vn3
37 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.
10 = DL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

26 = Non-sway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

29 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

30 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

31 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

32 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

33 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

34 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

35 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

36 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

37 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemAISC_LRFD99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD99")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.AISC_LRFD99.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.BS5950_90.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Uniform moment factor, m Major
22 = Uniform moment factor, m Minor
23 = Slenderness correction factor, n
24 = Yield stress, Fy
25 = Compressive capacity, Pc
26 = Tensile capacity, Pt
27 = Major bending capacity, Mc3
28 = Minor bending capacity, Mc2
29 = Buckling resistance moment, Mb
30 = Major shear capacity, Pv2
31 = Minor shear capacity, Pv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Uniform moment factor, m Major


Value >= 0; 0 means use program determined value.

22 = Uniform moment factor, m Minor


Value >= 0; 0 means use program determined value.

23 = Slenderness correction factor, n


Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pc
Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pt
Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Mc3


Value >= 0; 0 means use program determined value. [FL]

28 = Minor bending capacity, Mc2


Value >= 0; 0 means use program determined value. [FL]

29 = Buckling resistance moment, Mb


Value >= 0; 0 means use program determined value. [FL]

30 = Major shear capacity, Pv2


Value >= 0; 0 means use program determined value. [F]

31 = Minor shear capacity, Pv3


Value >= 0; 0 means use program determined value. [F]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemBS5950_90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 90")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.BS5950_90.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_01.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 39, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor LTB
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K LTB
23 = Moment coefficient, Omega1 Major
24 = Moment coefficient, Omega1 Minor
25 = Bending coefficient, Omega2
26 = Nonsway moment factor, U1 Major
27 = Nonsway moment factor, U1 Minor
28 = Sway moment factor, U2 Major
29 = Sway moment factor, U2 Minor
30 = Parameter for compressive resistance, n
31 = Yield stress, Fy
32 = Expected to specified Fy ratio, Ry
33 = Compressive resistance, Cr
34 = Tensile resistance, Tr
35 = Major bending resistance, Mr3
36 = Minor bending resistance, Mr2
37 = Major shear resistance, Vr2
38 = Minor shear resistance, Vr3
39 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

2 = Consider deflection
0 = No
Any other value = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L}

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
21 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

22 = Effective length factor, K LTB


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, Omega2


Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

27 = Nonsway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, U2 Major


Value >= 0; 0 means use program determined value.

29 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

30 = Parameter for compressive resistance, n


Value >= 0; 0 means use program determined value.

31 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

32 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value. [F/L2]=

33 = Compressive resistance, Cr
Value >= 0; 0 means use program determined value. [F]

34 = Tensile resistance, Tr
Value >= 0; 0 means use program determined value. [F]
35 = Major bending resistance, Mr3
Value >= 0; 0 means use program determined value. [FL]

36 = Minor bending resistance, Mr2


Value >= 0; 0 means use program determined value. [FL]

37 = Major shear resistance, Vr2


Value >= 0; 0 means use program determined value. [F]

38 = Minor shear resistance, Vr3


Value >= 0; 0 means use program determined value. [F]

39 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemCanadian_S16_01 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CAN/CSA-S16-01")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Canadian_S16_01.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Chinese_2002.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 51, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Element type
3 = Is transfer column
4 = Seismic magnification factor
5 = Is rolled section
6 = Is flange edge cut by gas
7 = Is both end pinned
8 = Ignore b/t check
9 = Classify beam as flexo-compression member
10 = Is beam top loaded
11 = Consider deflection
12 = Deflection check type
13 = DL deflection limit, L/Value
14 = SDL + LL deflection limit, L/Value
15 = LL deflection limit, L/Value
16 = Total load deflection limit, L/Value
17 = Total camber limit, L/Value
18 = DL deflection limit, absolute
19 = SDL + LL deflection limit, absolute
20 = LL deflection limit, absolute
21 = Total load deflection limit, absolute
22 = Total camber limit, absolute
23 = Specified camber
24 = Net area to total area ratio
25 = Live load reduction factor
26 = Unbraced length ratio, Major
27 = Unbraced length ratio, Minor Lateral Torsional Buckling
28 = Effective length factor, Mue Major
29 = Effective length factor, Mue Minor
30 = Moment coefficient, Beta_m Major
31 = Moment coefficient, Beta_m Minor
32 = Moment coefficient, Beta_t Major
33 = Moment coefficient, Beta_t Minor
34 = Axial stability coefficient, Phi Major
35 = Axial stability coefficient, Phi Minor
36 = Flexural stability coeff, Phi_bMajor
37 = Flexural stability coeff, Phi_bMinor
38 = Plasticity factor, Gamma Major
39 = Plasticity factor, Gamma Minor
40 = Section influence coefficient, Eta
41 = B/C capacity factor, Eta
42 = Euler moment factor, Delta Major
43 = Euler moment factor, Delta Minor
44 = Yield stress, Fy
45 = Allowable normal stress, f
46 = Allowable shear stress, fv
47 = Consider fictitious shear
48 = Demand/capacity ratio limit
49 = Dual system magnification factor
50 = Lo/r limit in compression
51 = L/r limit in tension
Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Element type
0 = Program Determined
1 = Column
2 = Beam
3 = Brace
4 = Truss

3 = Is transfer column
0 = Program Determined
1 = No
2 = Yes

4 = Seismic magnification factor


Value >= 0; 0 means no check for this item.

5 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

6 = Is flange edge cut by gas


0 = Program Determined
1 = No
2 = Yes

7 = Is both end pinned


0 = Program Determined
1 = No
2 = Yes

8 = Ignore b/t check


0 = Program Determined
1 = No
2 = Yes

9 = Classify beam as flexo-compression member


0 = Program Determined
1 = No
2 = Yes

10 = Is beam top loaded


0 = Program Determined
1 = No
2 = Yes

11 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

12 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

13 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

14 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

15 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

16 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

17 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

18 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

19 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

20 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

21 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

22 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

23 = Specified camber
Value >= 0. [L]

24 = Net area to total area ratio


Value >= 0; 0 means use program default value.

25 = Live load reduction factor


Value >= 0; 0 means use program determined value.

26 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

27 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

28 = Effective length factor, Mue Major


Value >= 0; 0 means use program determined value.
29 = Effective length factor, Mue Minor
Value >= 0; 0 means use program determined value.

30 = Moment coefficient, Beta_m Major


Value >= 0; 0 means use program determined value.

31 = Moment coefficient, Beta_m Minor


Value >= 0; 0 means use program determined value.

32 = Moment coefficient, Beta_t Major


Value >= 0; 0 means use program determined value.

33 = Moment coefficient, Beta_t Minor


Value >= 0; 0 means use program determined value.

34 = Axial stability coefficient, Phi Major


Value >= 0; 0 means use program determined value.

35 = Axial stability coefficient, Phi Minor


Value >= 0; 0 means use program determined value.

36 = Flexural stability coefficient, Phi_b Major


Value >= 0; 0 means use program determined value.

37 = Flexural stability coefficient, Phi_b Minor


Value >= 0; 0 means use program determined value.

38 = Plasticity factor, Gamma Major


Value >= 0; 0 means use program determined value.

39 = Plasticity factor, Gamma Minor


Value >= 0; 0 means use program determined value.

40 = Section influence coefficient, Eta


Value >= 0; 0 means use program determined value.

41 = B/C capacity factor, Eta


Value >= 0; 0 means use program determined value.

42 = Euler moment factor, Delta Major


Value >= 0; 0 means use program determined value.
43 = Euler moment factor, Delta Minor
Value >= 0; 0 means use program determined value.

44 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

45 = Allowable normal stress, f


Value >= 0; 0 means use program determined value. [F/L2]

46 = Allowable shear stress, fv


Value >= 0; 0 means use program determined value. [F/L2]

47 = Consider fictitious shear


0 = Program Determined
1 = No
2 = Yes

48 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
49 = Dual system magnification factor
Value >= 0; 0 means use program default value.
50 = Lo/r limit in compression
Value >= 0; 0 means use program determined value.
51 = L/r limit in tension
Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2002")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.Chinese_2002.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 49, 50, and 51 in Version 14.0.0.
Modified Item 1 and added Truss to Item 2 in version 14.1.0.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.CISC_95.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 35, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Omega1 Major
22 = Moment coefficient, Omega1 Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, U1 Major
25 = Non-sway moment factor, U1 Minor
26 = Sway moment factor, U2 Major
27 = Sway moment factor, U2 Minor
28 = Yield stress, Fy
29 = Compressive capacity, Cr
30 = Tensile capacity, Tr
31 = Major bending capacity, Mr3
32 = Minor bending capacity, Mr2
33 = Major shear capacity, Vr2
34 = Minor shear capacity, Vr3
35 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Omega2


Value >= 0; 0 means use program determined value.

24 = Nonsway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

25 = Nonsway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.

26 = Sway moment factor, U2 Major


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Cr
Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Tr
Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mr3


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mr2


Value >= 0; 0 means use program determined value. [FL]

33 = Major shear capacity, Vr2


Value >= 0; 0 means use program determined value. [F]

34 = Minor shear capacity, Vr3


Value >= 0; 0 means use program determined value. [F]

35 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemCISC_95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CISC 95")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.CISC_95.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.EUROCODE_3_1993.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, k Lateral Torsional Buckling
25 = Non-sway moment factor
26 = Sway moment factor, Psi Major
27 = Sway moment factor, Psi Minor
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, k Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor


Value >= 0; 0 means use program determined value.
26 = Sway moment factor, Psi Major
Value >= 0; 0 means use program determined value.

27 = Sway moment factor, Psi Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, Vn2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, Vn3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemEUROCODE_3_1993()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("EUROCODE 3-1993")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.EUROCODE_3_1993.GetOverwrite("8",
1, Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.INDIAN_IS_800_1998.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 34, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K Lateral Torsional Buckling
23 = Moment coefficient, Cm Major
24 = Moment coefficient, Cm Minor
25 = Yield stress, Fy
26 = Allowable compressive stress, Sigma_ac
27 = Allowable tensile stress, Sigma_at
28 = Allowable major bending stress, Sigma_bc33
29 = Allowable minor bending stress, Sigma_bc22
30 = Major average shear stress, Tau_va2
31 = Minor average shear stress, Tau_va3
32 = Maximum elastic shear stress, Tau_vm
33 = Allowable effective stress, Sigma_e
34 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway Frame
2 = Nonsway Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Allowable compressive stress, Sigma_ac


Value >= 0; 0 means use program determined value. [F/L2]
27 = Allowable tensile stress, Sigma_at
Value >= 0; 0 means use program determined value. [F/L2]

28 = Allowable major bending stress, Sigma_bc33


Value >= 0; 0 means use program determined value. [F/L2]

29 = Allowable minor bending stress, Sigma_bc22


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major average shear stress, Tau_va2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor average shear stress, Tau_va3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Maximum elastic shear stress, Tau_vm


Value >= 0; 0 means use program determined value. [F/L2]

33 = Allowable effective stress, Sigma_e


Value >= 0; 0 means use program determined value. [F/L2]

34 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemINDIAN_IS_800_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-1998")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.INDIAN_IS_800_1998.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.ITALIAN_UNI_10011.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 26, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Axial load amplification(Omega)
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, Beta Major
21 = Effective length factor, Beta Minor
22 = Moment coefficient, Meq/Mmax Major
23 = Moment coefficient, Meq/Mmax Minor
24 = LTB moment coefficient (Omega1)
25 = Yield stress, Fy
26 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway Frame
2 = NonSway Frame

2 = Axial load amplification(Omega)


Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]
15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Meq/Mmax Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Meq/Mmax Minor


Value >= 0; 0 means use program determined value.

24 = LTB moment coefficient (Omega1)


Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemITALIAN_UNI_10011()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ITALIAN UNI 10011")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret =
SapModel.DesignSteel.ITALIAN_UNI_10011.GetOverwrite("8", 1, Value,
ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.UBC97_ASD.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRef ProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Yield stress, Fy
26 = Compressive stress, Fa
27 = Tensile stress, Ft
28 = Major bending stress, Fb3
29 = Minor bending stress, Fb2
30 = Major shear stress, Fv2
31 = Minor shear stress, Fv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

27 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

28 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

29 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemUBC97_ASD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-ASD")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.UBC97_ASD.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetOverwrite
Syntax
SapObject.SapModel.DesignSteel.UBC97_LRFD.GetOverwrite
VB6 Procedure
Function GetOverwrite(ByVal Name As String, ByVal Item As Long, ByRef Value
As Double, ByRefProgDet As Boolean) As Long
Parameters
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Non-sway moment factor, B1 Major
26 = Non-sway moment factor, B1 Minor
27 = Sway moment factor, B2 Major
28 = Sway moment factor, B2 Minor
29 = Yield stress, Fy
30 = Compressive capacity, phi*Pnc
31 = Tensile capacity, phi*Pnt
32 = Major bending capacity, phi*Mn3
33 = Minor bending capacity, phi*Mn2
34 = Major shear capacity, phi*Vn2
35 = Minor shear capacity, phi*Vn3
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
11 = SDL + LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.
25 = Nonsway moment factor, B1 Major
Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

29 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

30 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

31 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

32 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

33 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ProgDet
If this item is True, the specified value is program determined.
Remarks
This function retrieves the value of a steel design overwrite item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignOverwriteItemUBC97_LRFD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double
Dim ProgDet As Boolean

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-LRFD")

'run analysis
ret = SapModel.File.Save("C:\SapAPI\x.sdb")
ret = SapModel.Analyze.RunAnalysis

'start steel design


ret = SapModel.DesignSteel.StartDesign

'get overwrite item


ret = SapModel.DesignSteel.UBC97_LRFD.GetOverwrite("8", 1,
Value, ProgDet)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
SetOverwrite
GetPrecastI (Note: Newer function available)
Syntax
SapObject.SapModel.PropFrame.GetPrecastI
VB6 Procedure
Function GetPrecastI(ByVal Name As String, ByRef FileName As String, ByRef
MatProp As String, ByRef b() As Double, ByRef d() As Double, ByRef Color As
Long, ByRef Notes As String, ByRef GUID As String) As Long
Parameters
Name
The name of an existing precast concrete I girder frame section property.
FileName
If the section property was imported from a property file, this is the name of that
file. If the section property was not imported, this item is blank.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 3, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (> 0)
b(3) = B4 (>= 0)
Section dimensions B1 through B4 are defined on the precast concrete I girder
definition form.
d
This is an array, dimensioned to 5, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (>= 0)
d(5) = D6 (> 0)
Section dimensions D1 through D6 are defined on the precast concrete I girder
definition form.
Color
The display color assigned to the section.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section.
Remarks
This function retrieves frame section property data for a precast concrete I
girder frame section.
The function returns zero if the section property data is successfully retrieved;
otherwise it returns a nonzero value.
VBA Example
Sub GetFramePropPrecastI()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim FileName As String
Dim MatProp As String
Dim bb() As Double
Dim dd() As Double
Dim b() As Double
Dim d() As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ReDim bb(3)
ReDim dd(5)
bb(0) = 16
bb(1) = 22
bb(2) = 7
bb(3) = 0
dd(0) = 45
dd(1) = 7
dd(2) = 4.5
dd(3) = 0
dd(4) = 7.5
dd(5) = 7
ret = SapModel.PropFrame.SetPrecastI("PC1", "4000Psi", bb,
dd)

'get frame section property data


ret = SapModel.PropFrame.GetPrecastI("PC1", FileName,
MatProp, b, d, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
This function is obsolete and has been superceded by GetPrecast_1 as of
version 17.2.0. This function is maintained for backward compatibility.
See Also
SetPrecastI
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI318_05_IBC2003.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0

9 = Phi shear seismic


Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemACI318_05_IBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-05/IBC2003")

'get preference item


ret =
SapModel.DesignConcrete.ACI318_05_IBC2003.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_02.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0
9 = Phi shear seismic
Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemACI_318_02()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-02")

'get preference item


ret = SapModel.DesignConcrete.ACI_318_02.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_99.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending torsion
5 = Phi compression controlled tied
6 = Phi compression controlled spiral
7 = Phi shear
8 = Pattern live load factor
9 = Utilization factor limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending torsion


Value > 0

5 = Phi compression controlled tied


Value > 0

6 = Phi compression controlled spiral


Value > 0

7 = Phi shear
Value > 0

8 = Pattern live load factor


Value >= 0
9 = Utilization factor limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemACI_318_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-99")

'get preference item


ret = SapModel.DesignConcrete.ACI_318_99.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_01.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi tension controlled
5 = Phi compression controlled
6 = Phi shear and/or torsion
7 = Phi shear seismic
8 = Phi joint shear
9 = Pattern live load factor
10 = Utilization factor limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi tension controlled


Value > 0

5 = Phi compression controlled


Value > 0

6 = Phi shear and/or torsion


Value > 0

7 = Phi shear seismic


Value > 0

8 = Phi joint shear


Value > 0
9 = Pattern live load factor
Value >= 0

10 = Utilization factor limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemAS_3600_01()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-01")

'get preference item


ret = SapModel.DesignConcrete.AS_3600_01.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.BS8110_89.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 6, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Pattern live load factor
5= Utilization factor limit
6= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Pattern live load factor


Value >= 0

5 = Utilization factor limit


Value > 0

6 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemBS8110_89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 89")

'get preference item


ret = SapModel.DesignConcrete.BS8110_89.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2002.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Importance factor gamma 0
4 = Column design procedure
5 = Seismic design grade
6 = Pattern live load factor
7 = Utilization factor limit
8 = Multi-response case design
9 = Structural system
10 = Is tall building?
11 = Seismic field type
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Importance factor gamma 0


Value > 0

4 = Column design procedure


1 = Appendix F
2 = Simplified

5 = Seismic design grade


1 = Super I
2 = Grade I
3 = Grade II
4 = Grade III
5 = Grade IV
6 = Nonseismic

6 = Pattern live load factor


Value >= 0
7 = Utilization factor limit
Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

9 = Structural system
1 = Frame only
2 = Shearwall only
3 = Frame-shearwall
4 = Braced frame only
5 = Frame-braced frame
10 = Is tall building?
0 = No
1 = Yes
11 = Seismic field type
1=I
2 = II
3 = III
4 = IV
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Chinese 2002")

'get preference item


ret = SapModel.DesignConcrete.Chinese_2002.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 9, 10, and 11 in Version 14.0.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_94.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 8, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Phi steel
5= Phi concrete
6= Pattern live load factor
7= Utilization factor limit
8= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi steel
Value > 0

5 = Phi concrete
Value > 0

6 = Pattern live load factor


Value >= 0

7 = Utilization factor limit


Value > 0

8 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemCSA_A23_3_94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("CSA-A23.3-94")

'get preference item


ret = SapModel.DesignConcrete.CSA_A23_3_94.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.EUROCODE_2_1992.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Nu
5= Gamma steel
6= Gamma concrete
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Nu
Value > 0

5 = Gamma steel
Value > 0

6 = Gamma concrete
Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemEUROCODE_2_1992()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("EUROCODE 2-1992")

'get preference item


ret =
SapModel.DesignConcrete.EUROCODE_2_1992.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2004.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 9, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Consider minimum eccentricity
4= Gamma steel
5= Gamma concrete
6= Gamma concrete shear
7= Pattern live load factor
8= Utilization factor limit
9= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Gamma steel
Value > 0

5 = Gamma concrete
Value > 0

6 = Gamma concrete shear


Value > 0

7 = Pattern live load factor


Value >= 0

8 = Utilization factor limit


Value > 0

9 = Multi-response case design


1= Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemHong_Kong_CP_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2004")

'get preference item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2004.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Italian_DM_14_2_92.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 5, inclusive, indicating the preference item
considered.
1= Number of interaction curves
2= Number of interaction points
3= Pattern live load factor
4= Utilization factor limit
5= Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Pattern live load factor


Value >= 0

4 = Utilization factor limit


Value > 0

5 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemItalian_DM_14_2_92()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Italian DM 14-2-92")

'get preference item


ret =
SapModel.DesignConcrete.Italian_DM_14_2_92.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.Mexican_RCDF_2001.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending
5 = Phi tension
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear
9 = Pattern live load factor
10 = Utilization factor limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending
Value > 0

5 = Phi tension
Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear
Value > 0
9 = Pattern live load factor
Value >= 0

10 = Utilization factor limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemMexican_RCDF_2001()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Mexican RCDF 2001")

'get preference item


ret =
SapModel.DesignConcrete.Mexican_RCDF_2001.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.NZS_3101_95.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending
5 = Phi tension
6 = Phi compression
7 = Phi shear
8 = Omega
9 = Phi 0
10 = Rm
11 = Rv
12 = Pattern live load factor
13 = Utilization factor limit
14 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending
Value > 0

5 = Phi tension
Value > 0

6 = Phi compression
Value > 0

7 = Phi shear
Value > 0
8 = Omega
Value > 0

9 = Phi 0
Value > 0

10 = Rm
Value > 0

11 = Rv
Value > 0

12 = Pattern live load factor


Value >= 0

13 = Utilization factor limit


Value > 0

14 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemNZS_3101_95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("NZS 3101-95")

'get preference item


ret = SapModel.DesignConcrete.NZS_3101_95.GetPreference(2,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignConcrete.UBC97.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Phi bending tension
5 = Phi compression controlled tied
6 = Phi compression controlled spiral
7 = Phi shear
8 = Pattern live load factor
9 = Utilization factor limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Phi bending tension


Value > 0

5 = Phi compression controlled tied


Value > 0

6 = Phi compression controlled spiral


Value > 0

7 = Phi shear
Value > 0

8 = Pattern live load factor


Value >= 0
9 = Utilization factor limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a concrete design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetConcreteDesignPreferenceItemUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("UBC97")

'get preference item


ret = SapModel.DesignConcrete.UBC97.GetPreference(2, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD01.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design capacity
3 = Ignore seismic code
4 = Ignore special seismic load
5 = Isdoubler plate plug-welded
6 = Consider deflection
7 = DL deflection limit, L/Value
8 = SDL + LL deflection limit, L/Value
9 = LL deflection limit, L/Value
10 = Total deflection limit, L/Value
11 = Total camber limit, L/Value
12 = Pattern live load factor
13 = Demand/capacity ratio limit
14 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Seismic design capacity


1=A
2=B
3=C
4=D
5=E
6=F

3 = Ignore seismic code


0 = No
Any other value = Yes

4 = Ignore special seismic load


0 = No
Any other value = Yes

5 = Isdoubler plate plug-welded


0 = No
Any other value = Yes

6 = Consider deflection
0 = No
Any other value = Yes

7 = DL DLdeflection limit, L/Value


Value > 0

8 = SDL + LL deflection limit, L/Value


Value > 0

9 = LL deflection limit, L/Value


Value > 0

10 = Total deflection limit, L/Value


Value > 0

11 = Total camber limit, L/Value


Value > 0

12 = Pattern live load factor


Value >= 0

13 = Demand/capacity ratio limit


Value > 0

14 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC_ASD01 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD01")

'get preference item


ret = SapModel.DesignSteel.AISC_ASD01.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD99.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 21, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic design capacity
3 = Phi bending
4 = Phi compression
5 = Phi tension - yielding
6 = Phi tension - fracture
7 = Phi shear
8 = Phi shear - torsion
9 = Phi compression, angle
10 = Ignore seismic code
11 = Ignore special seismic code
12 = Is doubler plate plug-welded
13 = Consider deflection
14 = DL deflection limit, L/Value
15 = SDL + LL deflection limit, L/Value
16 = LL deflection limit, L/Value
17 = Total deflection limit, L/Value
18 = Total camber limit, L/Value
19 = Pattern live load factor
20 = Demand capacity ratio limit
21 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Seismic design capacity


1=A
2=B
3=C
4=D
5=E
6=F

3 = Phi bending
Value > 0

4 = Phi compression
Value > 0

5 = Phi tension yielding


Value > 0

6 = Phi tension - fracture


Value > 0

7 = Phi shear
Value > 0

8 = Phi shear - torsion


Value > 0

9 = Phi compression, angle


Value > 0

10 = Ignore seismic code


0 = No
Any other value = Yes

11 = Ignore special seismic code


0 = No
Any other value = Yes

12 = Is doubler plate plug-welded


0 = No
Any other value = Yes

13 = Consider deflection
0 = No
Any other value = Yes

14 = DL deflection limit, L/Value


Value > 0

15 = SDL + LL deflection limit, L/Value


Value > 0

16 = LL deflection limit, L/Value


Value > 0

17 = Total deflection limit, L/Value


Value > 0

18 = Total camber limit, L/Value


Value > 0

19 = Pattern live load factor


Value >= 0

20 = Demand capacity ratio limit


Value > 0

21 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemAISC_LRFD99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD99")

'get preference item


ret = SapModel.DesignSteel.AISC_LRFD99.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.BS5950_90.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflection limit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflection limit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemBS5950_90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 90")

'get preference item


ret = SapModel.DesignSteel.BS5950_90.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_01.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 21, inclusive, indicating the preference item
considered.
1 = Multi-response case design
2 = Framing type
3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)
4 = Ductility related modification factor, Rd
5 = Overstrength related modification factor, Ro
6 = Capacity factor, Phi bending
7 = Capacity factor, Phi compression
8 = Capacity factor, Phi tension
9 = Capacity factor, Phi shear
10 = Slender section modification
11 = Ignore seismic code
12 = Ignore special seismic load
13 = Doubler plate is plug welded
14 = Consider deflection
15 = DL deflection limit, L/Value
16 = SDL + LL deflection limit, L/Value
17 = LL deflection limit, L/Value
18 = Total load deflection limit, L/Value
19 = Total camber limit, L/Value
20 = Pattern live load factor
21 = Demand/capacity ratio limit

Value
The value of the considered preference item.
1 = Multi-response case design
1 = Envelopes
2 = Step-by step
3 = Last step
4 = Envelopes - All
5 = Step-by step - All

2 = Framing type
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

3 = Spectral Acceleration Ratio, Ie*Fa*Sa(0.2)


Value > 0

4 = Ductility related modification factor, Rd


Value > 0

5 = Overstrength related modification factor, Ro


Value > 0

6 = Capacity factor, Phi bending


Value > 0

7 = Capacity factor, Phi compression


Value > 0

8 = Capacity factor, Phi tension


Value > 0

9 = Capacity factor, Phi shear


Value > 0

10 = Slender section modification


1 = Modified geometry
2 = modified Fy

11 = Ignore seismic code


0 = No
Any other value = Yes

12 = Ignore special seismic load


0 = No
Any other value = Yes
13 = Doubler plate is plug welded
0 = No
Any other value = Yes

14 = Consider deflection
0 = No
Any other value = Yes

15 = DL deflection limit, L/Value


Value > 0

16 = SDL + LL deflection limit, L/Value


Value > 0

17 = LL deflection limit, L/Value


Value > 0

18 = Total load deflection limit, L/Value


Value > 0

19 = Total camber limit, L/Value


Value > 0

20 = Pattern live load factor


Value >= 0

21 = Demand/capacity ratio limit


Value > 0
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved, otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemCanadian_S16_01 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CAN/CSA-S16-01")

'get preference item


ret = SapModel.DesignSteel.Canadian_S16_01.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Chinese_2000.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Gamma0
3 = Ignore b/t check
4 = Classify beam as flexo compression member
5 = Consider deflection
6 = DL deflection limit, L/Value
7 = SDL + LL deflection limit, L/Value
8 = LL deflection limit, L/Value
9 = Total load deflection limit, L/Value
10 = Total camber limit, L/Value
11 = Pattern live load factor
12 = Demand/capacity ratio limit
13 = Multi-response case design
14 = Is tall building?
Value
The value of the considered preference item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Gamma0
Value > 0

3 = Ignore b/t check


0 = No
Any other value = Yes

4 = Classify beam as flexo compression member


0 = No
Any other value = Yes

5 = Consider deflection
0 = No
Any other value = Yes
6 = DL deflection limit, L/Value
Value > 0

7 = SDL + LL deflection limit, L/Value


Value > 0

8 = LL deflection limit, L/Value


Value > 0

9 = Total load deflection limit, L/Value


Value > 0

10 = Total camber limit, L/Value


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Demand/capacity ratio limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All

14 = Tall building
0 = No
1 = Yes
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'createSapModelobject
Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2002")

'get preference item


ret = SapModel.DesignSteel.Chinese_2002.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added item 14 in Version 14.0.0.
Modified Item 1 in version 14.1.0.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.CISC_95.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 14, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Phi bending
3 = Phi compression
4 = Phi tension
5 = Phi shear
6 = Consider deflection
7 = DL deflection limit, L/Value
8 = SDL + LL deflection limit, L/Value
9 = LL deflection limit, L/Value
10 = Total deflection limit, L/Value
11 = Total camber limit, L/Value
12 = Pattern live load factor
13 = Demand/capacity ratio limit
14 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = Phi bending
Value > 0

3 = Phi compression
Value > 0

4 = Phi tension
Value > 0

5 = Phi shear
Value > 0

6 = Consider deflection
0 = No
Any other value = Yes

7 = DL deflection limit, L/Value


Value > 0

8 = SDL + LL deflection limit, L/Value


Value > 0

9 = LL deflection limit, L/Value


Value > 0

10 = Total load deflection limit, L/Value


Value > 0

11 = Total camber limit, L/Value


Value > 0

12 = Pattern live load factor


Value >= 0

13 = Demand/capacity ratio limit


Value > 0

14 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemCISC_95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CISC 95")

'get preference item


ret = SapModel.DesignSteel.CISC_95.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.EUROCODE_3_1993.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 12, inclusive, indicating the preference item
considered.
1 = Framing type
2 = GammaM0
3 = GammeM1
4 = Consider deflection
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total deflection limit, L/Value
9 = Total camber limit, L/Value
10 = Pattern live load factor
11 = Demand/capacity ratio limit
12 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Moment Frame
2 = Braced Frame

2 = GammaM0
Value > 0

3 = GammeM1
Value > 0

4 = Consider deflection
0 = No
Any other value = Yes

5 = DL deflection limit, L/Value


Value > 0

6 = SDL + LL deflection limit, L/Value


Value > 0

7 = LL deflection limit, L/Value


Value > 0
8 = Total deflection limit, L/Value
Value > 0

9 = Total camber limit, L/Value


Value > 0

10 = Pattern live load factor


Value >= 0

11 = Demand/capacity ratio limit


Value > 0

12 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemEUROCODE_3_1993()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("EUROCODE 3-1993")

'get preference item


ret = SapModel.DesignSteel.EUROCODE_3_1993.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Indian_IS:800_1998.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 11, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Lateral factor
3 = Consider deflection
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total deflection limit, L/Value
8 = Total camber limit, L/Value
9 = Pattern live load factor
10 = Demand/capacity ratio limit
11 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Sway Frame
2 = Nonsway Frame

2 = Lateral factor
Value > 0

3 = Consider deflection
0 = No
Any other value = Yes

4 = DL deflection limit, L/Value


Value > 0

5 = SDL + LL deflection limit, L/Value


Value > 0

6 = LL deflection limit, L/Value


Value > 0

7 = Total deflection limit, L/Value


Value > 0

8 = Total camber limit, L/Value


Value > 0

9 = Pattern live load factor


Value >= 0

10 = Demand/capacity ratio limit


Value > 0

11 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemIndian_IS_800_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-1998")

'get preference item


ret =
SapModel.DesignSteel.Indian_IS_800_1998.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.Italian_UNI_10011.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 10, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Consider deflection
3 = DL deflection limit, L/Value
4 = SDL + LL deflectionlimit, L/Value
5 = LL deflection limit, L/Value
6 = Total deflectionlimit, L/Value
7 = Total camber limit, L/Value
8 = Pattern live load factor
9 = Demand/capacity ratio limit
10 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Sway Frame
2 = NonSway Frame

2 = Consider deflection
0 = No
Any other value = Yes

3 = DL deflection limit, L/Value


Value > 0

4 = SDL + LL deflection limit, L/Value


Value > 0

5 = LL deflection limit, L/Value


Value > 0

6 = Total deflection limit, L/Value


Value > 0

7 = Total camber limit, L/Value


Value > 0

8 = Pattern live load factor


Value >= 0
9 = Demand/capacity ratio limit
Value > 0

10 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemItalian_UNI_10011()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Italian UNI 10011")

'get preference item


ret =
SapModel.DesignSteel.Italian_UNI_10011.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.UBC97_ASD.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 12, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Seismic zone
3 = Lateral factor
4 = Consider deflection
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total deflection limit, L/Value
9 = Total camber limit, L/Value
10 = Pattern live load factor
11 = Demand/capacity ratio limit
12 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Seismic zone
1 = Zone 0
2 = Zone 1
3 = Zone 2
4 = Zone 3
5 = Zone 4

3 = Lateral factor
Value > 0

4 = Consider deflection
0 = No
Any other value = Yes

5 = DL deflection limit, L/Value5


Value > 0
6 = SDL + LL deflection limit, L/Value
Value > 0
7 = LL deflection limit, L/Value
Value > 0
8 = Total deflection limit, L/Value
Value > 0
9 = Total camber limit, L/Value
Value > 0

10 = Pattern live load factor


Value >= 0

11 = Demand/capacity ratio limit


Value > 0

12 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemUBC97_ASD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-ASD")

'get preference item


ret = SapModel.DesignSteel.UBC97_ASD.GetPreference(1, Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetPreference
Syntax
SapObject.SapModel.DesignSteel.UBC97_LRFD.GetPreference
VB6 Procedure
Function GetPreference(ByVal Item As Long, ByRef Value As Double) As Long
Parameters
Item
This is an integer between 1 and 12, inclusive, indicating the preference item
considered.
1 = Framing type
2 = Importance factor
3 = Seismic zone
4 = Phi bending
5 = Phi compression
6 = Phi tension
7 = Phi shear
8 = Phi compression angle
9 = Consider deflection
10 = DL deflection limit, L/Value
11 = SDL + LL deflection limit, L/Value
12 = LL deflection limit, L/Value
13 = Total deflection limit, L/Value
14 = Total camber limit, L/Value
15 = Pattern live load factor
16 = Demand/capacity ratio limit
17 = Multi-response case design
Value
The value of the considered preference item.
1 = Framing type
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Importance factor
Value > 0

3 = Seismic zone
1 = Zone 0
2 = Zone 1
3 = Zone 2
4 = Zone 3
5 = Zone 4

3 = Lateral factor
Value > 0

4 = Phi bending
Value > 0
5 = Phi compression
Value > 0

6 = Phi tension
Value > 0

7 = Phi shear
Value > 0

8 = Phi compression angle


Value > 0

9 = Consider deflection
0 = No
Any other value = Yes

10 = DL deflection limit, L/Value


Value > 0

11 = SDL + LL deflection limit, L/Value


Value > 0

12 = LL deflection limit, L/Value


Value > 0

13 = Total deflection limit, L/Value


Value > 0

14 = Total camber limit, L/Value


Value > 0

15 = Pattern live load factor


Value >= 0

16 = Demand/capacity ratio limit


Value > 0

17 = Multi-response case design


1 = Envelopes
2= Step-by-step
3= Last step
4= Envelopes -- All
5= Step-by-step -- All
Remarks
This function retrieves the value of a steel design preference item.
The function returns zero if the item is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetSteelDesignPreferenceItemUBC97_LRFD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim Value As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-LRFD")

'get preference item


ret = SapModel.DesignSteel.UBC97_LRFD.GetPreference(1,
Value)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
SetPreference
GetShell (Note: Newer function available)

Syntax
SapObject.SapModel.PropArea.GetShell
VB6 Procedure
Function GetShell(ByVal Name As String, ByRef ShellType As Long, ByRef
MatProp As String, ByRef MatAng As Double, ByRef Thickness As Double,
ByRef Bending As Double, ByRef Color As Long, ByRef Notes As String, ByRef
GUID As String) As Long
Parameters
Name
The name of an existing shell-type area property.
ShellType
This is 1, 2, 3, 4, 5 or 6, indicating the shell type.
1= Shell - thin
2= Shell - thick
3= Plate - thin
4= Plate - thick
5= Membrane
6= Shell layered/nonlinear
MatProp
The name of the material property for the area property. This item does not
apply when ShellType = 6.
MatAng
The material angle. [deg]
This item does not apply when ShellType = 6.
Thickness
The membrane thickness. [L]
This item does not apply when ShellType = 6.
Bending
The bending thickness. [L]
This item does not apply when ShellType = 6.
Color
The display color assigned to the property.
Notes
The notes, if any, assigned to the property.
GUID
The GUID (global unique identifier), if any, assigned to the property.
Remarks
This function retrieves area property data for a shell-type area section.
The function returns zero if the property data is successfully retrieved; otherwise
it returns a nonzero value.
VBA Example
Sub GetAreaPropShell()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim ShellType As Long
Dim MatProp As String
Dim MatAng As Double
Dim Thickness As Double
Dim Bending As Double
Dim Color As Long
Dim Notes As String
Dim GUID As String

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 1, "4000Psi", 0, 16,
16)

'get area property data


ret = SapModel.PropArea.GetShell("A1", ShellType, MatProp,
MatAng, Thickness, Bending, Color, Notes, GUID)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
The function is obsolete and has been superceded by GetShell_1 as of version
14.00. This function is maintained for backward compatibility. New function
added
See Also
SetShell
GetShellLayer (Note: Newer function available)

Syntax
SapObject.SapModel.PropArea.GetShellLayer
VB6 Procedure
Function GetShellLayer(ByVal Name As String, ByRef MatProp As String, ByRef
SteelLayoutOption As Long, ByRef DesignCoverTopDir1 As Double, ByRef
DesignCoverTopDir2 As Double, ByRef DesignCoverBotDir1 As Double, ByRef
DesignCoverBotDir2 As Double) As Long
Parameters
Name
The name of an existing shell-type area property that is specified to be a layered
shell property.
NumberLayers
The number of layers in the area property.
LayerName
This is an array that includes the name of each layer.
Dist
This is an array that includes the distance from the area reference surface
(area object joint location plus offsets) to the midheight of the layer. [L]
Thickness
This is an array that includes the thickness of each layer. [L]
MatProp
This is an array that includes the name of the material property for the layer.
NonLinear
This is an array that includes a boolean (True or False) value. If this item is True,
and if the material property assigned to the layer is nonlinear, the layer will
behave nonlinearly in a nonlinear load case. If this item is False, the layer will
never behave nonlinearly.
MatAng
This is an array that includes the material angle for the layer. [deg]
NumIntegrationPts
The number of integration points in the thickness direction for the layer. The
locations are determined by the program using standard Guass-quadrature
rules.
Remarks
This function retrieves area property layer parameters for a shell-type area
section.
The function returns zero if the parameters are successfully retrieved; otherwise
it returns a nonzero value.
The function returns an error if the specified area property is not a shell-type
property specified to be a layered shell.
VBA Example
Sub GetAreaPropShellLayer()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Name As String
Dim MyNumberLayers As Long
Dim MyLayerName() As String
Dim MyDist() As Double
Dim MyThickness() As Double
Dim MyMatProp() As String
Dim MyNonLinear() As Boolean
Dim MyMatAng() As Double
Dim MyNumIntegrationPts() As Long
Dim NumberLayers As Long
Dim LayerName() As String
Dim Dist() As Double
Dim Thickness() As Double
Dim MatProp() As String
Dim NonLinear() As Boolean
Dim MatAng() As Double
Dim NumIntegrationPts() As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.NewWall(2, 48, 2, 48)

'set new area property


ret = SapModel.PropArea.SetShell("A1", 6, "", 0, 0, 0)

'add A615Gr60 rebar material


ret = SapModel.PropMaterial.AddQuick(Name, MATERIAL_REBAR, ,
, , , MATERIAL_REBAR_SUBTYPE_ASTM_A615Gr60)

'set area property layer parameters


MyNumberLayers = 5
ReDim MyLayerName(MyNumberLayers - 1)
ReDim MyDist(MyNumberLayers - 1)
ReDim MyThickness(MyNumberLayers - 1)
ReDim MyMatProp(MyNumberLayers - 1)
ReDim MyNonLinear(MyNumberLayers - 1)
ReDim MyMatAng(MyNumberLayers - 1)
ReDim MyNumIntegrationPts(MyNumberLayers - 1)

MyLayerName(0) = "Concrete"
MyDist(0) = 0
MyThickness(0) = 16
MyMatProp(0) = "4000Psi"
MyNonLinear(0) = False
MyMatAng(0) = 0
MyNumIntegrationPts(0) = 2

MyLayerName(1) = "Top Bar 1"


MyDist(1) = 6
MyThickness(1) = 0.03
MyMatProp(1) = Name
MyNonLinear(1) = False
MyMatAng(1) = 0
MyNumIntegrationPts(1) = 1

MyLayerName(2) = "Top Bar 2"


MyDist(2) = 6
MyThickness(2) = 0.03
MyMatProp(2) = Name
MyNonLinear(2) = False
MyMatAng(2) = 90
MyNumIntegrationPts(2) = 1

MyLayerName(3) = "Bot Bar 1"


MyDist(3) = -6
MyThickness(3) = 0.03
MyMatProp(3) = Name
MyNonLinear(3) = False
MyMatAng(3) = 0
MyNumIntegrationPts(3) = 1

MyLayerName(4) = "Bot Bar 2"


MyDist(4) = -6
MyThickness(4) = 0.03
MyMatProp(4) = Name
MyNonLinear(4) = False
MyMatAng(4) = 90
MyNumIntegrationPts(4) = 1

ret = SapModel.PropArea.SetShellLayer("A1", MyNumberLayers,


MyLayerName, MyDist, MyThickness, MyMatProp, MyNonLinear,
MyMatAng, MyNumIntegrationPts)

'get area property layer parameters


ret = SapModel.PropArea.GetShellLayer("A1", NumberLayers,
LayerName, Dist, Thickness, MatProp, NonLinear, MatAng,
NumIntegrationPts)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
This function is obsolete and has been superceded by GetShellLayer_1 as of
version 12.5. This function is maintained for backwards compatibility.
See Also
SetShellLayer
SetShellLayer_1
GetSolverOption (Note: Newer function available)

Syntax
SapObject.SapModel.Analyze.GetSolverOption
VB6 Procedure
Function GetSolverOption(ByRef SolverType As Long, ByRef Force32BitSolver
As Boolean, ByRef StiffCase As String) As Long
Parameters
SolverType
This is 0 or 1, indicating the solver type.
0 = Standard solver
1 = Advanced solver
Force32BitSolver
This is True if the analysis is always run using 32-bit, even on 64-bit computers.
StiffCase
The name of the load case used when outputting the mass and stiffness
matrices to text files If this item is blank, no matrices are output.
Remarks
This function retrieves the model solver options.
The function returns zero if the options are successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetModelSolverOption()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim SolverType As Long
Dim Force32BitSolver As Boolean
Dim StiffCase As String

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set model solver options


ret = SapModel.Analyze.GetSolverOption(SolverType,
Force32BitSolver, StiffCase)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
This function is obsolete and has been superceded by GetSolverOption_1 as of
version 14.2.2. This function is maintained for backwards compatibility.
See Also
SetSolverOption
GetStageData_1 (Note: Newer Function Available)
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetStageData_1
VB6 Procedure
Function GetStageData_1(ByVal Name As String, ByVal Stage As Long, ByRef
NumberOperations As Long, ByRef Operation() As Long, ByRef ObjectType()
As String, ByRef ObjectName() As String, ByRef Age() As Long, ByRef
MyType() As String, ByRef MyName() As String, ByRef SF() As Double) As
Long
Parameters
Name
The name of an existing static nonlinear staged load case.
Stage
The stage in the specified load case for which data is requested. Stages are
numbered sequentially starting from 1.
NumberOperations
The number of operations in the specified stage.
Operation
This is an array that includes 1, 2, 3, 4, 5, 6, 7, or 11, indicating an operation
type.
1 = Add structure
2 = Remove structure
3 = Load objects if new
4 = Load objects
5 = Change section properties
6 = Change section property modifiers
7 = Change releases
11 = Change section properties and age
ObjectType
This is an array that includes the object type associated with the specified
operation. The object type may be one of the following:
Group
Frame
Cable
Tendon
Area
Solid
Link
Point

The following list shows which object types are applicable to each operation type:
Operation = 1 (Add structure): All object types
Operation = 2 (Remove structure): All object types
Operation = 3 (Load objects if new): All object types
Operation = 4 (Load objects): All object types
Operation = 5 (Change section properties): All object types except Point
Operation = 6 (Change section property modifiers): Group, Frame, Cable, Area
Operation = 7 (Change releases): Group, Frame
Operation = 11 (Change section properties and age): All object types except
Point
ObjectName
This is an array that includes the name of the object associated with the
specified operation. This is the name of a Group, Frame object, Cable object,
Tendon object, Area object, Solid object, Link object or Point object, depending
on the ObjectType item.
Age
This is an array that includes the age of the added structure, at the time it is
added, in days. This item applies only to operations with Operation = 1.
MyType
This is an array that includes a load type or an object type, depending on what is
specified for the Operation item. This item applies only to operations with
Operation = 3, 4, 5, 6, 7, or 11.
When Operation = 3 or 4, this is an array that includes Load or Accel, indicating
the load type of an added load.
When Operation = 5 or 11, and the ObjectType item is Group, this is an array
that includes Frame, Cable, Tendon, Area, Solid or Link, indicating the object
type for which the section property is changed.
When Operation = 6 and the ObjectType item is Group, this is an array that
includes Frame, Cable or Area, indicating the object type for which the section
property modifiers are changed.
When Operation = 7 and the ObjectType item is Group, this is an array that
includes Frame, indicating the object type for which the releases are changed.
When Operation = 5, 6, 7, or 11, and the ObjectType item is not Group and not
Point, this item is ignored and the type is picked up from the ObjectType item.
MyName
This is an array that includes a load assignment or an object name, depending
on what is specified for the Operation item. This item applies only to operations
with Operation = 3, 4, 5, 6, 7, or 11.
When Operation = 3 or 4, this is an array that includes the name of the load
assigned to the operation. If the associated LoadType item is Load, this item is
the name of a defined load pattern. If the associated LoadType item is Accel ,
this item is UX, UY, UZ, RX, RY or RZ, indicating the direction of the load.
When Operation = 5 or 11, this is the name of a Frame, Cable, Tendon, Area,
Solid or Link object, depending on the object type specified.
When Operation = 6, this is the name of a Frame, Cable or Area object,
depending on the object type specified.
When Operation = 7, this is the name of a Frame object.
SF
This is an array that includes the scale factor for the load assigned to the
operation, if any. [L/s2] for Accel UX UY and UZ; otherwise unitless
This item applies only to operations with Operation = 3 or 4.
Remarks
This function retrieves stage data for the specified stage in the specified load
case.
The function returns zero if the data is successfully retrieved; otherwise, it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedStageData_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Long
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim MyOperation() As Long
Dim MyObjectType() As String
Dim MyObjectName() As String
Dim MyAge() As Long
Dim MyMyType() As String
Dim MyMyName() As String
Dim MySF() As Double
Dim NumberOperations As Long
Dim Operation() As Long
Dim ObjectType() As String
Dim ObjectName() As String
Dim Age() As Long
Dim MyType() As String
Dim MyName() As String
Dim SF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_1("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'set stage data


ReDim MyOperation(1)
ReDim MyObjectType(1)
ReDim MyObjectName(1)
ReDim MyAge(1)
ReDim MyMyType(1)
ReDim MyMyName(1)
ReDim MySF(1)
MyOperation(0) = 1
MyObjectType(0) = "Group"
MyObjectName(0) = "ALL"
MyAge(0) = 3
MyOperation(1) = 4
MyObjectType(1) = "Frame"
MyObjectName(1) = "8"
MyMyType(1) = "Load"
MyMyName(1) = "DEAD"
MySF(1) = 0.85
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageData_1("ACASE1",
1, 2, MyOperation, MyObjectType, MyObjectName, MyAge, MyMyType,
MyMyName, MySF)

'get stage data


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetStageData_1("ACASE1",
1, NumberOperations, Operation, ObjectType, ObjectName, Age,
MyType, MyName, SF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
Added Operation 11 (Change section properties and age) in version 16.10.
This function supersedes GetStageData.
This function is obsolete and has been replaced by GetStageData_2 as of
v19.0.0. This function is maintained for backward compatibility
See Also
SetStageData_1
GetStageDefinitions_1 (Note: Newer Function Available)
Syntax
SapObject.SapModel.LoadCases.StaticNonlinear.GetStageDefinitions_1
VB6 Procedure
Function GetStageDefinitions_1(ByVal Name As String, ByRef NumberStages
As Long, ByRef Duration() As Long, ByRef Output() As Boolean, ByRef
OutputName() As String, ByRef Comment() As String) As Long
Parameters
Name
The name of an existing static nonlinear staged load case.
NumberStages
The number of stages defined for the specified load case.
Duration
This is an array that includes the duration in days for each stage.
Output
This is an array that includes True or False, indicating if analysis output is to be
saved for each stage.
OutputName
This is an array that includes a user-specified output name for each stage.
Comment
This is an array that includes a comment for each stage. The comment may be a
blank string.
Remarks
This function retrieves the stage definition data for the specified load case.
The function returns zero if the data is successfully retrieved; otherwise it
returns a nonzero value.
VBA Example
Sub GetCaseStaticNonlinearStagedStageDefinitions_1()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyDuration() As Long
Dim MyOutput() As Boolean
Dim MyOutputName() As String
Dim MyComment() As String
Dim NumberStages As Long
Dim Duration() As Long
Dim Output() As Boolean
Dim OutputName() As String
Dim Comment() As String

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add static nonlinear staged load case


ret =
SapModel.LoadCases.StaticNonlinearStaged.SetCase("ACASE1")

'initialize stage definitions


ReDim MyDuration(1)
ReDim MyOutput(1)
ReDim MyOutputName(1)
ReDim MyComment(1)
MyDuration(0) = 0
MyOutput(0) = False
MyComment(0) = "Build structure"
MyDuration(1) = 60
MyOutput(1) = True
MyOutputName(1) = "HBC2"
MyComment(1) = "Wait"
ret =
SapModel.LoadCases.StaticNonlinearStaged.SetStageDefinitions_1("ACAS
2, MyDuration, MyOutput, MyOutputName, MyComment)

'get stage definitions


ret =
SapModel.LoadCases.StaticNonlinearStaged.GetStageDefinitions_1("ACAS
NumberStages, Duration, Output, OutputName, Comment)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
This function supersedes GetStageDefinitions
This function is obsolete and has been replaced by GetStageDefinitions_2 as of
v19.0.0. This function is maintained for backward compatibility.
See Also
SetStageDefinitions_1
GetTypeOAPI (Note: Newer Function Available)

Syntax
SapObject.SapModel.LoadCases.GetTypeOAPI
VB6 Procedure
Function GetTypeOAPI(ByVal Name As String, ByRef CaseType As
eLoadCaseType, ByRef SubType as long) As Long
Parameters
Name
The name of an existing load case.
CaseType
This is one of the following items in the eLoadCaseType enumeration.
CASE_LINEAR_STATIC = 1
CASE_NONLINEAR_STATIC = 2
CASE_MODAL = 3
CASE_RESPONSE_SPECTRUM = 4
CASE_LINEAR_HISTORY = 5 (Modal Time History)
CASE_NONLINEAR_HISTORY = 6 (Modal Time History)
CASE_LINEAR_DYNAMIC = 7 (Direct Integration Time History)
CASE_NONLINEAR_DYNAMIC = 8 (Direct Integration Time History)
CASE_MOVING_LOAD = 9
CASE_BUCKLING = 10
CASE_STEADY_STATE = 11
CASE_POWER_SPECTRAL_DENSITY = 12
CASE_LINEAR_STATIC_MULTISTEP = 13
CASE_HYPERSTATIC = 14
SubType
This is an integer representing the load case sub type. This item only applies for
certain case types.
For CASE_NONLINEAR_STATIC:
1 = Nonlinear
2 = Nonlinear staged construction

For CASE_MODAL:
1 = Eigen
2 = Ritz

For CASE_LINEAR_HISTORY:
1 = Transient
2 = Periodic
Remarks
This function retrieves the case type for the specified load case.
The function returns zero if the type is successfully retrieved; otherwise it
returns nonzero.
VBA Example
Sub GetLoadCaseType()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim CaseType As eLoadCaseType
Dim SubType As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'get load case type


ret = SapModel.LoadCases.GetTypeOAPI("DEAD", CaseType,
SubType)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
Added one item to the eLoadCaseType enumeration in version 12.00.
This function is obsolete and has been superceded by GetType_1 as of version
12.00. This function is maintained for backwards compatibility.
Changed function name to GetTypeOAPI in v17.0.0.
See Also
SetAPI4F2008 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetAPI4F2008
VB6 Procedure
Function SetAPI4F2008(ByVal Name As String, ByVal ExposureFrom As Long,
ByVal DirAngle As Double, ByVal UserZ As Boolean, ByVal TopZ As Double,
ByVal BottomZ As Double, ByVal WindSpeed As Double, ByVal SSLFactor As
Double) As Long
Parameters
Name
The name of an existing Wind-type load case.
ExposureFrom
This is 2, 3 or 4, indicating the source of the wind exposure.
2 = From area objects
3 = From frame objects (open structure)
4 = From area objects and frame objects (open structure)
DirAngle
The direction angle for the wind load.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item is the global Z-coordinate at the highest level where auto wind loads
are applied. [L]
BottomZ
This item is the global Z-coordinate at the lowest level where auto wind loads are
applied. [L]
WindSpeed
The design reference wind velocity, Vref, in knots.
SSLFactor
The structural safety level multiplier.
Remarks
This function assigns auto wind loading parameters for API 4F 2008.
The function returns zero if the parameters are successfully assigned;
otherwise, it returns a nonzero value.
VBA Example
Sub AssignWindAPI4F20085()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load case


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign API 4F 2008 parameters


ret = SapModel.LoadPatterns.AutoWind.SetAPI4F2008("WIND", 3,
0, False, 0, 0, 93, 1.1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 12.00.
The function is obsolete and has been superceded by SetAPI4F2008_1 as of
version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
GetAPI4F2008
SetEurocode12005 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetEurocode12005
VB6 Procedure
Function SetEurocode12005(ByVal Name As String, ByVal ExposureFrom As
Long, ByVal DirAngle As Double, ByVal Cpw As Double, ByVal Cpl As Double,
ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal BottomZ As Double,
ByVal WindSpeed As Double, ByVal Terrain As Long, ByVal Orography As
Double, ByVal k1 As Double, ByVal CsCd As Double, Optional ByVal
UserExposure As Boolean = False) As Long
Parameters
Name
The name of an existing Wind-type load pattern.
ExposureFrom
This is 1 or 2, indicating the source of the wind exposure.
1 = From extents of rigid diaphragms
2 = From area objects
DirAngle
The direction angle for the wind load. This item applies only when ExposureFrom
= 1.
Cpw
The windward coefficient, Cp. This item applies only when ExposureFrom = 1.
Cpl
The leeward coefficient, Cp. This item applies only when ExposureFrom = 1.
UserZ
This item is True if the top and bottom elevations of the wind load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto wind loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto wind loads are applied. [L]
WindSpeed
The basic wind speed, vb, in meters per second.
Terrain
This is 0, 1, 2, 3 or 4, indicating the terrain category.
0= 0
1= I
2= II
3= III
4= IV
Orography
The orography factor, Co.
k1
The turbulence factor, k1.
CsCd
The structural factor, CsCd.
UserExposure
If this item is True, the wind exposure widths are provided by the user. If it is
False, the wind exposure widths are calculated by the program from the extents
of the diaphragms.
Remarks
This function assigns auto wind loading parameters for Eurocode 1 2005.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignWindEurocode12005()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign Eurocode 1 2005 parameters


ret =
SapModel.LoadPatterns.AutoWind.SetEurocode12005("WIND", 1, 0, 0.8,
0.5, False, 0, 0, 35, 2, 1, 1, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by SetEurocode12005_1 as
of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
GetEurocode12005
SetEurocode82004 (Note: Newer function available)

Syntax
SapObject.SapModel.LoadPatterns.AutoSeismic.SetEurocode82004
VB6 Procedure
Function SetEurocode82004(ByVal Name As String, ByVal DirFlag As Long,
ByVal Eccen As Double, ByVal PeriodFlag As Long, ByVal CT As Double, ByVal
UserT As Double, ByVal UserZ As Boolean, ByVal TopZ As Double, ByVal
BottomZ As Double, ByVal EURO2004GroundType As Long, ByVal
EURO2004SpectrumType As Long, ByVal EURO2004ag As Double, ByVal
EURO2004Beta As Double, ByVal EURO2004q As Double, ByVal
EURO2004Lambda As Double) As Long
Parameters
Name
The name of an existing Quake-type load pattern.
DirFlag
This is 1 or 2, indicating the seismic load direction.
1 = Global X
2 = Global Y
Eccen
The eccentricity ratio that applies to all diaphragms.
PeriodFlag
This is 1, 2 or 3, indicating the time period option.
1 = Approximate
2 = Program calculated
3 = User defined
CT
The code-specified Ct factor. This item applies when the PeriodFlag item is 1.
UserT
The user specified time period. This item applies when the PeriodFlag item is 3.
[s]
UserZ
This item is True if the top and bottom elevations of the seismic load are user
specified. It is False if the elevations are determined by the program.
TopZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the highest level where auto seismic loads are applied. [L]
BottomZ
This item applies only when the UserZ item is True. It is the global Z-coordinate
at the lowest level where auto seismic loads are applied. [L]
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1= A
2= B
3= C
4= D
5= E
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004ag
The design ground acceleration in g, ag.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
EURO2004Lambda
The correction factor, Lambda.
Remarks
This function assigns auto seismic loading parameters for the Eurocode 8 2004
code.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value.
VBA Example
Sub AssignSeismicEurocode82004()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'add new load pattern


ret = SapModel.LoadPatterns.Add("EQX", LTYPE_QUAKE)

'assign Eurocode 8 2004 parameters


ret =
SapModel.LoadPatterns.AutoSeismic.SetEurocode82004("EQX", 2, 0.1,
2, 0.075, 0, False, 0, 0, 2, 1, 0.4, 0.2, 2, 1)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by SetEurocode82004_1 as
of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
GetEurocode82004
SetEurocode82004 (Note: Newer function available)

Syntax
SapObject.SapModel.Func.FuncRS.SetEurocode82004
VB6 Procedure
Function SetEurocode82004(ByVal Name As String, ByVal
EURO2004GroundType As Long, ByVal EURO2004SpectrumType As Long,
ByVal EURO2004ag As Double, ByVal EURO2004Beta As Double, ByVal
EURO2004q As Double, ByVal DampRatio As Double) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function,n that
function is modified; otherwise, a new function is added.
EURO2004GroundType
This is 1, 2, 3, 4 or 5, indicating the ground type.
1= A
2= B
3= C
4= D
5= E
EURO2004SpectrumType
This is 1 or 2, indicating the spectrum type.
1 = Type 1
2 = Type 2
EURO2004ag
The design ground acceleration in g, ag.
EURO2004Beta
The lower bound factor, Beta.
EURO2004q
The behavior factor, q.
DampRatio
The damping ratio for the function, 0 <= DampRatio < 1.
Remarks
This function defines a Eurocode 8 2004 response spectrum function.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetRSFuncEurocode82004()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add Eurocode 8 2004 RS function


ret = SapModel.Func.FuncRS.SetEurocode82004("RS-1", 2, 1,
0.4, 0.2, 2, 0.04)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.00.
The function is obsolete and has been superceded by SetEurocode82004_1 as
of version 14.1.0. This function is maintained for backward compatibility. New
function added.
See Also
GetEurocode82004
SetExposure
Syntax
SapObject.SapModel.LoadPatterns.AutoWind.SetExposure
VB6 Procedure
Function SetExposure(ByVal Name As String, ByVal Diaph As String, ByVal x As
Double, ByVal y As Double, ByVal Width As Double, ByVal Height As Double) As
Long
Parameters
Name
The name of an existing Wind-type load pattern that has an auto wind load
assigned.
Diaph
The name of an existing special rigid diaphragm constraint, that is, a diaphragm
constraint with the following features:
1. The constraint type is CONSTRAINT_DIAPHRAGM = 2.
2. The constraint coordinate system is Global.
3. The constraint axis is Z.
x
The global X-coordinate of the point where the wind force is applied. [L]
y
The global Y-coordinate of the point where the wind force is applied. [L]
Width
The exposure width for the wind load applied to the specified diaphragm. [L]
Height
The exposure height for the wind load applied to the specified diaphragm. [L]
Remarks
This function assigns exposure parameters for auto wind loads determined from
extents of rigid diaphragms. This function does not apply for User-type auto wind
loads.
The function returns zero if the parameters are successfully assigned;
otherwise it returns a nonzero value. The function returns an error if the auto
wind load is not specified to have user exposure parameters.
VBA Example
Sub AssignWindUserExposure()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New3DFrame(BeamSlab, 2, 144, 3, 336, 2,
432)

'define diaphragm constraints


ret = SapModel.ConstraintDef.SetDiaphragm("Diaph1", Z)
ret = SapModel.ConstraintDef.SetDiaphragm("Diaph2", Z)

'assign points to diaphragm


ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("2")
ret = SapModel.PointObj.SetConstraint("", "Diaph1",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection
ret = SapModel.SelectObj.PlaneXY("3")
ret = SapModel.PointObj.SetConstraint("", "Diaph2",
SelectedObjects)
ret = SapModel.SelectObj.ClearSelection

'add new load pattern


ret = SapModel.LoadPatterns.Add("WIND", LTYPE_WIND)

'assign ASCE788 parameters


ret = SapModel.LoadPatterns.AutoWind.SetASCE788("WIND", 1,
0, 0.8, 0.5, False, 0, 0, 80, 3, 1, 0.85, True)

'assign user exposure data


ret = SapModel.LoadPatterns.AutoWind.SetExposure("WIND",
"Diaph2", 0, 0, 900, 124)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.01.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetExposure
GetSpecialRigidDiaphragmList
SetFireproofing
Syntax
SapObject.SapModel.FrameObj.SetFireproofing
VB6 Procedure
Function SetFireproofing(ByVal Name As String, ByVal MyType As Long, ByVal
Thickness As Double, ByVal Perimeter As Double, ByVal Density As Double,
ByVal tf As Boolean, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
MyType
This is 1, 2 or 3, indicating the type of fireproofing assigned.
1 = Sprayed on - program calculate section perimeter
2 = Sprayed on - user provides section perimeter
3 = Concrete encased
Thickness
When MyType = 1 or MyType = 2, this is the thickness of the sprayed on
fireproofing. When MyType = 3, this is the concrete cover dimension. [L]
Perimeter
This item applies only when MyType = 2. It is the length of fireproofing applied,
measured around the perimeter of the frame object cross-section. [L]
Density
This is the weight per unit volume of the fireproofing material. [F/L3]
tf
This item applies only when MyType = 1 or MyType = 3. If this item is True, the
fireproofing is assumed to be applied to the top flange of the section. If it is
False, the program assumes no fireproofing is applied to the section top flange.
This flag applies for I, channel and double channel sections.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function assigns fireproofing to frame objects.
The function returns zero if the fireproofing assignments are successfully
assigned, otherwise it returns a nonzero value.
The program automatically adds the load *(weight) calculated for the fireproofing
to all load patterns that include self weight.
VBA Example
Sub AssignFireproofing()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 3, 124, 3, 200)

'assign fireproofing
ret = SapModel.FrameObj.SetFireproofing("ALL", 1, 2, 0,
8.68E-06, False, Group)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.00.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetFireproofing
DeleteFireproofing
SetFromFile (Note: Newer function available)

Syntax
SapObject.SapModel.Func.FuncTH.SetFromFile
VB6 Procedure
Function SetFromFile(ByVal Name As String, ByVal FileName As String, ByVal
HeadLines As Long, ByVal PreChars As Long, ByVal PointsPerLine As Long,
ByVal ValueType As Long, ByVal FreeFormat As Boolean, Optional ByVal
NumberFixed As Long = 10) As Long
Parameters
Name
The name of an existing or new function. If this is an existing function, that
function is modified; otherwise, a new function is added.
FileName
The full path of the text file containing the function data.
HeadLines
The number of header lines in the text file to be skipped before starting to read
function data.
PreChars
The number of prefix characters to be skipped on each line in the text file.
PointsPerLine
The number of function points included on each text file line.
ValueType
This is either 1 or 2, indicating value type.
1 = Values at equal time intervals
2 = Time and function values
FreeFormat
This item is True if the data is provided in a free format. It is False if it is in a
fixed format.
NumberFixed
This item applies only when the FreeFormat item is False. It is the number of
characters per item.
Remarks
This function defines a time history function from file.
The function returns zero if the function is successfully defined; otherwise it
returns a nonzero value.
VBA Example
Sub SetTHFuncFromFile()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add TH function from file


ret = SapModel.Func.FuncTH.SetFromFile("TH-1",
"C:\SapAPI\FuncTH.txt", 3, 0, 3, 2, True)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Text File
Following is the contents of the text file name FuncTH.txt used in the VBA
Example.
Time History Function
Time (sec) and Acceleration (g) values
3 points per line
0.00000 .01080 .04200 .00100 .09700 .01590
.16100 -.00010 .22100 .01890 .26300 .00010
.29100 .00590 .33200 -.00120 .37400 .02000
.42900 -.02370 .47100 .00760 .58100 .04250
.62300 .00940 .66500 .01380 .72000 -.00880
.72010 -.02560 .78900 -.03870 .78910 -.05680
.87200 -.02320 .87210 -.03430 .94100 -.04020
.94110 -.06030 .99700 -.07890 1.06600 -.06660
1.06610 -.03810 1.09400 -.04290 1.16800 .08970
1.31500 -.16960 1.38400 -.08280 1.41200 -.08280
1.44000 -.09450 1.48100 -.08850 1.50900 -.10800
1.53700 -.12800 1.62800 .11440 1.70300 .23550
1.80000 .14280 1.85500 .17770 1.92400 -.26100
2.00700 -.31940 2.21500 .29520 2.27000 .26340
2.32000 -.29840 2.39500 .00540 2.45000 .28650
2.51900 -.04690 2.57500 .15160 2.65200 .20770
2.70800 .10870 2.76900 -.03250 2.89300 .10330
2.97600 -.08030 3.06800 .05200 3.12900 -.15470
3.21200 .00650 3.25300 -.20600 3.38600 .19270
3.41900 -.09370 3.53000 .17080 3.59900 -.03590
3.66800 .03650 3.73800 -.07360 3.83500 .03110
3.90400 -.18330 4.01400 .02270 4.05600 -.04350
4.10600 .02160 4.22200 -.19720 4.31400 -.17620
4.41600 .14600 4.47100 -.00470 4.61800 .25720
4.66500 -.20450 4.75600 .06080 4.83100 -.27330
4.97000 .17790 5.03900 .03010 5.10800 .21830
5.19900 .02670 5.23300 .12520 5.30200 .12900
5.33000 .10890 5.34300 -.02390 5.45400 .17230
5.51000 -.10210 5.60600 .01410 5.69000 -.19490
5.77300 -.02420 5.80000 -.00500 5.80900 -.02750
5.86900 -.05730 5.88300 -.03270 5.92500 .02160
5.98000 .01080 6.01300 .02350 6.08500 -.06650
6.13200 .00140 6.17400 .04930 6.18800 .01490
6.18810 -.02000 6.22900 -.03810 6.27900 .02070
6.32600 -.00580 6.36800 -.06030 6.38200 -.01620
6.40900 .02000 6.45900 -.01760 6.47800 -.00330
6.52000 .00430 6.53400 -.00400 6.56200 -.00990
6.57500 -.00170 6.60300 -.01700 6.64500 .03730
6.68600 .04570 6.71400 .03850 6.72800 .00090
6.76900 -.02880 6.76910 .00160 6.81100 .01130
6.85200 .00220 6.90800 .00920 6.99100 -.09960
7.07400 .03600 7.12100 .00780 7.14300 -.02770
7.14900 .00260 7.17100 .02720 7.22600 .05760
7.29500 -.04920 7.37000 .02970 7.40600 .01090
7.42500 .01860 7.46100 -.02530 7.52500 -.03470
7.57200 .00360 7.60000 -.06280 7.64100 -.02800
7.66900 -.01960 7.69100 .00680 7.75200 -.00540
7.79400 -.06030 7.83500 -.03570 7.87700 -.07160
7.96000 -.01400 7.98700 -.00560 8.00100 .02220
8.07000 .04680 8.12600 .02600 8.12610 -.03350
8.19500 -.01280 8.22300 .06610 8.27800 .03050
8.33400 .02460 8.40300 .03470 8.45800 -.03690
8.53300 -.03440 8.59600 -.01040 8.63800 -.02600
8.73500 .15340 8.81800 -.00280 8.86000 .02330
8.88200 -.02610 8.91500 -.00220 8.95600 -.18490
9.05300 .12600 9.09500 .03200 9.12300 .09550
9.15000 .12460 9.25300 -.03280 9.28900 -.04510
9.42700 .13010 9.44100 -.16570 9.51000 .04190
9.63500 -.09360 9.70400 .08160 9.81500 -.08810
9.89800 .00640 9.93900 -.00060 9.99500 .05860
10.02200 -.07130 10.05000 -.04480 10.05010 -.02210
10.10500 .00930 10.10510 .00240 10.18800 .05100
10.27200 -.12430 10.38200 .05870 10.42400 .01330
10.45200 .03860 10.46500 .11640 10.50700 -.03740
10.53400 -.05720 10.64500 .03080 10.70100 .02230
10.71400 .05150 10.77000 .09030 10.83900 -.01940
10.92200 .04710 10.92210 -.06770 10.96400 -.07940
10.99100 -.01200 11.07400 .06080 11.08800 -.02690
11.11600 -.04160 11.20700 .02930 11.20710 .05520
11.22700 .07560 11.26800 .04310 11.32400 .02080
11.43400 .11800 11.57300 -.09990 11.65600 -.12470
11.72500 -.20940 11.72510 -.14180 11.78000 -.11630
11.80800 0.00000 11.87700 .07620 11.91900 .05700
11.98800 .13540 12.04300 .06730 12.11300 .08650
Release Notes
Initial release in version 11.02.
The function is obsolete and has been superceded by SetFromFile_1 as of
version 14.12. This function is maintained for backward compatibility. New
function added.
See Also
GetFromFile
SetMassSource
Syntax
SapObject.SapModel.PropMaterial.SetMassSource
VB6 Procedure
Function SetMassSource(ByVal MyOption As Long, ByVal NumberLoads As
Long, ByRef LoadPat() As String, ByRef sf() As Double) As Long
Parameters
MyOption
This is 1, 2 or 3, indicating the mass source option.
1 = From element self mass and additional masses
2 = From loads
3 = From element self mass and additional masses and loads
NumberLoads
The number of load patterns from which mass is obtained. This item applies only
when MyOption is 2 or 3.
LoadPat
This is an array of the names of the load patterns from which mass is obtained.
This item applies only when MyOption is 2 or 3.
sf
This is an array of load patterns multipliers used to calculate the mass. This item
applies only when MyOption is 2 or 3.
Remarks
This function sets the mass source for the model.
The function returns zero if the mass source is successfully set; otherwise it
returns a nonzero value.
If either the MassFromElements or MassFromMasses parameter is specified
as True, both values will be set to true in the model. Both of these items are
currently controlled with a single option within the user interface.
VBA Example
Sub AssignMassSource()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim MyLoadPat() As String
Dim MySF() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add new load pattern


ret = SapModel.LoadPatterns.Add("SDL", LTYPE_SUPERDEAD)

'add new load pattern


ret = SapModel.LoadPatterns.Add("LIVE", LTYPE_LIVE)

'set mass source


ReDim MyLoadPat(2)
ReDim MySF(2)
MyLoadPat(0) = "DEAD"
MyLoadPat(1) = "SDL"
MyLoadPat(2) = "LIVE"
MySF(0) = 1
MySF(1) = 0.2
MySF(2) = 0.25
ret = SapModel.PropMaterial.SetMassSource(3, 3, MyLoadPat,
MySF)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
See Also
GetMassSource
SetModalComb (Note: Newer function available)

Syntax
SapObject.SapModel.LoadCases.ResponseSpectrum.SetModalComb
VB6 Procedure
Function SetModalComb(ByVal Name As String, ByVal MyType As Long,
Optional ByVal F1 As Double = 1, Optional ByVal F2 As Double = 0, Optional
ByVal td As Double = 60) As Long
Parameters
Name
The name of an existing response spectrum load case.
MyType
This is 1, 2, 3, 4, 5 or 6, indicating the modal combination option.
1= CQC
2= SRSS
3= ABS
4= GMC
5= 10 percent
6= Double sum
F1
This item applies only when MyType = 4. It is the GMC f1 factor. [cyc/s]
F2
This item applies only when MyType = 4. It is the GMC f2 factor. [cyc/s]
td
This item applies only when MyType = 6. It is the factor td. [s]
Remarks
This function sets the modal combination option for the specified load case.
The function returns zero if the option is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetCaseResponseSpectrumModalComb()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'add response spectrum load case


ret = SapModel.LoadCases.ResponseSpectrum.SetCase("LCASE1")

'set modal combination option


ret =
SapModel.LoadCases.ResponseSpectrum.SetModalComb("LCASE1", 4, 2,
0.5)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
Changed nomenclature from Load Cases, Analysis Cases and Response
Combinations to Load Patterns, Load Cases and Load Combinations,
respectively, in version 12.00.
The function is obsolete and has been superceded by SetModalComb_1 as of
version 14.00. This function is maintained for backward compatibility. New
function added
See Also
GetModalComb
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI318_05_IBC2003.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemACI318_05_IBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-05/IBC2003")

'set overwrite item


ret =
SapModel.DesignConcrete.ACI318_05_IBC2003.SetOverwrite("8", 1, 4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_02.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemACI_318_02()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-02")

'set overwrite item


ret = SapModel.DesignConcrete.ACI_318_02.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_99.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemACI_318_99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI 318-99")

'set overwrite item


ret = SapModel.DesignConcrete.ACI_318_99.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.AS_3600_01.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, km Major
8 = Moment coefficient, km Minor
9 = Nonsway moment factor, Db Major
10 = Nonsway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway intermediate
3 = Sway ordinary
4 = Nonsway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, km Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, km Minor


Value >= 0; 0 means use program determined value.

9 = Nonsway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Nonsway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise, it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemAS_3600_01()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("AS 3600-01")

'set overwrite item


ret = SapModel.DesignConcrete.AS_3600_01.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 14.0.0.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.BS8110_89.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemBS8110_89()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("BS8110 89")

'set overwrite item


ret = SapModel.DesignConcrete.BS8110_89.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Chinese_2002.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 18, inclusive, indicating the overwrite item
considered.
1 = Seismic design grade
2 = Dual system SMF
3 = MMF
4 = SMF
5 = AFMF
6 = Column location
7 = Transfer beam of column
8 = Corner column seismic modification
9 = Beam gravity neg moment red factor
10 = Unbraced length ratio, Major
11 = Unbraced length ratio, Minor
12 = Effective length factor, K Major
13 = Effective length factor, K Minor
14 = Torsion modification factor
15 = Torsion design factor, Zeta
16 = Concrete cover for closed stirrup
17 = Effective length factor for gravity, K Major
18 = Effective length factor for gravity, K Minor
Value
The value of the considered overwrite item.
1 = Seismic design grade
0 = As specified in preferences
1 = Seismic Super I
2 = Seismic Class I
3 = Seismic Class II
4 = Seismic Class III
5 = Seismic Class IV
6 = NonSeismic

2 = Dual system SMF


Value >= 0; 0 means use program determined value.

3 = MMF
Value >= 0; 0 means use program determined value.

4 = SMF
Value >= 0; 0 means use program determined value.

5 = AFMF
Value >= 0; 0 means use program determined value.

6 = Column Location
1 = Center Column
2 = Side Column
3 = Corner Column
4 = End Column
5 = Individual Column

7 = Transfer beam or column


0 = Program Determined
1 = No
2 = Yes

8 = Corner column seismic modification


0 = Program Determined
1 = No
2 = Yes

9 = Beam gravity neg moment red factor


Value >= 0; 0 means use program determined value.

10 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

11 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

12 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

13 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

14 = Torsion modification factor


Value >= 0; 0 means use program determined value.
15 = Torsion design factor, Zeta
Value >= 0; 0 means use program determined value.

16 = Concrete cover for closed stirrup


Value >= 0; 0 means use program determined value.
17 = Effective length factor for gravity, K Major
Value >= 0; 0 means use program default value.
18 = Effective length factor for gravity, K Minor
Value >= 0; 0 means use program default value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'createSap2000 object
Set SapObject= New Sap2000v15.SapObject

'startSap2000 application
SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create new concrete frame section property


ret= SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret= SapModel.DesignConcrete.SetCode("Chinese 2002")

'set overwrite item


ret= SapModel.DesignConcrete.Chinese_2002.SetOverwrite("8",
1, 2)

'closeSap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 17 and 18 in Version 14.0.0.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.CSA_A23_3_94.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, DbMajor
10 = Non-sway moment factor, DbMinor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Nominal
3 = Ordinary

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemCSA_A23_3_94()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'createSap2000 object
Set SapObject= New Sap2000v16.SapObject

'startSap2000 application
SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'create new concrete frame section property


ret= SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret= SapModel.DesignConcrete.SetCode("CSA-A23.3-94")

'set overwrite item


ret= SapModel.DesignConcrete.CSA_A23_3_94.SetOverwrite("8",
1, 2)

'closeSap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.EUROCODE_2_1992.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemEUROCODE_2_1992()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("EUROCODE 2-1992")

'set overwrite item


ret =
SapModel.DesignConcrete.EUROCODE_2_1992.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Hong_Kong_CP_2004.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, Beta Major
6 = Effective length factor, Beta Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.
7 = Moment coefficient, Cm Major
Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemHong_Kong_CP_2004()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Hong Kong CP 2004")

'set overwrite item


ret =
SapModel.DesignConcrete.Hong_Kong_CP_2004.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Italian_DM_14_2_92.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Amplification Coefficient, Omega Major
8 = Amplification Coefficient, Omega Minor
9 = Moment coefficient, c Major
10 = Moment coefficient, c Minor
11 = Moment coefficient, c_sway Major
12 = Moment coefficient, c_sway Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway
2 = Braced

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.
7 = Amplification coefficient, Omega Major
Value >= 0; 0 means use program determined value.

8 = Amplification coefficient, Omega Minor


Value >= 0; 0 means use program determined value.

9 = Moment coefficient, c Major


Value >= 0; 0 means use program determined value.

10 = Moment coefficient, c Minor


Value >= 0; 0 means use program determined value.

11 = Moment coefficient, c_sway Major


Value >= 0; 0 means use program determined value.

12 = Moment coefficient, c_sway Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemItalian_DM_14_2_92()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'createSap2000 object
Set SapObject= New Sap2000v16.SapObject

'startSap2000 application
SapObject.ApplicationStart

'create SapModel object


Set SapModel= SapObject.SapModel

'initialize model
ret= SapModel.InitializeNewModel

'createnew concrete frame section property


ret= SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret= SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret= SapModel.DesignConcrete.SetCode("Italian DM 14-2-92")

'set overwrite item


ret=
SapModel.DesignConcrete.Italian_DM_14_2_92.SetOverwrite("8", 1, 2)

'closeSap2000
SapObject.ApplicationExit False
Set SapModel= Nothing
Set SapObject= Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.Mexican_RCDF_2001.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, k Major
6 = Effective length factor, k Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Fab Major
10 = Non-sway moment factor, Fab Minor
11 = Sway moment factor, Fas Major
12 = Sway moment factor, Fas Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway ordinary
3 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, k Major


Value >= 0; 0 means use program determined value.

6 = Effective length factor, k Minor


Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Fab Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Fab Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Fas Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Fas Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemMexican_RCDF_2001()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("Mexican RCDF 2001")

'set overwrite item


ret =
SapModel.DesignConcrete.Mexican_RCDF_2001.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.NZS_3101_95.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Db Major
10 = Non-sway moment factor, Db Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ductile
2 = Limited
3 = Elastic
4 = Ordinary

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Db Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Db Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemNZS_3101_95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("NZS 3101-95")

'set overwrite item


ret = SapModel.DesignConcrete.NZS_3101_95.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignConcrete.UBC97.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 12, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Live load reduction factor
3 = Unbraced length ratio, Major
4 = Unbraced length ratio, Minor
5 = Effective length factor, K Major
6 = Effective length factor, K Minor
7 = Moment coefficient, Cm Major
8 = Moment coefficient, Cm Minor
9 = Non-sway moment factor, Dns Major
10 = Non-sway moment factor, Dns Minor
11 = Sway moment factor, Ds Major
12 = Sway moment factor, Ds Minor
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway special
2 = Sway Intermediate
3 = Sway Ordinary
4 = Non-sway

2 = Live load reduction factor


Value >= 0; 0 means use program determined value.

3 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

4 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

5 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.
6 = Effective length factor, K Minor
Value >= 0; 0 means use program determined value.

7 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

8 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

9 = Non-sway moment factor, Dns Major


Value >= 0; 0 means use program determined value.

10 = Non-sway moment factor, Dns Minor


Value >= 0; 0 means use program determined value.

11 = Sway moment factor, Ds Major


Value >= 0; 0 means use program determined value.

12 = Sway moment factor, Ds Minor


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a concrete design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignOverwriteItemUBC97()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("UBC97")

'set overwrite item


ret = SapModel.DesignConcrete.UBC97.SetOverwrite("8", 1, 4)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_ASD01.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Yield stress, Fy
26 = Compressive stress, Fa
27 = Tensile stress, Ft
28 = Major bending stress, Fb3
29 = Minor bending stress, Fb2
30 = Major shear stress, Fv2
31 = Minor shear stress, Fv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]
26 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

27 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

28 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

29 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAISC_ASD01()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-ASD01")

'set overwrite item


ret = SapModel.DesignSteel.AISC_ASD01.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.AISC_LRFD99.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 37, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Non-sway moment factor, B1 Major
26 = Non-sway moment factor, B1 Minor
27 = Sway moment factor, B2 Major
28 = Sway moment factor, B2 Minor
29 = Yield stress, Fy
30 = Expected to specified Fy ratio, Ry
31 = Compressive capacity, phi*Pnc
32 = Tensile capacity, phi*Pnt
33 = Major bending capacity, phi*Mn3
34 = Minor bending capacity, phi*Mn2
35 = Major shear capacity, phi*Vn2
36 = Minor shear capacity, phi*Vn3
37 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = OMF
2 = IMF
3 = SMF
4 = OCBF
5 = SCBF
6 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.
24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Nonsway moment factor, B1 Major


Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

29 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

30 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value.

31 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

32 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

33 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

34 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

35 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

36 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

37 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemAISC_LRFD99()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("AISC-LRFD99")

'set overwrite item


ret = SapModel.DesignSteel.AISC_LRFD99.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.BS5950_90.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Uniform moment factor, m Major
22 = Uniform moment factor, m Minor
23 = Slenderness correction factor, n
24 = Yield stress, Fy
25 = Compressive capacity, Pc
26 = Tensile capacity, Pt
27 = Major bending capacity, Mc3
28 = Minor bending capacity, Mc2
29 = Buckling resistance moment, Mb
30 = Major shear capacity, Pv2
31 = Minor shear capacity, Pv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
13 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Uniform moment factor, m Major


Value >= 0; 0 means use program determined value.

22 = Uniform moment factor, m Minor


Value >= 0; 0 means use program determined value.

23 = Slenderness correction factor, n


Value >= 0; 0 means use program determined value.

24 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

25 = Compressive capacity, Pc
Value >= 0; 0 means use program determined value. [F]

26 = Tensile capacity, Pt
Value >= 0; 0 means use program determined value. [F]

27 = Major bending capacity, Mc3


Value >= 0; 0 means use program determined value. [FL]

28 = Minor bending capacity, Mc2


Value >= 0; 0 means use program determined value. [FL]

29 = Buckling resistance moment, Mb


Value >= 0; 0 means use program determined value. [FL]

30 = Major shear capacity, Pv2


Value >= 0; 0 means use program determined value. [F]

31 = Minor shear capacity, Pv3


Value >= 0; 0 means use program determined value. [F]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemBS5950_90()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("BS5950 90")

'set overwrite item


ret = SapModel.DesignSteel.BS5950_90.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Canadian_S16_01.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByVal ItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 39, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor LTB
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K LTB
23 = Moment coefficient, Omega1 Major
24 = Moment coefficient, Omega1 Minor
25 = Bending coefficient, Omega2
26 = Nonsway moment factor, U1 Major
27 = Nonsway moment factor, U1 Minor
28 = Sway moment factor, U2 Major
29 = Sway moment factor, U2 Minor
30 = Parameter for compressive resistance, n
31 = Yield stress, Fy
32 = Expected to specified Fy ratio, Ry
33 = Compressive resistance, Cr
34 = Tensile resistance, Tr
35 = Major bending resistance, Mr3
36 = Minor bending resistance, Mr2
37 = Major shear resistance, Vr2
38 = Minor shear resistance, Vr3
39 = Demand/capacity ratio limit

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Type LD MRF
2 = Type MD MRF
3 = Type D MRF
4 = Type LD CBF(V)
5 = Type LD CBF(TC)
6 = Type LD CBF(TO)
7 = Type LD CBF(OT)
8 = Type MD CBF(V)
9 = Type MD CBF(TC)
10 = Type MD CBF(TO)
11 = Type MD CBF(OT)
12 = EBF
13 = Cantilever Column
14 = Conventional MF
15 = Conventional BF

2 = Consider deflection
0 = No
Any other value = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
6 = LL deflection limit, L/Value
Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]}

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L}

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Effective length factor, K LTB


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

25 = Moment coefficient, Omega2


Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

27 = Nonsway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, U2 Major


Value >= 0; 0 means use program determined value.

29 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

30 = Parameter for compressive resistance, n


Value >= 0; 0 means use program determined value.

31 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

32 = Expected to specified Fy ratio, Ry


Value >= 0; 0 means use program determined value. [F/L2]=

33 = Compressive resistance, Cr
Value >= 0; 0 means use program determined value. [F]

34 = Tensile resistance, Tr
Value >= 0; 0 means use program determined value. [F]
35 = Major bending resistance, Mr3
Value >= 0; 0 means use program determined value. [FL]

36 = Minor bending resistance, Mr2


Value >= 0; 0 means use program determined value. [FL]

37 = Major shear resistance, Vr2


Value >= 0; 0 means use program determined value. [F]

38 = Minor shear resistance, Vr3


Value >= 0; 0 means use program determined value. [F]

39 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.

ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set, otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemCanadian_S16_01 ()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CAN/CSA-S16-01")

'set overwrite item


ret = SapModel.DesignSteel.Canadian_S16_01.SetOverwrite("8",
1, 7)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 15.0.1.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.Chinese_2002.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 51, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Element type
3 = Is transfer column
4 = Seismic magnification factor
5 = Is rolled section
6 = Is flange edge cut by gas
7 = Is both end pinned
8 = Ignore b/t check
9 = Classify beam as flexo-compression member
10 = Is beam top loaded
11 = Consider deflection
12 = Deflection check type
13 = DL deflection limit, L/Value
14 = SDL + LL deflection limit, L/Value
15 = LL deflection limit, L/Value
16 = Total load deflection limit, L/Value
17 = Total camber limit, L/Value
18 = DL deflection limit, absolute
19 = SDL + LL deflection limit, absolute
20 = LL deflection limit, absolute
21 = Total load deflection limit, absolute
22 = Total camber limit, absolute
23 = Specified camber
24 = Net area to total area ratio
25 = Live load reduction factor
26 = Unbraced length ratio, Major
27 = Unbraced length ratio, Minor Lateral TorsionalBuckling
28 = Effective length factor, Mue Major
29 = Effective length factor, Mue Minor
30 = Moment coefficient, Beta_m Major
31 = Moment coefficient, Beta_m Minor
32 = Moment coefficient, Beta_t Major
33 = Moment coefficient, Beta_t Minor
34 = Axial stability coefficient, Phi Major
35 = Axial stability coefficient, Phi Minor
36 = Flexural stability coeff, Phi_bMajor
37 = Flexural stability coeff, Phi_bMinor
38 = Plasticity factor, Gamma Major
39 = Plasticity factor, Gamma Minor
40 = Section influence coefficient, Eta
41 = B/C capacity factor, Eta
42 = Euler moment factor, Delta Major
43 = Euler moment factor, Delta Minor
44 = Yield stress, Fy
45 = Allowable normal stress, f
46 = Allowable shear stress, fv
47 = Consider fictitious shear
48 = Demand/capacity ratio limit
49 = Dual system magnification factor
50 = Lo/r limit in compression
51 = L/r limit in tension

Value
The value of the considered overwrite item.
1 = Framing type
0 = As specified in preferences
1 = Sway Moment Frame, SMF
2 = Concentrically Braced Frame, CBF
3 = Eccentrically Braced Frame, EBF
4 = NonSway Moment Frame, NMF

2 = Element type
0 = Program Determined
1 = Column
2 = Beam
3 = Brace
4 = Truss

3 = Is transfer column
0 = Program Determined
1 = No
2 = Yes

4 = Seismic magnification factor


Value >= 0; 0 means no check for this item.
5 = Is rolled section
0 = Program Determined
1 = No
2 = Yes

6 = Is flange edge cut by gas


0 = Program Determined
1 = No
2 = Yes

7 = Is both end pinned


0 = Program Determined
1 = No
2 = Yes

8 = Ignore b/t check


0 = Program Determined
1 = No
2 = Yes

9 = Classify beam as flexo-compression member


0 = Program Determined
1 = No
2 = Yes

10 = Is beam top loaded


0 = Program Determined
1 = No
2 = Yes

11 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

12 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

13 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.
14 = SDL + LL deflection limit, L/Value
Value >= 0; 0 means no check for this item.

15 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

16 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

17 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

18 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

19 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

20 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

21 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

22 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

23 = Specified camber
Value >= 0. [L]

24 = Net area to total area ratio


Value >= 0; 0 means use program default value.

25 = Live load reduction factor


Value >= 0; 0 means use program determined value.

26 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

27 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.
28 = Effective length factor, Mue Major
Value >= 0; 0 means use program determined value.

29 = Effective length factor, Mue Minor


Value >= 0; 0 means use program determined value.

30 = Moment coefficient, Beta_m Major


Value >= 0; 0 means use program determined value.

31 = Moment coefficient, Beta_m Minor


Value >= 0; 0 means use program determined value.

32 = Moment coefficient, Beta_t Major


Value >= 0; 0 means use program determined value.

33 = Moment coefficient, Beta_t Minor


Value >= 0; 0 means use program determined value.

34 = Axial stability coefficient, Phi Major


Value >= 0; 0 means use program determined value.

35 = Axial stability coefficient, Phi Minor


Value >= 0; 0 means use program determined value.

36 = Flexural stability coefficient, Phi_b Major


Value >= 0; 0 means use program determined value.

37 = Flexural stability coefficient, Phi_b Minor


Value >= 0; 0 means use program determined value.

38 = Plasticity factor, Gamma Major


Value >= 0; 0 means use program determined value.

39 = Plasticity factor, Gamma Minor


Value >= 0; 0 means use program determined value.

40 = Section influence coefficient, Eta


Value >= 0; 0 means use program determined value.

41 = B/C capacity factor, Eta


Value >= 0; 0 means use program determined value.

42 = Euler moment factor, Delta Major


Value >= 0; 0 means use program determined value.

43 = Euler moment factor, Delta Minor


Value >= 0; 0 means use program determined value.

44 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

45 = Allowable normal stress, f


Value >= 0; 0 means use program determined value. [F/L2]

46 = Allowable shear stress, fv


Value >= 0; 0 means use program determined value. [F/L2]

47 = Consider fictitious shear


0 = Program Determined
1 = No
2 = Yes

48 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value

49 = Dual system magnification factor


Value >= 0; 0 means use program default value.
50 = Lo/r limit in compression
Value >= 0; 0 means use program determined value.
51 = L/r limit in tension
Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemChinese_2002()
'dimension variables
Dim SapObject As Sap2000v15.SapObject
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = New Sap2000v15.SapObject

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Chinese 2002")

'set overwrite item


ret = SapModel.DesignSteel.Chinese_2002.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Added Items 49, 50, and 51 in Version 14.0.0.
Modified Item 1 and added Truss to Item 2 in version 14.1.0.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.CISC_95.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Item
This is an integer between 1 and 35, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, Omega1 Major
22 = Moment coefficient, Omega1 Minor
23 = Bending coefficient, Cb
24 = Non-sway moment factor, U1 Major
25 = Non-sway moment factor, U1 Minor
26 = Sway moment factor, U2 Major
27 = Sway moment factor, U2 Minor
28 = Yield stress, Fy
29 = Compressive capacity, Cr
30 = Tensile capacity, Tr
31 = Major bending capacity, Mr3
32 = Minor bending capacity, Mr2
33 = Major shear capacity, Vr2
34 = Minor shear capacity, Vr3
35 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, Omega1 Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Omega1 Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, Omega2


Value >= 0; 0 means use program determined value.

24 = Non-sway moment factor, U1 Major


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor, U1 Minor


Value >= 0; 0 means use program determined value.
26 = Sway moment factor, U2 Major
Value >= 0; 0 means use program determined value.

27 = Sway moment factor, U2 Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Cr
Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Tr
Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mr3


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mr2


Value >= 0; 0 means use program determined value. [FL]

33 = Major shear capacity, Vr2


Value >= 0; 0 means use program determined value. [F]

34 = Minor shear capacity, Vr3


Value >= 0; 0 means use program determined value. [F]

35 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemCISC_95()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("CISC 95")

'set overwrite item


ret = SapModel.DesignSteel.CISC_95.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.EUROCODE_3_1993.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor Lateral Torsional Buckling
19 = Effective length factor, K Major
20 = Effective length factor, K Minor
21 = Moment coefficient, k Major
22 = Moment coefficient, k Minor
23 = Bending coefficient, C1
24 = Moment coefficient, k Lateral Torsional Buckling
25 = Non-sway moment factor
26 = Sway moment factor, Psi Major
27 = Sway moment factor, Psi Minor
28 = Yield stress, Fy
29 = Compressive capacity, Nc.Rd
30 = Tensile capacity, Nt.Rd
31 = Major bending capacity, Mc3.Rd
32 = Minor bending capacity, Mc2.Rd
33 = Buckling resistance moment, Mb.Rd
34 = Major shear capacity, V2.Rd
35 = Minor shear capacity, V3.RD
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Moment Frame
2 = Braced Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

19 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

21 = Moment coefficient, k Major


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, k Minor


Value >= 0; 0 means use program determined value.

23 = Bending coefficient, C1
Value >= 0; 0 means use program determined value.

24 = Moment coefficient, k Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

25 = Non-sway moment factor


Value >= 0; 0 means use program determined value.
26 = Sway moment factor, Psi Major
Value >= 0; 0 means use program determined value.

27 = Sway moment factor, Psi Minor


Value >= 0; 0 means use program determined value.

28 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

29 = Compressive capacity, Nc.Rd


Value >= 0; 0 means use program determined value. [F]

30 = Tensile capacity, Nt.Rd


Value >= 0; 0 means use program determined value. [F]

31 = Major bending capacity, Mc3.Rd


Value >= 0; 0 means use program determined value. [FL]

32 = Minor bending capacity, Mc2.Rd


Value >= 0; 0 means use program determined value. [FL]

33 = Buckling resistance moment, Mb.Rd


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, Vn2.Rd


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, Vn3.RD


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects= 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemEUROCODE_3_1993()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("EUROCODE 3-1993")

'set overwrite item


ret = SapModel.DesignSteel.EUROCODE_3_1993.SetOverwrite("8",
1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.INDIAN_IS_800_1998.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 34, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Consider deflection
3 = Deflection check type
4 = DL deflection limit, L/Value
5 = SDL + LL deflection limit, L/Value
6 = LL deflection limit, L/Value
7 = Total load deflection limit, L/Value
8 = Total camber limit, L/Value
9 = DL deflection limit, absolute
10 = SDL + LL deflection limit, absolute
11 = LL deflection limit, absolute
12 = Total load deflection limit, absolute
13 = Total camber limit, absolute
14 = Specified camber
15 = Net area to total area ratio
16 = Live load reduction factor
17 = Unbraced length ratio, Major
18 = Unbraced length ratio, Minor
19 = Unbraced length ratio, Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Effective length factor, K Lateral Torsional Buckling
23 = Moment coefficient, Cm Major
24 = Moment coefficient, Cm Minor
25 = Yield stress, Fy
26 = Allowable compressive stress, Sigma_ac
27 = Allowable tensile stress, Sigma_at
28 = Allowable major bending stress, Sigma_bc33
29 = Allowable minor bending stress, Sigma_bc22
30 = Major average shear stress, Tau_va2
31 = Minor average shear stress, Tau_va3
32 = Maximum elastic shear stress, Tau_vm
33 = Allowable effective stress, Sigma_e
34 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway Frame
2 = Nonsway Frame

2 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

3 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

4 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

5 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

9 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

10 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = Total load deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Specified camber
Value >= 0. [L]

15 = Net area to total area ratio


Value >= 0; 0 means use program default value.

16 = Live load reduction factor


Value >= 0; 0 means use program determined value.

17 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Minor


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Effective length factor, K Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

24 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Allowable compressive stress, Sigma_ac


Value >= 0; 0 means use program determined value. [F/L2]

27 = Allowable tensile stress, Sigma_at


Value >= 0; 0 means use program determined value. [F/L2]

28 = Allowable major bending stress, Sigma_bc33


Value >= 0; 0 means use program determined value. [F/L2]

29 = Allowable minor bending stress, Sigma_bc22


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major average shear stress, Tau_va2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor average shear stress, Tau_va3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Maximum elastic shear stress, Tau_vm


Value >= 0; 0 means use program determined value. [F/L2]

33 = Allowable effective stress, Sigma_e


Value >= 0; 0 means use program determined value. [F/L2]

34 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemINDIAN_IS_800_1998()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("Indian IS:800-1998")

'set overwrite item


ret =
SapModel.DesignSteel.INDIAN_IS_800_1998.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.ITALIAN_UNI_10011.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemType item.
Name
The name of a frame object with a steel frame design procedure.
Item
This is an integer between 1 and 26, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Axial load amplification(Omega)
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral TorsionalBuckling
20 = Effective length factor, Beta Major
21 = Effective length factor, Beta Minor
22 = Moment coefficient, Meq/Mmax Major
23 = Moment coefficient, Meq/Mmax Minor
24 = LTB moment coefficient (Omega1)
25 = Yield stress, Fy
26 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Sway Frame
2 = NonSway Frame

2 = Axial load amplification(Omega)


Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
14 = Total camber limit, absolute
Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral TorsionalBuckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, Beta Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, Beta Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Meq/Mmax Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Meq/Mmax Minor


Value >= 0; 0 means use program determined value.

24 = LTB moment coefficient (Omega1)


Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjectst, assignment is made to all selected frame
objects, and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemITALIAN_UNI_10011()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("ITALIAN UNI 10011")

'set overwrite item


ret =
SapModel.DesignSteel.ITALIAN_UNI_10011.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.UBC97_ASD.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group, depending on the value of the
ItemTypeitem.
Item
This is an integer between 1 and 32, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Yield stress, Fy
26 = Compressive stress, Fa
27 = Tensile stress, Ft
28 = Major bending stress, Fb3
29 = Minor bending stress, Fb2
30 = Major shear stress, Fv2
31 = Minor shear stress, Fv3
32 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]
12 = LL deflection limit, absolute
Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.

25 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

26 = Compressive stress, Fa
Value >= 0; 0 means use program determined value. [F/L2]

27 = Tensile stress, Ft
Value >= 0; 0 means use program determined value. [F/L2]

28 = Major bending stress, Fb3


Value >= 0; 0 means use program determined value. [F/L2]

29 = Minor bending stress, Fb2


Value >= 0; 0 means use program determined value. [F/L2]

30 = Major shear stress, Fv2


Value >= 0; 0 means use program determined value. [F/L2]

31 = Minor shear stress, Fv3


Value >= 0; 0 means use program determined value. [F/L2]

32 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2

If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemUBC97_ASD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-ASD")

'set overwrite item


ret = SapModel.DesignSteel.UBC97_ASD.SetOverwrite("8", 1, 2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetOverwrite
Syntax
SapObject.SapModel.DesignSteel.UBC97_LRFD.SetOverwrite
VB6 Procedure
Function SetOverwrite(ByVal Name As String, ByVal Item As Long, ByVal Value
As Double, Optional ByValItemType As eItemType = Object) As Long
Parameters
Name
The name of an existing frame object or group depending on the value of the
ItemType item.
Item
This is an integer between 1 and 36, inclusive, indicating the overwrite item
considered.
1 = Framing type
2 = Omega0
3 = Consider deflection
4 = Deflection check type
5 = DL deflection limit, L/Value
6 = SDL + LL deflection limit, L/Value
7 = LL deflection limit, L/Value
8 = Total load deflection limit, L/Value
9 = Total camber limit, L/Value
10 = DL deflection limit, absolute
11 = SDL + LL deflection limit, absolute
12 = LL deflection limit, absolute
13 = Total load deflection limit, absolute
14 = Total camber limit, absolute
15 = Specified camber
16 = Net area to total area ratio
17 = Live load reduction factor
18 = Unbraced length ratio, Major
19 = Unbraced length ratio, Minor Lateral Torsional Buckling
20 = Effective length factor, K Major
21 = Effective length factor, K Minor
22 = Moment coefficient, Cm Major
23 = Moment coefficient, Cm Minor
24 = Bending coefficient, Cb
25 = Non-sway moment factor, B1 Major
26 = Non-sway moment factor, B1 Minor
27 = Sway moment factor, B2 Major
28 = Sway moment factor, B2 Minor
29 = Yield stress, Fy
30 = Compressive capacity, phi*Pnc
31 = Tensile capacity, phi*Pnt
32 = Major bending capacity, phi*Mn3
33 = Minor bending capacity, phi*Mn2
34 = Major shear capacity, phi*Vn2
35 = Minor shear capacity, phi*Vn3
36 = Demand/capacity ratio limit
Value
The value of the considered overwrite item.
1 = Framing type
0 = Program Default
1 = Ordinary MRF
2 = Special MRF
3 = Braced Frame
4 = Special CBF
5 = EBF

2 = Omega0
Value >= 0; 0 means use a program determined value.

3 = Consider deflection
0 = Program Determined
1 = No
2 = Yes

4 = Deflection check type


0 = Program default
1 = Ratio
2 = Absolute
3 = Both

5 = DL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

6 = SDL + LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

7 = LL deflection limit, L/Value


Value >= 0; 0 means no check for this item.

8 = Total load deflection limit, L/Value


Value >= 0; 0 means no check for this item.

9 = Total camber limit, L/Value


Value >= 0; 0 means no check for this item.

10 = DL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

11 = SDL + LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

12 = LL deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

13 = Total load deflection limit, absolute


Value >= 0; 0 means no check for this item. [L]

14 = Total camber limit, absolute


Value >= 0; 0 means no check for this item. [L]

15 = Specified camber
Value >= 0. [L]

16 = Net area to total area ratio


Value >= 0; 0 means use program default value.

17 = Live load reduction factor


Value >= 0; 0 means use program determined value.

18 = Unbraced length ratio, Major


Value >= 0; 0 means use program determined value.

19 = Unbraced length ratio, Minor Lateral Torsional Buckling


Value >= 0; 0 means use program determined value.

20 = Effective length factor, K Major


Value >= 0; 0 means use program determined value.

21 = Effective length factor, K Minor


Value >= 0; 0 means use program determined value.

22 = Moment coefficient, Cm Major


Value >= 0; 0 means use program determined value.

23 = Moment coefficient, Cm Minor


Value >= 0; 0 means use program determined value.

24 = Bending coefficient, Cb
Value >= 0; 0 means use program determined value.
25 = Nonsway moment factor, B1 Major
Value >= 0; 0 means use program determined value.

26 = Nonsway moment factor, B1 Minor


Value >= 0; 0 means use program determined value.

27 = Sway moment factor, B2 Major


Value >= 0; 0 means use program determined value.

28 = Sway moment factor, B2 Minor


Value >= 0; 0 means use program determined value.

29 = Yield stress, Fy
Value >= 0; 0 means use program determined value. [F/L2]

30 = Compressive capacity, phi*Pnc


Value >= 0; 0 means use program determined value. [F]

31 = Tensile capacity, phi*Pnt


Value >= 0; 0 means use program determined value. [F]

32 = Major bending capacity, phi*Mn3


Value >= 0; 0 means use program determined value. [FL]

33 = Minor bending capacity, phi*Mn2


Value >= 0; 0 means use program determined value. [FL]

34 = Major shear capacity, phi*Vn2


Value >= 0; 0 means use program determined value. [F]

35 = Minor shear capacity, phi*Vn3


Value >= 0; 0 means use program determined value. [F]

36 = Demand/capacity ratio limit


Value >= 0; 0 means use program determined value.
ItemType
This is one of the following items in the eItemType enumeration:
Object = 0
Group = 1
SelectedObjects = 2
If this item is Object, the assignment is made to the frame object specified by the
Name item.
If this item is Group, the assignment is made to all frame objects in the group
specified by the Name item.
If this item is SelectedObjects, assignment is made to all selected frame objects,
and the Name item is ignored.
Remarks
This function sets the value of a steel design overwrite item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetSteelDesignOverwriteItemUBC97_LRFD()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set steel design code


ret = SapModel.DesignSteel.SetCode("UBC97-LRFD")

'set overwrite item


ret = SapModel.DesignSteel.UBC97_LRFD.SetOverwrite("8", 1,
2)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
See Also
GetOverwrite
SetPrecastI (Note: Newer Function Available)
Syntax
SapObject.SapModel.PropFrame.SetPrecastI
VB6 Procedure
Function SetPrecastI(ByVal Name As String, ByVal MatProp As String, ByRef
b() As Double, ByRef d() As Double, Optional ByVal Color As Long = -1,
Optional ByVal Notes As String = "", Optional ByVal GUID As String = "") As
Long
Parameters
Name
The name of an existing or new frame section property. If this is an existing
property, that property is modified; otherwise, a new property is added.
MatProp
The name of the material property for the section.
b
This is an array, dimensioned to 3, containing the horizontal section dimensions.
[L]
b(0) = B1 (> 0)
b(1) = B2 (> 0)
b(2) = B3 (> 0)
b(3) = B4 (>= 0)
Section dimensions B1 through B4 are defined on the precast concrete I girder
definition form.
d
This is an array, dimensioned to 5, containing the vertical section dimensions. [L]
d(0) = D1 (> 0)
d(1) = D2 (> 0)
d(2) = D3 (>= 0)
d(3) = D4 (>= 0)
d(4) = D5 (>= 0)
d(5) = D6 (> 0)
Section dimensions D1 through D6 are defined on the precast concrete I girder
definition form.
Color
The display color assigned to the section. If Color is specified as -1, the
program will automatically assign a color.
Notes
The notes, if any, assigned to the section.
GUID
The GUID (global unique identifier), if any, assigned to the section. If this item is
input as Default, the program assigns a GUID to the section.
Remarks
This function initializes a precast concrete I girder frame section property. If this
function is called for an existing frame section property, all items for the section
are reset to their default value.
The function returns zero if the section property is successfully initialized;
otherwise it returns a nonzero value.
VBA Example
Sub SetFramePropPrecastI()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long
Dim bb() As Double
Dim dd() As Double

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'set new frame section property


ReDim bb(3)
ReDim dd(5)
bb(0) = 16
bb(1) = 22
bb(2) = 7
bb(3) = 0
dd(0) = 45
dd(1) = 7
dd(2) = 4.5
dd(3) = 0
dd(4) = 7.5
dd(5) = 7
ret = SapModel.PropFrame.SetPrecastI("PC1", "4000Psi", bb,
dd)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.02.
The function is obsolete and has been superceded by SetPrecastI_1 as of
version 17.2.0. This function is maintained for backward compatibility.
See Also
GetPrecastI
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI318_05_IBC2003.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and divisible by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0

9 = Phi shear seismic


Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemACI318_05_IBC2003()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property


ret = SapModel.PropFrame.SetRectangle("R1", "4000Psi", 20,
12)

'create model from template


ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288,
True, "R1", "R1")

'set concrete design code


ret = SapModel.DesignConcrete.SetCode("ACI318-05/IBC2003")

'set preference item


ret =
SapModel.DesignConcrete.ACI318_05_IBC2003.SetPreference(2, 9)

'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Release Notes
Initial release in version 11.03.
Changed Time history design item to Multi-response case design and added
additional values in version 15.0.1.
See Also
GetPreference
SetPreference
Syntax
SapObject.SapModel.DesignConcrete.ACI_318_02.SetPreference
VB6 Procedure
Function SetPreference(ByVal Item As Long, ByVal Value As Double) As Long
Parameters
Item
This is an integer between 1 and 13, inclusive, indicating the preference item
considered.
1 = Number of interaction curves
2 = Number of interaction points
3 = Consider minimum eccentricity
4 = Seismic design category
5 = Phi tension controlled
6 = Phi compression controlled tied
7 = Phi compression controlled spiral
8 = Phi shear and/or torsion
9 = Phi shear seismic
10 = Phi joint shear
11 = Pattern live load factor
12 = Utilization factor limit
13 = Multi-response case design
Value
The value of the considered preference item.
1 = Number of interaction curves
Value >= 4 and devisable by 4

2 = Number of interaction points


Value >= 5 and odd

3 = Consider minimum eccentricity


0 = No
Any other value = Yes

4 = Seismic design category


1=A
2=B
3=C
4=D
5=E
6=F

5 = Phi tension controlled


Value > 0

6 = Phi compression controlled tied


Value > 0

7 = Phi compression controlled spiral


Value > 0

8 = Phi shear and/or torsion


Value > 0

9 = Phi shear seismic


Value > 0

10 = Phi joint shear


Value > 0

11 = Pattern live load factor


Value >= 0

12 = Utilization factor limit


Value > 0

13 = Multi-response case design


1 = Envelopes
2 = Step-by-step
3 = Last step
4 = Envelopes -- All
5 = Step-by-step -- All
Remarks
This function sets the value of a concrete design preference item.
The function returns zero if the item is successfully set; otherwise it returns a
nonzero value.
VBA Example
Sub SetConcreteDesignPreferenceItemACI_318_02()
'dimension variables
Dim SapObject as cOAPI
Dim SapModel As cSapModel
Dim ret As Long

'create Sap2000 object


Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application


SapObject.ApplicationStart

'create SapModel object


Set SapModel = SapObject.SapModel

'initialize model
ret = SapModel.InitializeNewModel

'create new concrete frame section property

Вам также может понравиться