AddQuick {Material}

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 superseded by 
AddMaterial
 as of version 15.2.0. This function is maintained for backward compatibility. New function added.

See Also