DEPRECATED. Initializes a material property. If this function is called for an existing material property,
all items for the material are reset to their default value.
Namespace: ETABS2015Assembly: ETABS2015 (in ETABS2015.dll) Version: 15.0.0.0 (15.0.0.0)
int SetMaterial(
string Name,
eMatType MatType,
int Color = -1,
string Notes = "",
string GUID = ""
)
Function SetMaterial ( _
Name As String, _
MatType As eMatType, _
Optional Color As Integer = -1, _
Optional Notes As String = "", _
Optional GUID As String = "" _
) As Integer
int SetMaterial(
String^ Name,
eMatType MatType,
int Color = -1,
String^ Notes = L"",
String^ GUID = L""
)
Parameters
- Name
- Type:
System String
The name of an existing or new material property. If this is an existing property,
that property is modified; otherwise, a new property is added.
- MatType
- Type: ETABS2015 eMatType
This is one of the items in the eMatType enumeration.
- Color (Optional)
- Type:
System Int32
- Notes (Optional)
- Type:
System String
- GUID (Optional)
- Type:
System String
The GUID (global unique identifier), if any, assigned to the material.
If this item is input as Default, the program assigns a GUID to the material.
Return Value
Returns zero if the material is successfully initialized; otherwise it returns a nonzero value.
This function is DEPRECATED. Please use
AddMaterial(String , eMatType, String, String, String, String) instead.
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.SetMaterial("Steel", ETABS2013.eMatType.Steel)
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)
'initialize new material property
ret = SapModel.PropMaterial.SetMaterial("Steel", ETABS2013.eMatType.Steel)
'close ETABS
EtabsObject.ApplicationExit(False)
'clean up variables
SapModel = Nothing
EtabsObject = Nothing
End Sub