Adds a new material property to the model.
Namespace: ETABS2015Assembly: ETABS2015 (in ETABS2015.dll) Version: 15.0.0.0 (15.0.0.0)
int AddMaterial(
ref string Name,
eMatType MatType,
string Region,
string Standard,
string Grade,
string UserName = ""
)
Function AddMaterial ( _
ByRef Name As String, _
MatType As eMatType, _
Region As String, _
Standard As String, _
Grade As String, _
Optional UserName As String = "" _
) As Integer
int AddMaterial(
String^% Name,
eMatType MatType,
String^ Region,
String^ Standard,
String^ Grade,
String^ UserName = L""
)
Parameters
- Name
- Type:
System String
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
- Type: ETABS2015 eMatType
This is one of the items in the eMatType enumeration.
- Region
- Type:
System String
The region name of the material property that is user-predefined
in the file "CSiMaterialLibrary*.xml" located in subfolder "Property Libraries"
under the program installation.
- Standard
- Type:
System String
The Standard name of the material property with the specified
MatType within the specified region.
- Grade
- Type:
System String
- UserName (Optional)
- Type:
System String
Return Value
Returns zero if the material property is successfully added,
otherwise it returns a nonzero value.
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 program installation folder.
Public Sub Example()
Dim SapModel As cSapModel
Dim EtabsObject As cOAPI
Dim ret As Integer = -1
EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")
ret = EtabsObject.ApplicationStart()
SapModel = EtabsObject.SapModel
ret = SapModel.InitializeNewModel()
ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)
ret = SapModel.PropMaterial.AddMaterial(Name, ETABS2013.eMatType.Rebar, "United States", "ASTM A706", "Grade 60")
EtabsObject.ApplicationExit(False)
SapModel = Nothing
EtabsObject = Nothing
End Sub
Public Sub Example()
Dim SapModel As cSapModel
Dim EtabsObject As cOAPI
Dim ret As Integer = -1
'create ETABS object
EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")
'start ETABS application
ret = EtabsObject.ApplicationStart()
'create SapModel object
SapModel = EtabsObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel()
'create steel deck template model
ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)
'add ASTM A706 rebar material property in United states Region
ret = SapModel.PropMaterial.AddMaterial(Name, ETABS2013.eMatType.Rebar, "United States", "ASTM A706", "Grade 60")
'close ETABS
EtabsObject.ApplicationExit(False)
'clean up variables
SapModel = Nothing
EtabsObject = Nothing
End Sub