cFrameObjAddByPoint Method

Adds a new frame object whose end points are specified by name.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int AddByPoint(
	string Point1,
	string Point2,
	ref string Name,
	string PropName = "Default",
	string UserName = ""
)

Parameters

Point1
Type: SystemString
The name of a defined point object at the I-End of the added frame object.
Point2
Type: SystemString
The name of a defined point object at the J-End of the added frame object.
Name
Type: SystemString
This is the name that the program ultimately assigns for the frame object. If no userName is specified, the program assigns a default name to the frame object. If a userName is specified and that name is not used for another frame, cable or tendon object, the userName is assigned to the frame object, otherwise a default name is assigned to the frame object.
PropName (Optional)
Type: SystemString
This is Default, None, or the name of a defined frame section property.

If it is Default, the program assigns a default section property to the frame object. If it is None, no section property is assigned to the frame object. If it is the name of a defined frame section property, that property is assigned to the frame object.

UserName (Optional)
Type: SystemString

Return Value

Type: Int32
Returns zero if the frame object is successfully added, otherwise it returns a nonzero value.
Remarks
Examples
VB
Public Sub Example()
   Dim SapModel As cSapModel
   Dim EtabsObject As cOAPI
   Dim ret As Integer = -1
   Dim Name As String

'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 frame object by points
   ret = SapModel.FrameObj.AddByPoint("1", "6", Name)

'close ETABS
   EtabsObject.ApplicationExit(False)

'clean up variables
   SapModel = Nothing
   EtabsObject = Nothing

End Sub
See Also