SetGroup {Cold Formed}

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