cPropMaterialAddMaterial Method |
Adds a new material property to the model.
Namespace:
ETABS2016
Assembly:
ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntaxint 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""
)
abstract AddMaterial :
Name : string byref *
MatType : eMatType *
Region : string *
Standard : string *
Grade : string *
?UserName : string
(* Defaults:
let _UserName = defaultArg UserName ""
*)
-> int
Parameters
- Name
- Type: SystemString
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: ETABS2016eMatType
This is one of the items in the eMatType enumeration.
- Region
- Type: SystemString
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: SystemString
The Standard name of the material property with the specified
MatType within the specified region.
- Grade
- Type: SystemString
- UserName (Optional)
- Type: SystemString
Return Value
Type:
Int32
Returns zero if the material property is successfully added,
otherwise it returns a nonzero value.
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 program installation folder.
ExamplesPublic 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, eMatType.Rebar, "United States", "ASTM A706", "Grade 60")
EtabsObject.ApplicationExit(False)
SapModel = Nothing
EtabsObject = Nothing
End Sub
See Also