0% found this document useful (0 votes)
21 views2 pages

Add Default Design Combos in SAP2000

Uploaded by

ALEX MOLINA
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Add Default Design Combos in SAP2000

Uploaded by

ALEX MOLINA
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AddDesignDefaultCombos Page 1 of 2

AddDesignDefaultCombos
Syntax
[Link]

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("[Link]")

'start Sap2000 application


[Link]

'create SapModel object


Set SapModel = [Link]

'initialize model
ret = [Link]

'add combo
ret = [Link](True, False, False,
False)

'close Sap2000
[Link] False
Set SapModel = Nothing
Set SapObject = Nothing

mk:@MSITStore:D:\COMPARTIDA\OAPI%20SAP2000%20Y%20ETABS\CSI_OAPI_... 4/11/2024
AddDesignDefaultCombos Page 2 of 2

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

mk:@MSITStore:D:\COMPARTIDA\OAPI%20SAP2000%20Y%20ETABS\CSI_OAPI_... 4/11/2024

Common questions

Powered by AI

The return value of the AddDesignDefaultCombos function signifies whether the default load combinations were successfully added to the model. A return value of zero indicates success, while a non-zero value indicates failure. This allows error checking after the function call .

Potential challenges when using the AddDesignDefaultCombos function include incorrect setting of Boolean parameters leading to unintentional addition or omission of design combinations, difficulty in handling nonzero return values which indicate failure, and managing complex models where understanding the impact of added combinations on the overall design could require extensive validation. Additionally, integrating the function into larger scripts may pose compatibility or dependency issues if the setup steps aren't properly configured or if there are naming conflicts within the application's API .

The nomenclature change from Load Cases, Analysis Cases, and Response Combinations to Load Patterns, Load Cases, and Load Combinations occurred in version 12.00 of the software .

To ensure that only default combinations specific to certain materials have been added using AddDesignDefaultCombos, one must carefully set the appropriate Boolean parameters only to True for desired materials (e.g., True for DesignSteel and False for others if only steel combinations are needed). After the function execution, validation by examining the model's combinations list can confirm the specific default combinations added. Additional checks of the return value (must be zero for successful addition) ensure operation precision. It's also recommended to log parameter settings and function results for auditability in complex projects .

The procedural steps outlined in the example VBA script start with dimensioning the variables for SapObject and SapModel, followed by creating a Sap2000 object using CreateObject. The Sap2000 application is started using SapObject.ApplicationStart. Then, a SapModel object is created with SapObject.SapModel, which is initialized with ret = SapModel.InitializeNewModel. After adding the default design combinations, the Sap2000 application is closed with SapObject.ApplicationExit False, and finally, the SapModel and SapObject variables are set to Nothing to release the objects .

A non-zero return value indicates an error during the addition of design combinations, potentially caused by incorrect parameters, incompatible model states, or ongoing processes in the application preventing modifications. To address it, the user should re-examine the input parameters, ensure that the application and model are in a ready state for updates, and review any API error messages or logs. Additionally, checking for and resolving any conflicting settings or open models that might be causing hindrances can help resolve the issue .

In a VBA script, the AddDesignDefaultCombos function can be used to add only steel design combinations by setting the DesignSteel parameter to True and the other material parameters to False. For instance, in the example script provided in the document, this is achieved by the line ret = SapModel.RespCombo.AddDesignDefaultCombos(True, False, False, False), where only the steel design parameter is enabled to add default steel design combinations to the model .

Changes in nomenclature, such as from 'Load Cases, Analysis Cases, and Response Combinations' to 'Load Patterns, Load Cases, and Load Combinations,' can significantly impact user understanding and application by aligning terminology with industry standards and clarifying the distinctions between different modeling elements. Such changes may improve clarity but also require users to update their knowledge and perhaps re-learn aspects of the software, potentially disrupting workflows if documentation and training materials are not concurrently updated. Consistent terminology is crucial for effective communication and precise implementation of software features .

The function AddDesignDefaultCombos allows the user to specify which default design combinations to add to the model by setting Boolean parameters for different materials: steel, concrete, aluminum, and cold-formed. If a parameter is set to True, default design combinations for that material will be added. The function returns zero upon successful addition, otherwise a nonzero value if unsuccessful .

The document suggests initializing the Sap2000 application in a VBA script by creating a Sap2000 object with CreateObject and starting the application using SapObject.ApplicationStart, followed by the creation of a SapModel. To exit, the document advises calling SapObject.ApplicationExit False which closes the application while retaining the operational state, followed by setting the SapModel and SapObject to Nothing to release the memory allocated to these objects .

You might also like