cPointObjAddCartesian Method

Adds a point object to a model. The added point object will be tagged as a Special Point except if it was merged with another point object. Special points are allowed to exist in the model with no objects connected to them.

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int AddCartesian(
	double X,
	double Y,
	double Z,
	ref string Name,
	string UserName = "",
	string CSys = "Global",
	bool MergeOff = false,
	int MergeNumber = 0
)

Parameters

X
Type: SystemDouble
Y
Type: SystemDouble
Z
Type: SystemDouble
Name
Type: SystemString
This is the name that the program ultimately assigns for the point object. If no userName is specified, the program assigns a default name to the point object. If a userName is specified and that name is not used for another point, the userName is assigned to the point; otherwise a default name is assigned to the point.

If a point is merged with another point, this will be the name of the point object with which it was merged.

UserName (Optional)
Type: SystemString
CSys (Optional)
Type: SystemString
The name of the coordinate system in which the joint coordinates are defined.
MergeOff (Optional)
Type: SystemBoolean
If this item is False, a new point object that is added at the same location as an existing point object will be merged with the existing point object (assuming the two point objects have the same MergeNumber) and thus only one point object will exist at the location.

If this item is True, the points will not merge and two point objects will exist at the same location.

MergeNumber (Optional)
Type: SystemInt32
Two points objects in the same location will merge only if their merge number assignments are the same. By default all pointobjects have a merge number of zero.

Return Value

Type: Int32
Returns zero if the point object is successfully added or merged, 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 x As Double, y As Double, z As Double
    Dim Name As String
    Dim MyName 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 point object to model
    x = 12
    y = 37
    z = 0
    MyName = "A1"
    ret = SapModel.PointObj.AddCartesian(x, y, z, Name, MyName)

'close ETABS
    EtabsObject.ApplicationExit(False)

'clean up variables
   SapModel = Nothing
   EtabsObject = Nothing    
End Sub
See Also